brektrou / rtl8821CU

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
GNU General Public License v2.0
1.59k stars 460 forks source link

Looking for a driver for rtl8811cu #77

Open jkoenig72 opened 4 years ago

jkoenig72 commented 4 years ago

Hi,

I ttried a few github repos so far - still no luck. Anyone get those china based usb sticks working. They support both 2.4 /5 Ghz. Sadly so far I do not get them working on raspi.

Chip says rtl8811cu.

Any way to get that working. Whatever driver I tried - it never show up an wlan0 ...

Thanks! Joerg

jkoenig72 commented 4 years ago

IMG_20200823_105214

Skallwar commented 4 years ago

have the same one. This driver is working for me but on Arch linux for x86_64 (5.8.3)

AverageMaker commented 3 years ago

Have you tried this repo @jkoenig72 ?

FYI Raspberry Pi updated their kernel to 5.4.51 on 20th August and I'm struggling to find a driver that works with that kernel. If you download the older version of the Raspberry Pi OS (with kernel 4.19.118 - here) it works with the whitebatman2 repo

tjoepies commented 3 years ago

I have the same problem on Arch Linux Arm Linux tjoepie 5.4.73-1-ARCH #1 SMP PREEMPT Thu Oct 29 15:26:36 UTC 2020 armv7l GNU/Linux. As soon as I plug in the usb device on the newer kernel. I get this:

Nov 04 22:17:35 tjoepie kernel: 8821cu: loading out-of-tree module taints kernel.
Nov 04 22:17:35 tjoepie kernel: RTW: module init start
Nov 04 22:17:35 tjoepie kernel: RTW: rtl8821cu v5.4.1_28754.20180921_COEX20180712-3232
Nov 04 22:17:35 tjoepie kernel: RTW: build time: Nov  4 2020 22:05:54
Nov 04 22:17:35 tjoepie kernel: RTW: rtl8821cu BT-Coex version = COEX20180712-3232
Nov 04 22:17:35 tjoepie kernel: usbcore: registered new interface driver rtl8821cu
Nov 04 22:17:35 tjoepie kernel: RTW: module init ret=0
Nov 04 22:17:57 tjoepie kernel: usb 1-1.2.3: new high-speed USB device number 7 using dwc_otg
Nov 04 22:17:57 tjoepie kernel: usb 1-1.2.3: New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.00
Nov 04 22:17:57 tjoepie kernel: usb 1-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 04 22:17:57 tjoepie kernel: usb 1-1.2.3: Product: 802.11ac NIC
Nov 04 22:17:57 tjoepie kernel: usb 1-1.2.3: Manufacturer: Realtek
Nov 04 22:17:57 tjoepie kernel: usb 1-1.2.3: SerialNumber: 123456
Nov 04 22:17:57 tjoepie kernel: RTW: [HALMAC]11692M
                           HALMAC_MAJOR_VER = 1
                           HALMAC_PROTOTYPE_VER = 4
                           HALMAC_MINOR_VER = 19
                           HALMAC_PATCH_VER = 3
Nov 04 22:17:57 tjoepie kernel: RTW: ERROR [HALMAC][ERR]Dump efuse in suspend
Nov 04 22:17:57 tjoepie kernel: RTW: HW EFUSE
Nov 04 22:17:57 tjoepie kernel: RTW: 0x000: 29 81 00 BC  09 00 21 00  6E 04 A4 10  10 00 30 0B
Nov 04 22:17:57 tjoepie kernel: RTW: 0x010: FF FF FF FF  FF FF FF FF  FF FF FF 02  FF FF FF FF
Nov 04 22:17:57 tjoepie kernel: RTW: 0x020: FF FF 28 28  28 28 28 28  28 28 28 28  28 28 28 28
Nov 04 22:17:57 tjoepie kernel: RTW: 0x030: 02 FF FF FF  FF FF EC FF  FF FF 2B 2B  2B 2B 2B 2B
Nov 04 22:17:58 tjoepie kernel: RTW: 0x040: 30 30 30 30  30 33 FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x050: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x060: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x070: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x080: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x090: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x0A0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x0B0: FF FF FF FF  FF FF FF FF  7F 06 20 00  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x0C0: FF 01 00 41  00 00 00 00  00 FF 22 FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x0D0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x0E0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x0F0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x100: DA 0B 11 C8  E3 46 02 1C  BF CE 22 66  15 09 03 52
Nov 04 22:17:58 tjoepie kernel: RTW: 0x110: 65 61 6C 74  65 6B 0E 03  38 30 32 2E  31 31 61 63
Nov 04 22:17:58 tjoepie kernel: RTW: 0x120: 20 4E 49 43  08 03 31 32  33 34 35 36  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x130: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x140: FF FF FF FF  00 00 31 0F  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x150: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x160: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x170: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x180: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x190: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x1A0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x1B0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x1C0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x1D0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x1E0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: 0x1F0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
Nov 04 22:17:58 tjoepie kernel: RTW: hal_com_config_channel_plan chplan:0x7F
Skallwar commented 3 years ago

@tjoepies Did you follow this

Bramzor commented 3 years ago

@tjoepies Did you follow this

I just did a compile and got the same result. And had to apply the arm part copy because make would fail otherwise because of missing directory.

Got the same issue as described above though.

tjoepies commented 3 years ago

@tjoepies Did you follow this

Hi, yes I did.

mi-hol commented 3 years ago

same issue here. What I noticed is below error when I followed replace the name used in the driver

grep -lr . | xargs sed -i '' -e '/ifcfg-wlan0/!s/wlan0/wlan1/g'
sed: can't read : No such file or directory

I'm not a bash/sed user, hence would appreciate a hint on how to fix this

Bramzor commented 3 years ago

same issue here. What I noticed is below error when I followed replace the name used in the driver

grep -lr . | xargs sed -i '' -e '/ifcfg-wlan0/!s/wlan0/wlan1/g'
sed: can't read : No such file or directory

I'm not a bash/sed user, hence would appreciate a hint on how to fix this

That's because that file is missing in the current directory... You need to run that command in the proper directory where the fix needs to be applied.

Not sure if your problem is related to this issue though.

mi-hol commented 3 years ago

@Bramzor thank you so much, unfortunately I still don't understand the root cause of this error msg :(

according to GH search 8 files in current and sub-directories contain file with the string 'wlan0' I checked file wlan0dhcp in current directory and the change to 'wlan1' got applied. The real file name causing the error is not shown in the error msg. Hence I'm still confused and assume an error in either instruction or command. Any suggestion on how to debug this command to get to the bottom?

What I did:

root@nas:~/build/rtl8821CU# grep -lr . | xargs sed -i '' -e '/ifcfg-wlan0/!s/wlan0/wlan1/g'
sed: can't read : No such file or directory
root@nas:~/build/rtl8821CU# cat wlan0dhcp
#!/bin/bash

var0=`ps aux|awk '/dhclient wlan1/'|awk '$11!="awk"{print $2}'`

kill $var0
cp ifcfg-wlan0 /etc/sysconfig/network-scripts/

dhclient wlan1

var1=`ifconfig wlan1 |awk '/inet/{print $2}'|awk -F: '{print $2}'`

rm -f /etc/sysconfig/network-scripts/ifcfg-wlan0

echo "get ip: $var1"

root@nas:~/build/rtl8821CU#