LM816 USB WiFi issue

I’m trying to setup the USB WiFi dongle LM816 (ordered via Toradex) on my colibri imx7 with my custom version of the boot2qt image.

Using lsusb I can see that the USB WiFi dongle is listed:

Bus 001 Device 005: ID 0bda:8179
Realtek Semiconductor Corp. RTL8188EUS
802.11n Wireless Network Adapter

Using connmanctl I then try to enable wifi and scan for networks. Enabling seems to work (with a long delay though):

connmanctl> enable wifi
Enabled wifi

But the scan doesn’t work:

connmanctl> scan wifi Error
/net/connman/technology/wifi: Method
“Scan” with signature “” on interface
“net.connman.Technology” doesn’t exist

Please find my Kernel Config here.

Is there something wrong in my kernel config or in the sequence of my conman commands?

Best reagards,
Michael

Hi @michaelg

Thanks for writing to the Toradex Community!

Did you compile your custom kernel? If yes, did you add the backports as described here to your custom kernel?

Best regards,
Jaski

Hi @jaski.tx

Yes I compile a custom kernel. My setup is based on the b2qt distro. Therefore I already have the meta-toradex-bsp-common layer in place. I found the backports recipe within this layer. Do I have to follow the following instruction https://developer.toradex.com/knowledge-base/kernel-backports-integration#How_to_CrossCompile_the_Backports_Drivers_From_Source or can I use Yocto to achieve the same result?

Regards,
Michael

Hi Michael,

You can also use Yocto to achieve the same. Please have a look here.

Best regards,
Jaski

Hi @jaski.tx
Thank you for the link. I managed to compile the backports using Yocto. I also do menuconfig on the backports. However I didn’t manage to actually use my own configuration. I used the following sequence:

  • Use menuconfig, edit config and save config
  • Use savediffconfig and copy the fragment file to where the config file from the backports recipe was (or use bbappend to do the same).
  • Build the image (which has the backports as a dependency).

My configuration does not seem to be applied correctly as the kernel module kernel/drivers/staging/rtl8188eu/r8188eu.ko seems to be missing despite the fact I enabled the driver in the configuration. Please have a look at my backports recipe in the attachement. Am I missing something?

I did some more research and figured out that I would need to call

make defconfig-myconfig

in order to make sure that a defconfig file called defconfigs/myconfig is applied. I do this from Yocto in do_configure_append using

oe_runmake defconfig-myconf

.
However this doesn’t work. No configuration changes are applied. I also tried oe_runmake -B defconfig-myconf. Then I get an error in the configure step.

Any help is appreciated.

Hi @michaelg

Can you maybe try to put your defconfig just to this folder:
http://git.toradex.com/cgit/meta-toradex-nxp.git/tree/recipes-kernel/linux/linux-toradex-4.9-2.3.x/mx7?h=rocko

Then it should automatically take the right one.

Regarsd,
Stefan

Hi @stefan_e.tx

Thanks for the hint. I just figured out how to configure a couple of hours ago. If I use the defconfig file as my .config file leave everything as it is (old behavior where make oldconfig is called) than it works. But now I’m at the next hurdle: Is the correct driver the one that is enabled with

CPTCFG_R8188EU=m

or is it

CPTCFG_RTL8XXXU=m
CPTCFG_RTL8XXXU_UNTESTED=y
?

The first one doesn’t work (no module is compiled). Probably because it is commented out in KConfig: http://git.toradex.com/cgit/backports-toradex.git/tree/drivers/staging/Kconfig?h=toradex-4.19#n41?

The latter kernel objects are created and I can see them on my target and even load the driver. However connmanctl wifi enable still doesn’t work. I get the following error:

Error wifi: Method “SetProperty” with
signature “sv” on interface
“net.connman.Technology” doesn’t exist

Is there anything I need to enable in the normal kernel configuration (e.g. CONFIG_WLAN)?

Would you rather recommend me to use the backports from kernel 5.4?

Best regards,
Michael

Hi @michaelg

Do you see a wifi interface if you do a?

ifconfig -a

What does dmesg say?

dmesg

We use the backports because the wifi drivers are changing rapidly and they fix a lot of stuff there. So if possible I would recommend you to use the back-ports yes. But it doesn’t really explain why you have this issues…

Regards,
Stefan

Please just wait a few more days for us to complete the backports 5.4 integration and release a BSP 2.8.7 maintenance release with it.

Hi @michaelg

Great that you found the solution. Probably you only need to do a:

IMAGE_INSTALL_append = " linux-firmware-rtl8188eu"

Regards,
Stefan

dmesg revealed that the firmware file was missing (/lib/firmware/rtlwifi/rtl8188eufw.bin). If I enable the linux-firmware recipe in my image the impact on the root file system size is huge. That’s why it wasn’t enabled. For a first test I deployed the bin file manually. Now WiFi is working. :slight_smile:

Now I will try to install /lib/firmware/rtlwifi/rtl8188eufw.bin in Yocto without all the other firmware binaries that I don’t need.

Hi @marcel.tx

Do you already have a date for the release of BSP 2.8.7?

Best regards,
Michael

Q2 probably this year still (;-p).