Jump to content

Problems with the RTL8192cu driver


Go to solution Solved by Igor,

Recommended Posts

Posted

First of all: yes, I'd read phelums "Compiling RTL8189es driver" thread. If where was a solution for his thread, I didn't get it.
I'm using a BPi M1, installed downloaded image (Armbian_21.05.1_Bananapi_buster_current_5.10.34.img) switched 5.10.43, updated "Firmware" and boot loader.

 

uname -a
Linux bananapi 5.10.43-sunxi #21.05.6 SMP Mon Jun 21 15:07:45 UTC 2021 armv7l GNU/Linux

 

First I installed and configured openvpn, the next step would be wifi, so plugged in my wireless adapter:

 

root@bananapi:~# lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

noticed having a RTL8188CUS, so the I should be fine with RTL8192C driver.

 

Then I unplugged the device and followed the instructions given in https://docs.armbian.com/User-Guide_Advanced-Features/

 

build console output

Spoiler

root@bananapi:~/rtl8192cu-fixes# make ARCH=arm
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.10.43-sunxi/build M=/root/rtl8192cu-fixes  modules
make[1]: Verzeichnis „/usr/src/linux-headers-5.10.43-sunxi“ wird betreten
  CC [M]  /root/rtl8192cu-fixes/core/rtw_cmd.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_security.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_debug.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_io.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_ioctl_query.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_ioctl_set.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_ieee80211.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_mlme.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_mlme_ext.o
/root/rtl8192cu-fixes/core/rtw_mlme_ext.c: In function ‘mgt_dispatcher’:
/root/rtl8192cu-fixes/core/rtw_mlme_ext.c:734:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
      ^
/root/rtl8192cu-fixes/core/rtw_mlme_ext.c:739:3: note: here
   case WIFI_ASSOCREQ:
   ^~~~
  CC [M]  /root/rtl8192cu-fixes/core/rtw_wlan_util.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_pwrctrl.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_rf.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_recv.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_sta_mgt.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_ap.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_xmit.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_p2p.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_tdls.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_br_ext.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_iol.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_sreset.o
  CC [M]  /root/rtl8192cu-fixes/core/efuse/rtw_efuse.o
  CC [M]  /root/rtl8192cu-fixes/hal/hal_intf.o
  CC [M]  /root/rtl8192cu-fixes/hal/hal_com.o
  CC [M]  /root/rtl8192cu-fixes/hal/dm.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_hal_init.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_phycfg.o
/root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_phycfg.c: In function ‘phy_TxPwrIdxToDbm’:
/root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_phycfg.c:2365:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
   Offset = -8;
   ~~~~~~~^~~~
/root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_phycfg.c:2366:2: note: here
  default:
  ^~~~~~~
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_dm.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rxdesc.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_cmd.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/usb_halinit.o
/root/rtl8192cu-fixes/hal/rtl8192c/usb/usb_halinit.c: In function ‘GetHwReg8192CU’:
/root/rtl8192cu-fixes/hal/rtl8192c/usb/usb_halinit.c:5694:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
    *((u16 *)(val)) = pHalData->BasicRateSet;
    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/root/rtl8192cu-fixes/hal/rtl8192c/usb/usb_halinit.c:5695:3: note: here
   case HW_VAR_TXPAUSE:
   ^~~~
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_led.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_xmit.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_recv.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/usb_ops_linux.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_sreset.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_xmit.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/Hal8192CUHWImg.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/osdep_service.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/os_intfs.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/usb_intf.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/usb_ops_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/ioctl_linux.o
/root/rtl8192cu-fixes/os_dep/linux/ioctl_linux.c: In function ‘set_group_key’:
/root/rtl8192cu-fixes/os_dep/linux/ioctl_linux.c:7384:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    keylen = 16;
    ~~~~~~~^~~~
/root/rtl8192cu-fixes/os_dep/linux/ioctl_linux.c:7385:3: note: here
   default:
   ^~~~~~~
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/xmit_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/mlme_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/recv_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/rtw_android.o
  LD [M]  /root/rtl8192cu-fixes/8192cu.o
  MODPOST /root/rtl8192cu-fixes/Module.symvers
  CC [M]  /root/rtl8192cu-fixes/8192cu.mod.o
  LD [M]  /root/rtl8192cu-fixes/8192cu.ko
make[1]: Verzeichnis „/usr/src/linux-headers-5.10.43-sunxi“ wird verlassen
root@bananapi:~/rtl8192cu-fixes#

 

dmesg out:

Spoiler

[   12.071053] usbcore: registered new interface driver rtl8192cu
[   12.114133] systemd[1]: Starting Load/Save RF Kill Switch Status...
[   12.118443] rtl8192cu 3-1:1.0 wlx74da387ed9f9: renamed from wlan0
[   12.188176] input: Logitech K330 as /devices/platform/soc/1c14400.usb/usb4/4-1/4-1:1.2/0003:046D:C52B.0003/0003:046D:4016.0005/input/input22
[   12.194284] logitech-hidpp-device 0003:046D:4016.0005: input,hidraw2: USB HID v1.11 Keyboard [Logitech K330] on usb-1c14400.usb-1/input2:2
[   12.203607] systemd[1]: Started Load/Save RF Kill Switch Status.

[   12.228655] input: Logitech M215 2nd Gen as /devices/platform/soc/1c14400.usb/usb4/4-1/4-1:1.2/0003:046D:C52B.0003/0003:046D:401B.0006/input/input23
[   12.232484] logitech-hidpp-device 0003:046D:401B.0006: input,hidraw3: USB HID v1.11 Mouse [Logitech M215 2nd Gen] on usb-1c14400.usb-1/input2:3
[   14.138414] systemd[1]: Started Armbian ZRAM config.
[   14.319923] EXT4-fs (zram1): mounted filesystem without journal. Opts: discard
[   14.319989] ext4 filesystem being mounted at /var/log supports timestamps until 2038 (0x7fffffff)
[   17.212735] systemd[1]: systemd-rfkill.service: Succeeded.
[   18.926637] systemd[1]: Started Armbian memory supported logging.
[   18.949826] systemd[1]: Starting Journal Service...
[   19.349752] systemd[1]: Started Journal Service.
[   19.480825] systemd-journald[539]: Received request to flush runtime journal from PID 1
[   20.554084] random: crng init done
[   20.554099] random: 7 urandom warning(s) missed due to ratelimiting
[   27.031269] sun7i-dwmac 1c50000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8211E Gigabit Ethernet] (irq=POLL)
[   27.035080] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
[   27.035112] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[   27.035128] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[   27.035140] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[   27.042235] sun7i-dwmac 1c50000.ethernet eth0: configuring for phy/rgmii-id link mode
[   27.350402] rtl8192cu: MAC auto ON okay!
[   27.389895] rtl8192cu: Tx queue select: 0x05
[   28.594389] rtl8192c_common: Polling FW ready fail! REG_MCUFWDL:0x00030006.
[   28.594406] rtl8192c_common: Firmware is not ready to run!
[   33.770751] vcc3v0: disabling
[   33.770778] vcc5v0: disabling
[   33.770907] usb0-vbus: disabling

 

root@bananapi:~/rtl8192cu-fixes# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

tun0      no wireless extensions.

wlx74da387ed9f9  IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off

 

At this point, as a newbie, I have to give up and ask the community what I've done wrong and how to fix the mess. I attach the original Linux driver source, found the driver cd, which came along with the adapter.

rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911.tar.gz

Posted
5 hours ago, Elric said:

Bus 003 Device 003: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
noticed having a RTL8188CUS, so the I should be fine with RTL8192C driver.

Then I unplugged the device and followed the instructions given in https://docs.armbian.com/User-Guide_Advanced-Features/

 

but WHY do you want to compile the WiFi-Driver when already a working one is included in armbian?

The EW-7811Un is one of my oldest WiFi-Dongles from the beginning of the Raspberry Pi 1 Area, because it was one of the first working Donges on a RPi1

 

When I do insert my Edimax - I get it listed in lsusb, get the firmware loaded in dmesg and do get a new wlan-device (wlan0/wlan1 depending on the SBC) which is normally useable:
 

lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


dmesg
[234675.296067] usb 1-1: new high-speed USB device number 2 using ehci-platform
[234675.458033] usb 1-1: New USB device found, idVendor=7392, idProduct=7811, bcdDevice= 2.00
[234675.458084] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[234675.458099] usb 1-1: Product: 802.11n WLAN Adapter
[234675.458112] usb 1-1: Manufacturer: Realtek
[234675.458124] usb 1-1: SerialNumber: 00e04c000001
[234675.612830] rtl8192cu: Chip version 0x10
[234675.719057] rtl8192cu: Board Type 0
[234675.719387] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[234675.719571] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[234675.719739] ieee80211 phy1: Selected rate control algorithm 'rtl_rc'
[234675.723064] usbcore: registered new interface driver rtl8192cu
[234675.755713] usbcore: registered new interface driver rtl8xxxu
[234675.816426] rtl8192cu: MAC auto ON okay!
[234675.855924] rtl8192cu: Tx queue select: 0x05

ifconfig
wlan1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 74:da:38:0e:3c:1a  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

Posted

@guidolThank you once again for reading and answering. Since the problem "receiver" booting problem, I have 3 different sdcards in use (all 5.10.43), 2 Buster trying setting something up like an "VPN Access Point" and 1 focal for testing desktop environments and XRDP. With your kindly provided output of your lsusb and dmesg I started today the "focal" sdcard. Nothing else is installed on focal, just plain OS, no openvpn and no further experiments. Here is the output of my "focal" with plugged-in Edimax.

 

root@deskpi:/# lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

root@deskpi:/# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlx74da387ed9f9  IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off

 

Here is dmesg output:
 

Spoiler

[   13.141847] usb 3-1: new high-speed USB device number 2 using ehci-platform
[   13.303056] usb 3-1: New USB device found, idVendor=7392, idProduct=7811, bcdDevice= 2.00
[   13.303077] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   13.303086] usb 3-1: Product: 802.11n WLAN Adapter
[   13.303094] usb 3-1: Manufacturer: Realtek
[   13.303102] usb 3-1: SerialNumber: 00e04c000001

.

.

[   15.322158] rtl8192cu: Chip version 0x10
[   15.527019] rtl8192cu: Board Type 0
[   15.527231] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   15.527336] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   15.527599] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   15.534999] usbcore: registered new interface driver rtl8192cu

.

.

[   15.605618] rtl8192cu 3-1:1.0 wlx74da387ed9f9: renamed from wlan0

.

[   35.966781] rtl8192cu: MAC auto ON okay!
[   36.022861] rtl8192cu: Tx queue select: 0x05

.

.

[  195.894507] usb 3-1: USB disconnect, device number 2
[  195.911928] rtl_usb: reg 0x102, usbctrl_vendorreq TimeOut! status:0xffffffed value=0x83040000
[  195.927650] rtl_usb: reg 0x422, usbctrl_vendorreq TimeOut! status:0xffffffed value=0x0
[  195.942754] rtl_usb: reg 0x542, usbctrl_vendorreq TimeOut! status:0xffffffed value=0x4d5
[  195.958170] rtl_usb: reg 0x102, usbctrl_vendorreq TimeOut! status:0xffffffed value=0x390282a
[  198.811368] usb 4-1: USB disconnect, device number 2
[  213.225127] usb 2-1: new high-speed USB device number 3 using ehci-platform
[  213.462247] usb 2-1: New USB device found, idVendor=7392, idProduct=7811, bcdDevice= 2.00
[  213.462261] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  213.462270] usb 2-1: Product: 802.11n WLAN Adapter
[  213.462277] usb 2-1: Manufacturer: Realtek
[  213.462285] usb 2-1: SerialNumber: 00e04c000001
[  213.463805] rtl8192cu: Chip version 0x10
[  213.562136] rtl8192cu: Board Type 0
[  213.562352] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[  213.562472] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[  213.562570] ieee80211 phy1: Selected rate control algorithm 'rtl_rc'
[  213.657825] rtl8192cu 2-1:1.0 wlx74da387ed9f9: renamed from wlan0
[  213.874987] rtl8192cu: MAC auto ON okay!
[  213.910881] rtl8192cu: Tx queue select: 0x05

 

 

On this point in "Buster" image, I decided to compile wlan driver:D, following the given advice in the HOW-TO. Even the example driver is the one I need....
I hope this answers your question, WHY I recompiled the driver. I'm a newbie, but not such a newbie, that "wlx74da387ed9f9" could be a valid network name.

Posted

@Igor Thanks you for the information.

So, how it looks like: I am newbie, thinking that the first plugged-in device has to be wlan0. But now I got it: wlx<MACADRESS> is valid network name. Recompiling was useless.

Thank you for your help!

Posted
21 minutes ago, Elric said:

Recompiling was useless.


Also for other reason. We keep well known and those a bit less known wireless drivers in best possible shape and bundled with kernels we provide. In theory - users should not need to compile exotic drivers that Linux doesn't support (well enough) on their own, but all dependencies are ready (kernel headers, compilers) - so you can. For things we don't cover, can't bundle (zfs) or for experimenting ...

 

23 minutes ago, Elric said:

So, how it looks like: I am newbie


We all are :rolleyes:

 

It is impossible to know everything, especially in this tech world full of complicated details.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines