WiFi Scan Reception strength always 100%

I observed that when I do a WiFi scan with the LM816 WiFi dongle (RTL8188EU chip) using connman all services are reported with 100% signal strength. This can be reporoduced with the LXDE demo image of BSP v2.8.7. I think signal strength reporting worked in BSP v2.8.6. I used the r8188eu driver from the backports (default setup in the demo image).

I guess the error is neither in the WiFi driver nor in connman. I also tested with the latest version of connman (v1.38) which showed the same behavior. I guess the error lays in cfg80211 or in mac80211.

Could you take a look at the issue?

Best regards,
Michael

Dear @michaelg

I was able to reproduce your situation and I am looking into it.
Is there a reason why you need to have proper values for the signal strength?

Best regards
Diego

Hi @diego_b.tx
Great that you were able to reproduce it. Thanks for looking into the issue.

I need the signal strength indication to present a WiFi list with additional information to the user in the UI of my application.

Best regards,
Michael

Hi @diego_b.tx

Thank you for doing those tests. I already ordered the mentioned dongle (TL-WN823N) to do my own tests. However I’m not yet sure whether I can convince my customer to make the switch to another dongle. Unfortunately the information that the LM816 does not really work on Linux is new to me. I have been struggling with this dongle for 2 months now. Has the hint you mentioned on the product page always been there?

Best regards,
Michael

Hi @michaelg

Unfortunately the information that the LM816 does not really work on Linux is new to me.

It works but not recommended, especially not for production.

I have been struggling with this dongle for 2 months now. Has the hint you mentioned on the product page always been there?

Yes, this information is present since May 2019.

Best regards,
Jaski

Hi @michaelg

Thank you for the clarification.

Meanwhile I was able to breakdown the issue. I integrated the TP-Link USB WiFi dongle called TL-WN823N. It is based on the Realtek RTL8192 chipset and there’s a driver available which I enabled as a kernel module. Using this TP-Link USB WiFi dongle it showed me the correct signal strength with connmanctl services. Therefore I assume the root cause for the wrong data with the LM816 is the driver itself (which is in staging actually in the Linux kernel).

As mentioned on our product page for the LM816 “It is not recommended for using with Embedded Linux”. The product comes from our Windows embedded history and has a much better integration there. Would it may be possible to switch to another dongle with a better integration? If this is not possible and this is a very required feature you must have, would you mind to write an e-mail to support@toradex.com and give a bit more details about your project? We can then search for a solution together with our R&D. Please don’t forget to mention this thread in the e-mail.

Best regards
Diego

Hi @diego_b.tx

I now received the TL-WN823N wifi dongles and managed to install the driver in my OS (rtl8xxxu from the backports). However I did not yet figure out which firmware I need to install.
My kernel tries to load “rtlwifi/rtl8192eu_nic.bin”. Do you know which yocto recipe serves this firmware? I didn’t find something in the linux-firmware recipe.

Best regards,
Michael

Hi @michaelg

These are good news.

My kernel tries to load “rtlwifi/rtl8192eu_nic.bin”.

Is the firmware found? If not you could copy the firmware from your host, which will be automatically loaded when you insert your dongle in the host.

Best regards,
Jaski

Hi @jaski.tx

In the meantime I added the firmware binary and run some tests with the TL-WN823N dongle. I made an interesting observation:

  • If the dongle is enabled (connman → enable wifi) and then I try to connect to a network I get an error.
  • However if I plug out and reinsert the WiFi stick on the USB bus I can connect without any problems. So it looks like the dongle does not like the enable / disable operation. Using it directly after a system reboot does also not work.

Did you observe the same issue (see also my logfile in the attachment)?
Do you have any idea what’s wrong here?
Is there any WiFi dongle that you could fully recommend for Linux?

Best regards & thanks for the help,
Michael

Hi @michaelg

However if I plug out and reinsert the WiFi stick on the USB bus I can connect without any problems. So it looks like the dongle does not like the enable / disable operation. Using it directly after a system reboot does also not work.

I think enabling/disabling is not supported by the dongle driver.

Did you observe the same issue (see also my logfile in the attachment)?

I need to do these tests. I will come back to you next week.

Do you have any idea what’s wrong here?

Unfortunately not.

Is there any WiFi dongle that you could fully recommend for Linux?

No, we only recommend the SoM with Wifi Features. If you really want to use USB Wifi Dongle, then you should go with a Dongle with Intel or Broadcom chipset.

Best regards,
Jaski

Hi @jaski.tx

Thanks for your feedback and for the clarifications. Did you already find the time to run the tests you mentioned?

Best regards,
Michael

No, not yet. I will come next week back to you.

Best regards,
Jaski

Hi @jaski.tx

Do you have any updates on this topic?

Best regards,
Michael

Hi @michaelg

Sorry for the delayed answer. I wanted to inform you that I won’t have any time to look into this issue in near future.

Best regards,
Jaski

Hi @jaski.tx

I had time to do some further investigations:

On one had one has to be very careful when talking about the TL-WN823 as there are different versions available with completely different chipsets. I did my tests with TL-WN823N v2. Which one did you use?

On the other hand it looks like the chipset is to blame (RTL8192EU) and not one specific dongle. I had observed the same misbehavior with another dongle that has the same chipset: D-Link DWA‑131.

Do you think you will find time to investigate why the RTL8192EU does not work properly?

Best regards,
Michael

Hi @michaelg

Thanks for the update. Yeah, there are lot of different version of these cheap dongle with lot of different chipsets. Especially with the chipset RTL8192EU, we always had issues.

No, we won’t investigate our time for any Realtek based Chipset. Our FAEs are testing some Wifi Dongles with Broadcom and Intel Chipset and they will update you soon.

Best regards,
Jaski