Problems with LM006 on Apalis iMX6

Hello,

I have been having issues using the LM006 with the iMX6 running the OpenEmbedded Linux. I have seen my issues using the Apalis Evaluation board as well as the Ixora Carrier board. I have seen my issue running my own builds of the angstrom-qt5-x11-image image from the Apalis-iMX6_LXDE-Image_2.8b4.129-20181005 tag. I have also confirmed these issues are present on the following image from Toradex:
https://developer1.toradex.com/files/toradex-dev/uploads/media/Colibri/Linux/Images/old/Apalis-iMX6_LXDE-Image_2.8b3.111-20180626.tar.bz2

For this post, I’m describing exactly what I see using this Toradex image so that I am using something known.

First I confirm that I’m using the default u-boot environment:
Apalis iMX6 # env default -a
## Resetting to default environment
Apalis iMX6 # saveenv
Saving Environment to MMC…
Writing to MMC(0)… done
Apalis iMX6 #

Then I carry out an upgrade from the SD card of the Apalis-iMX6_LXDE-Image_2.8b3.111-20180626.tar.bz2 image. Once the update completes, I plug in the LM006 device and I see the following output indicating success:

root@apalis-imx6:~# [   99.604926] usb 1-1.1.1: new high-speed USB device number 4 using ci_hdrc
[  100.064736] usb 1-1.1.1: Vendor: Realtek
[  100.068758] usb 1-1.1.1: Product: 802.11n WLAN Adapter
[  100.073923] usb 1-1.1.1: rtl8192cu_parse_efuse: dumping efuse (0x80 bytes):
[  100.080958] usb 1-1.1.1: 00: 29 81 00 74 cd 00 00 00
[  100.085988] usb 1-1.1.1: 08: ff 00 da 0b 76 81 03 41
[  100.090990] usb 1-1.1.1: 10: 32 00 85 62 9e ad 34 c9
[  100.096059] usb 1-1.1.1: 18: f0 87 a8 3d 0a 03 52 65
[  100.101047] usb 1-1.1.1: 20: 61 6c 74 65 6b 00 16 03
[  100.106078] usb 1-1.1.1: 28: 38 30 32 2e 31 31 6e 20
[  100.111065] usb 1-1.1.1: 30: 57 4c 41 4e 20 41 64 61
[  100.116109] usb 1-1.1.1: 38: 70 74 65 72 00 00 00 00
[  100.121097] usb 1-1.1.1: 40: 00 00 00 00 00 00 00 00
[  100.126121] usb 1-1.1.1: 48: 00 00 00 00 00 00 00 00
[  100.131109] usb 1-1.1.1: 50: 00 00 00 00 00 00 00 00
[  100.136148] usb 1-1.1.1: 58: 06 00 2a 2a 2a 00 00 00
[  100.141135] usb 1-1.1.1: 60: 2a 2a 2a 00 00 00 00 00
[  100.146159] usb 1-1.1.1: 68: 00 00 00 00 04 04 04 00
[  100.151146] usb 1-1.1.1: 70: 00 00 00 00 00 02 00 00
[  100.156183] usb 1-1.1.1: 78: 10 00 00 00 36 00 81 00
[  100.161180] usb 1-1.1.1: RTL8188CU rev A (TSMC) 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[  100.169939] usb 1-1.1.1: RTL8188CU MAC: 34:c9:f0:87:a8:3d
[  100.175399] usb 1-1.1.1: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[  100.192681] usb 1-1.1.1: Firmware revision 80.0 (signature 0x88c1)
[  100.809381] usbcore: registered new interface driver rtl8xxxu
root@apalis-imx6:~# connmanctl enable wifi
[  147.219674] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Enabled wifi
root@apalis-imx6:~# [  149.661744] random: crng init done

root@apalis-imx6:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 34:C9:F0:87:A8:3D  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@apalis-imx6:~# 

So all good so far. Next I just do a reboot and this is where I see the failure. The LM006 has failed to initialize. Here is the relevant information from the boot log indicating the specific failure (interleaved with some other information from the boot):

[    8.571322] usb 1-1.1.1: Vendor: Realtek
[    8.581890] usb 1-1.1.1: Product: 802.11n WLAN Adapter
[    8.593797] usb 1-1.1.1: rtl8192cu_parse_efuse: dumping efuse (0x80 bytes):
[    8.607322] usb 1-1.1.1: 00: 29 81 00 74 cd 00 00 00
[    8.618622] usb 1-1.1.1: 08: ff 00 da 0b 76 81 03 41
[    8.630392] usb 1-1.1.1: 10: 32 00 85 62 9e ad 34 c9
[    8.641366] usb 1-1.1.1: 18: f0 87 a8 3d 0a 03 52 65
[    8.654280] usb 1-1.1.1: 20: 61 6c 74 65 6b 00 16 03
[    8.665644] usb 1-1.1.1: 28: 38 30 32 2e 31 31 6e 20
[    8.676611] usb 1-1.1.1: 30: 57 4c 41 4e 20 41 64 61
[    8.689459] usb 1-1.1.1: 38: 70 74 65 72 00 00 00 00
[    8.701393] usb 1-1.1.1: 40: 00 00 00 00 00 00 00 00
[    8.712577] usb 1-1.1.1: 48: 00 00 00 00 00 00 00 00
[    8.724308] usb 1-1.1.1: 50: 00 00 00 00 00 00 00 00
[    8.724316] usb 1-1.1.1: 58: 06 00 2a 2a 2a 00 00 00
[    8.724336] usb 1-1.1.1: 60: 2a 2a 2a 00 00 00 00 00
[    8.724355] usb 1-1.1.1: 68: 00 00 00 00 04 04 04 00
[    8.724369] usb 1-1.1.1: 70: 00 00 00 00 00 02 00 00
[    8.724386] usb 1-1.1.1: 78: 10 00 00 00 36 00 81 00
[    8.724418] usb 1-1.1.1: RTL8188CU rev A (TSMC) 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[    8.724428] usb 1-1.1.1: RTL8188CU MAC: 34:c9:f0:87:a8:3d
[    8.724436] usb 1-1.1.1: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[    8.965763] usb 1-1.1.1: Firmware revision 80.0 (signature 0x88c1)
[    9.020967] usb 1-1.1.1: rtl8xxxu_writeN: Failed to write block at addr: 1d80 size: 0080
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting RPC Bind Service...
[    9.176277] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[    9.187588] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[    9.188547] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
         Starting Telephony service...
[    9.234837] FAT-fs (mmcblk2p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[  OK  ] Reached target Containers.
         Starting Login Service...
[  OK  ] Started Timestamping service.
         Starting Avahi mDNS/DNS-SD Stack...
         Starting Save/Restore Sound Card State...
         Starting Load default USB gadget schema g1.schema...
[    9.431462] using random self ethernet address
[    9.440862] using random host ethernet address
[  OK  ] Started D-Bus System Message Bus.
[    9.526102] rtl8xxxu: probe of 1-1.1.1:1.0 failed with error -11
[    9.539496] usbcore: registered new interface driver rtl8xxxu
[  OK  ] Started Telephony service.
[    9.684379] Bluetooth: Core ver 2.22
[    9.693212] NET: Registered protocol family 31
[    9.702684] Bluetooth: HCI device and connection manager initialized
[    9.704419] Bluetooth: HCI socket layer initialized
[    9.704429] Bluetooth: L2CAP socket layer initialized
[    9.704482] Bluetooth: SCO socket layer initialized
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
         Starting Connection service...
[  OK  ] Started RPC Bind Service.
[  OK  ] Started Save/Restore Sound Card State.
[  OK  ] Started Connection service.
[   10.054971] Micrel KSZ9031 Gigabit PHY 2188000.ethernet-1:07: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet-1:07, irq=122)
[   10.055166] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   10.056837] usb0: HOST MAC 00:14:2d:ff:ff:fe
[   10.057134] usb0: MAC 00:14:2d:ff:ff:ff

This problem has not been perfectly consistent across different images but I can always reproduce it in some way. I describe this 2.8.3 image in order to show that there is a problem on something that you can reproduce. On my own build of the 2.8b4 Qt5 image, the problem seems even worse in that I usually can not even get the LM006 to initialize properly by unplugging and plugging it back in after I see this failure. But on this 2.8.3 LXDE image, after the initial failure to initialize on boot, I can then unplug it and plug it back in and it usually initiallizes properly. However, either way it is definitely expected that we can leave the device plugged in across reboots and power cycles and still use WiFi.

Are you also experiencing this issue on the iMX6? If not, do you have any ideas of what could be different with my setup?

As a side note, I had previously asked this question and I thought I was causing it due to my use of usb from u-boot. However, I have been able to show that I still can produce an issue with an unmodified u-boot and u-boot environment.

hi @justin.mcdowell

Thanks for reporting the issue. Could you flash the 2.8b4 image and check if you have the same issue?
BSP 2.8b3 is supported any more. Please check our Bsp Support Policy here.

Thanks and best regards, Jaski

Thanks. I shoul be able to try with 2.8b4 tomorrow.

I tried today with 2.8b4. Again, I first ensured the u-boot had it’s default environment:

Apalis iMX6 # env default -a
## Resetting to default environment
Apalis iMX6 # saveenv 
Saving Environment to MMC...
Writing to MMC(0)... done
Apalis iMX6 #

Then I used “run setupdate” and “run update” to update from the SD card to 2.8b4.

Then I plugged in and unplugged the WiFi device a few times successfully getting output like this:

root@apalis-imx6:~# [  140.902795] usb 2-1.2: new high-speed USB device number 3 using ci_hdrc
[  141.141230] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[  141.156244] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[  141.163714] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[  141.172365] platform regulatory.0: Falling back to user helper
[  141.182008] cfg80211: failed to load regulatory.db
[  141.365763] usb 2-1.2: Vendor: Realtek
[  141.369530] usb 2-1.2: Product: 802.11n WLAN Adapter
[  141.374545] usb 2-1.2: rtl8192cu_parse_efuse: dumping efuse (0x80 bytes):
[  141.381344] usb 2-1.2: 00: 29 81 00 74 cd 00 00 00
[  141.386170] usb 2-1.2: 08: ff 00 da 0b 76 81 03 41
[  141.390980] usb 2-1.2: 10: 32 00 85 62 9e ad 34 c9
[  141.395805] usb 2-1.2: 18: f0 87 a8 3d 0a 03 52 65
[  141.400604] usb 2-1.2: 20: 61 6c 74 65 6b 00 16 03
[  141.405422] usb 2-1.2: 28: 38 30 32 2e 31 31 6e 20
[  141.410224] usb 2-1.2: 30: 57 4c 41 4e 20 41 64 61
[  141.415038] usb 2-1.2: 38: 70 74 65 72 00 00 00 00
[  141.419837] usb 2-1.2: 40: 00 00 00 00 00 00 00 00
[  141.424660] usb 2-1.2: 48: 00 00 00 00 00 00 00 00
[  141.429459] usb 2-1.2: 50: 00 00 00 00 00 00 00 00
[  141.434274] usb 2-1.2: 58: 06 00 2a 2a 2a 00 00 00
[  141.439073] usb 2-1.2: 60: 2a 2a 2a 00 00 00 00 00
[  141.443885] usb 2-1.2: 68: 00 00 00 00 04 04 04 00
[  141.448684] usb 2-1.2: 70: 00 00 00 00 00 02 00 00
[  141.453508] usb 2-1.2: 78: 10 00 00 00 36 00 81 00
[  141.458313] usb 2-1.2: RTL8188CU rev A (TSMC) 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[  141.466863] usb 2-1.2: RTL8188CU MAC: 34:c9:f0:87:a8:3d
[  141.472096] usb 2-1.2: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[  141.488541] usb 2-1.2: Firmware revision 80.0 (signature 0x88c1)
[  142.101231] usbcore: registered new interface driver rtl8xxxu
[  142.128412] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

And finally, I did a reboot with the WiFi device still connected and confirmed that I still see the error as shown in the console output on boot (mixed in with other output):

[    8.868015] usb 2-1.2: Vendor: Realtek
[    8.880024] usb 2-1.2: Product: 802.11n WLAN Adapter
[    8.892814] usb 2-1.2: rtl8192cu_parse_efuse: dumping efuse (0x80 bytes):
[    8.906813] usb 2-1.2: 00: 29 81 00 74 cd 00 00 00
[    8.918820] usb 2-1.2: 08: ff 00 da 0b 76 81 03 41
[    8.930745] usb 2-1.2: 10: 32 00 85 62 9e ad 34 c9
[    8.942801] usb 2-1.2: 18: f0 87 a8 3d 0a 03 52 65
[    8.954206] usb 2-1.2: 20: 61 6c 74 65 6b 00 16 03
[    8.966631] usb 2-1.2: 28: 38 30 32 2e 31 31 6e 20
[    8.979564] usb 2-1.2: 30: 57 4c 41 4e 20 41 64 61
[    8.991792] usb 2-1.2: 38: 70 74 65 72 00 00 00 00
[    9.003382] usb 2-1.2: 40: 00 00 00 00 00 00 00 00
[    9.015021] usb 2-1.2: 48: 00 00 00 00 00 00 00 00
[    9.026144] usb 2-1.2: 50: 00 00 00 00 00 00 00 00
[    9.038242] usb 2-1.2: 58: 06 00 2a 2a 2a 00 00 00
[    9.049314] usb 2-1.2: 60: 2a 2a 2a 00 00 00 00 00
[    9.060277] usb 2-1.2: 68: 00 00 00 00 04 04 04 00
[    9.071212] usb 2-1.2: 70: 00 00 00 00 00 02 00 00
[    9.082069] usb 2-1.2: 78: 10 00 00 00 36 00 81 00
[    9.092935] usb 2-1.2: RTL8188CU rev A (TSMC) 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[    9.108082] usb 2-1.2: RTL8188CU MAC: 34:c9:f0:87:a8:3d
[    9.118990] usb 2-1.2: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[    9.150346] usb 2-1.2: Firmware revision 80.0 (signature 0x88c1)
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[    9.195442] usb 2-1.2: rtl8xxxu_writeN: Failed to write block at addr: 1480 size: 0080
         Starting Connection service...
[    9.261580] Bluetooth: Core ver 2.22
[    9.268871] cfg80211: failed to load regulatory.db
[    9.276673] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[    9.283230] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[    9.286195] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[  OK  ] Started Save/Restore Sound Card State.
[    9.330066] NET: Registered protocol family 31
[    9.341561] Bluetooth: HCI device and connection manager initialized
[    9.358932] Bluetooth: HCI socket layer initialized
[    9.358950] Bluetooth: L2CAP socket layer initialized
[    9.359013] Bluetooth: SCO socket layer initialized
[  OK  ] Started RPC Bind Service.
[    9.510926] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    9.529974] usb0: HOST MAC 00:14:2d:ff:ff:fe
[    9.540022] usb0: MAC 00:14:2d:ff:ff:ff
[  OK  ] Started Load default USB gadget schema g1.schema.
[    9.620429] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    9.746009] rtl8xxxu: probe of 2-1.2:1.0 failed with error -11

Note: This test was run on my Ixora V1.1A carrier board whereas my previous test was run on my Apalis Evaluation Board V1.1A. It doesn’t matter because I’m seeing the same behavior on both. I just happen to have a TK1 module in my Apalis Evaluation board right now for development on a different project…

Hi, Thanks for the dmesg log. So If I understand you correctly, then the dongle is working fine at the first (cold) boot, but not after reboot. Could you check if the behaviour is the same, when you do Soft or Hard reboot?

Yes, I see the failure on hard reboots as well as soft (and same logs). It doesn’t happen 100% of the time. I have seen the occasional success after reboot. But the failure is much more common.

Thanks for the Information. We will look into this issue and come this Friday back to you.

hi

we analysed your issue. The root cause is that when the module is reset (reboot), then the USB Power Supply is not turned off. You should ensure, when the module is reset, that the USB Power Supply is turned off and on again.

Thanks for looking into this issue. Sorry for my delayed response as I was on vacation the last few days.

Unfortunately, I believe that the USB Power Supply being turned off when the module is reset is not actually this issue. I say this because I can reproduce this problem on boot if I do the following:

  • power off the board
  • disconnect power (and all other peripherals)
  • wait a minute
  • reconnect just power and the LM006
  • Power on the board
  • Then connect the serial console and confirm the same issue occurred in dmesg

Also:

  • if I plug in the LM006 within a couple of seconds of pressing the power button (Right when I see the “Starting Kernel …” message), I usually experience the issue.
  • If I plug in the LM006 after I see the “apalis-imx6 login:” prompt, I have not seen the issue.
  • Even if I do a soft reboot, but then unplug the LM006 module right after typing reboot and then I wait until I see the “apalis-imx6 loging:” prompt before I plug it back in, I have not seen the issue.

So it appears to me that this issue is independent of any components on the board having power while the module is rebooted but instead dependent on whether or not the module is inserted when the kernel is booting up.

And finally, I have also purchased the LM816 from the Toradex store and can confirm the same type of behavior (though the log messages are a little different…)

Please let me know if you think that I am misunderstanding something or if you have a way to resolve this issue.

hi @justin.mcdowell

Thanks for this Information.

We did further tests and find out that this issue is only present on the IT version of Apalis iMX6. LM006 and LM816 work just fine on the other modules even after hard or soft reboot.

We are working to find out the rootcause of the issue.

OK, thanks.

Just to follow up, we ordered a couple of Non-IT versions of the Apalis iMX6 and after some initial testing, the LM006 appears to be working as expected. This is in accordance with what you had found in your testing as well.

For now, the Non-IT versions will keep us going but I’d still be interested if you are able to find the root cause on the IT version of the Apalis iMX6.

Thanks.

Hi @justin.mcdowell

Thanks for buying the Non-IT samples of Apalis iMX6. I discussed this issue internally and I have some questions and information.

  • Is it OK for you to work with Non-IT modules?
  • Do you want to use the dongle LM816 in the Final Product?

Unfortunately we will not have time in near future to check for this Issue.

Best regards, Jaski

Hi @justin.mcdowell, Could you answer my questions, please?

I apologize, I don’t know how I missed your previous questions. I had seen a response that indicated you were anticipating a fix in the 2019 Q1 release but had missed the notification for this latest.

Anyway, we are at least OK for right now with Non-IT modules. I have reached out to my project lead so that I can provide an answer to your questions.

Hi, no need to apologize. Let us know once you got the Information.

Hi @justin.mcdowell: Do you have any News about the Issue?

Hi,
Thanks for the Information.

when we move to an SDIO wifi solution

Regarding SDIO wifi solution, for higher communication speeds (> 200Mbit), you should check that you choose a dongle which can work at higher speed with 3.3V since Apalis iMX6 cannot switch to 1.8V. Check this for further Information.

Best regards,
Jaski

We do not plan to use the LM816 dongle in the Final Product, and it is OK for us to use the Non-IT module for this stage in our development even if we switch to the IT version at a later stage when we move to an SDIO wifi solution.
Thanks.