WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore 15 armhf : rtl8xxxu does not load firmware  (Read 358 times)

Online ovacikar

  • Jr. Member
  • **
  • Posts: 67
piCore 15 armhf : rtl8xxxu does not load firmware
« on: December 18, 2024, 11:58:58 AM »
I wanted to replace problematic rtl8192cu driver with rtl8xxxu driver, compiled it as a module and realized this release already comes with rtl8xxxu driver, but I cannot get the built-in module to load the required firmware. What am I doing wrong?

Dmesg with native module loaded, I removed and reconnected the dongle:

Code: [Select]
[  245.781729] usb 1-1.2: USB disconnect, device number 4
[  251.712573] usb 1-1.2: new high-speed USB device number 6 using dwc_otg
[  251.844517] usb 1-1.2: New USB device found, idVendor=7392, idProduct=7811, bcdDevice= 2.00
[  251.844573] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  251.844598] usb 1-1.2: Product: 802.11n WLAN Adapter
[  251.844619] usb 1-1.2: Manufacturer: Realtek
[  251.844639] usb 1-1.2: SerialNumber: redacted
[  315.681401] usbcore: deregistering interface driver rtl8xxxu


Module                  Size  Used by    Tainted: G
rtl8xxxu              184320  0

Then I removed the module, loaded my compiled .ko file  removed and reinserted the dongle and it loaded firmware and wifi.sh worked as expected.

Code: [Select]
[ 1019.844554] usb 1-1.2: New USB device found, idVendor=7392, idProduct=7811, bcdDevice= 2.00
[ 1019.844616] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1019.844641] usb 1-1.2: Product: 802.11n WLAN Adapter
[ 1019.844662] usb 1-1.2: Manufacturer: Realtek
[ 1019.844680] usb 1-1.2: SerialNumber: redacted
[ 1020.099310] usb 1-1.2: RTL8188CU rev A (TSMC) romver 0, 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[ 1020.099380] usb 1-1.2: RTL8188CU MAC: redacted
[ 1020.099409] usb 1-1.2: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[ 1020.099860] usb 1-1.2: Firmware revision 88.2 (signature 0x88c1)

Module                  Size  Used by    Tainted: G
rtl8xxxu              188416  0

Is there something wrong with the native rtl8xxxu module?
« Last Edit: December 18, 2024, 12:01:05 PM by ovacikar »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1286
Re: piCore 15 armhf : rtl8xxxu does not load firmware
« Reply #1 on: December 18, 2024, 03:07:53 PM »
The driver is responsible to load the firmware.  But if I recall the 8192cu driver will fail silently if the firmware is not present when it tries to load it.  Are you 100% sure the firmware is loaded before or at the exact same time as you are loading wireless-KERNEL.tcz?    Where did you get the source to build the driver?

Online ovacikar

  • Jr. Member
  • **
  • Posts: 67
Re: piCore 15 armhf : rtl8xxxu does not load firmware
« Reply #2 on: December 18, 2024, 04:16:29 PM »
Hi Paul

The non-working rtl8xxxu driver was included in wireless-6.6.47-piCore.tcz extension:
Code: [Select]
http://www.tinycorelinux.net/15.x/armhf/tcz/wireless-6.6.47-piCore.tcz.list
usr/local/lib/modules/6.6.47-piCore/kernel/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko

Also load the firmware-rtlwifi.tcz , but blocked the rtl8192cu in bootcode

Code: [Select]
http://www.tinycorelinux.net/15.x/armhf/tcz/firmware-rtlwifi.tcz.list

lib/firmware/rtlwifi/rtl8192cufw_TMSC.bin

The one I compiled is just the experimental module indluded in picore kernel source:

Code: [Select]
http://tinycorelinux.net/15.x/armhf/releases/RPi/src/kernel/rpi-linux-6.6.47.tar.xz

tc@picore:/mnt/mmcblk0p2/tce/compile/rpi-linux-6.6.47$ grep 8XXXU  .config
CONFIG_RTL8XXXU=m
CONFIG_RTL8XXXU_UNTESTED=y


I am loading and unloading modules manually from command line, so the firmware should be there in both cases.
« Last Edit: December 18, 2024, 04:41:06 PM by ovacikar »

Online ovacikar

  • Jr. Member
  • **
  • Posts: 67
Re: piCore 15 armhf : rtl8xxxu does not load firmware
« Reply #3 on: December 18, 2024, 04:25:02 PM »
Let me back up this sd card to disk later tonight and do a fresh install. My plan is:

1- Blacklist rtl8192cu in bootcode, reboot
2- install firmware-rtlwifi.tcz ,
3- install wireless-tools, that also installs wireless-6.6.47-piCore.tcz as dependency.
4- make sure firmware-rtlwifi.tcz is on top in onboot.lst
5- reboot
« Last Edit: December 18, 2024, 04:38:48 PM by ovacikar »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1286
Re: piCore 15 armhf : rtl8xxxu does not load firmware
« Reply #4 on: December 18, 2024, 04:38:55 PM »
Looking at the kernel source code the Config parameter CONFIG_RTL8XXXU_UNTESTED=y is enables quite a bit of code for the 8192cu in the 8xxxu driver.   So most certainly the driver 8xxxu driver compiled in the piCore wireless extension is not going to do what you want.  We do not typically include untested config settings.

https://github.com/raspberrypi/linux/blob/rpi-6.6.y/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c

It appears to still be marked as untested in kernel 6.12.y as well.

Online ovacikar

  • Jr. Member
  • **
  • Posts: 67
Re: piCore 15 armhf : rtl8xxxu does not load firmware
« Reply #5 on: December 18, 2024, 04:53:01 PM »
Ah good to know, I'll try a fresh install as outlined above later . Thanks for the heads up. If I cannot get the native module to work, I try recompiling without the experimental stuff.

Online ovacikar

  • Jr. Member
  • **
  • Posts: 67
Re: piCore 15 armhf : rtl8xxxu does not load firmware
« Reply #6 on: December 18, 2024, 05:25:48 PM »
Fresh install, rtl8xxxu module is doing nothing still. What is the correct order of the modules I need to load, does rtl8xxxu need rtlwifi and rtl_usb ?

Code: [Select]
[    0.000000] Kernel command line: coherent_pool=1M snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0xec00000 vc_mem.mem_size=0x10000000  blacklist=rtl8192cu  zswap.compressor=lz4 zswap.zpool=z3fold dwc_otg.fiq_fsm_mask=0xF dwc_otg.lpm_enable=0 console=tty1 root=/dev/ram0 rootwait quiet nortc loglevel=3 noembed
Code: [Select]
tc@box:~$ lsmod
Module                  Size  Used by    Not tainted
rtl8xxxu              184320  0
mac80211              929792  1 rtl8xxxu
libarc4                12288  1 mac80211
cfg80211              860160  2 rtl8xxxu,mac80211
rfkill                 28672  1 cfg80211
squashfs               49152 12
raspberrypi_hwmon      12288  0
raspberrypi_gpiomem    12288  0
zram                   28672  2
zsmalloc               24576  1 zram


tc@box:~$ cat /mnt/mmcblk0p2/tce/onboot.lst
openssh.tcz
firmware-rtlwifi.tcz
wifi.tcz


sudo modprobe -v -s  rtl8xxxu



« Last Edit: December 18, 2024, 05:33:40 PM by ovacikar »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1286
Re: piCore 15 armhf : rtl8xxxu does not load firmware
« Reply #7 on: December 18, 2024, 07:26:16 PM »
No, the order you listed is fine.  The 8xxxu driver included with piCore is not going to work.  Since you want the experimental drivers.

Online ovacikar

  • Jr. Member
  • **
  • Posts: 67
Re: piCore 15 armhf : rtl8xxxu does not load firmware
« Reply #8 on: December 18, 2024, 07:33:20 PM »
That makes sense. In picore build it does not detect my "idVendor=7392, idProduct=7811" string as a match for the driver. But the build with experimental flag does.

Anyways I will give the compiled untested module a try during my next travel. If it also fails in mesh networks, happy to stay with picore12 as well.

Thanks for the clarification.
« Last Edit: December 18, 2024, 07:52:53 PM by ovacikar »