LM006 not working on iMX6

I am having issues with the LM006 on the iMX6. I’m using BSP version 2.8b4 and building the angstrom-qt5-x11-image image. I expected it to work without kernel modification based on this page: High performance, low power Embedded Computing Systems | Toradex Developer Center

You can see the failure here:

[ 185.263077] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 185.278316] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 185.286538] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 185.295285] platform regulatory.0: Falling back to user helper
[ 185.306947] cfg80211: failed to load regulatory.db
[ 185.518402] usb 2-1.2: Vendor: Realtek
[ 185.522214] usb 2-1.2: Product: 802.11n WLAN Adapter
[ 185.527274] usb 2-1.2: rtl8192cu_parse_efuse: dumping efuse (0x80 bytes):
[ 185.534148] usb 2-1.2: 00: 29 81 00 74 cd 00 00 00
[ 185.538996] usb 2-1.2: 08: ff 00 da 0b 76 81 03 41
[ 185.543853] usb 2-1.2: 10: 32 00 85 62 9e ad 34 c9
[ 185.548679] usb 2-1.2: 18: f0 87 a8 3d 0a 03 52 65
[ 185.553537] usb 2-1.2: 20: 61 6c 74 65 6b 00 16 03
[ 185.558367] usb 2-1.2: 28: 38 30 32 2e 31 31 6e 20
[ 185.563246] usb 2-1.2: 30: 57 4c 41 4e 20 41 64 61
[ 185.568071] usb 2-1.2: 38: 70 74 65 72 00 00 00 00
[ 185.572941] usb 2-1.2: 40: 00 00 00 00 00 00 00 00
[ 185.577760] usb 2-1.2: 48: 00 00 00 00 00 00 00 00
[ 185.582590] usb 2-1.2: 50: 00 00 00 00 00 00 00 00
[ 185.587467] usb 2-1.2: 58: 06 00 2a 2a 2a 00 00 00
[ 185.592295] usb 2-1.2: 60: 2a 2a 2a 00 00 00 00 00
[ 185.597151] usb 2-1.2: 68: 00 00 00 00 04 04 04 00
[ 185.601963] usb 2-1.2: 70: 00 00 00 00 00 02 00 00
[ 185.606837] usb 2-1.2: 78: 10 00 00 00 36 00 81 00
[ 185.611687] usb 2-1.2: RTL8188CU rev A (TSMC) 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[ 185.620358] usb 2-1.2: RTL8188CU MAC: 34:c9:f0:87:a8:3d
[ 185.625668] usb 2-1.2: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[ 185.642866] usb 2-1.2: Firmware revision 80.0 (signature 0x88c1)
[ 185.671640] usb 2-1.2: rtl8xxxu_writeN: Failed to write block at addr: 1480 size: 0080
[ 186.186453] rtl8xxxu: probe of 2-1.2:1.0 failed with error -11
[ 186.192479] usbcore: registered new interface driver rtl8xxxu

Also, the lsusb output:

root@apalis-imx6:~# lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Running opkg update; opkg --force-depends install linux-firmware does not resolve my issue.

When I did run opkg --force-depends install linux-firmware, I did see the following error:

Collected errors: check_data_file_clashes: Package linux-firmware-rtl8188 wants to install file /lib/firmware/rtlwifi/rtl8188eufw.bin But that file is already provided by package linux-firmware-rtl8188eu

I have also confirmed that the LM006 dongle works by plugging it into my Ubuntu 18.04 laptop. Do you have any insight into why this is not working on the iMX6?

hi @justin.mcdowell

Have you done any changes to the files (local.conf, bblayers.conf, …) before compiling the angstrom-qt5-x11-image? If yes, could you share these changes?

Additionally could you flash regular Bsp image and check if your dongle is working?

Thanks and best regards, Jaski

I apologize, I should have thought through my u-boot changes before posting this question.

It is ok, this can happen.

Perfect, that the issue is solved. Thanks for the feedback.

Jaski, thanks for your quick response. It turns out my issue is caused by my change to the bootcmd u-boot environment variable in order to check if an upgrade package is available over USB before booting. When I changed back to the default u-boot environment, I no longer have an issue with the LM006 usb dongle.

I apologize, I should have thought through my u-boot changes before posting this question.

FWIW, my offending bootcmd was:

bootcmd=if test ${just_flashed} = 1; then setenv just_flashed 0; saveenv; else; usb start; if test -e usb 0:1 ${usb_flash_script}; then setenv just_flashed 1; saveenv; setenv interface usb; setenv drive 0; load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && source ${loadaddr}; run update; fi; fi; run emmcboot; echo; echo emmcboot failed; run distro_bootcmd; usb start; setenv stdout serial,vga; setenv stdin serial,usbkbd