ZaphodB
Posts: 4
Joined: Sat Aug 13, 2016 7:55 pm

USB wifi dongle 0bda:c811 issue: no interface is created, although module is loaded

Sat Jan 05, 2019 9:40 am

Hi,

I am tying to get a wifi dongle set up. Although the module is loaded, no interface shows up. The device has the rtl8812au chipset and looks like this:

Image

I followed the accepted answer here: https://raspberrypi.stackexchange.com/a/67721
I managed to compile the 8812au.ko kernel module. It is loaded and listed by lsmod:

Code: Select all

[email protected] ~ % lsmod
Module                  Size  Used by
8812au                958464  0
cfg80211              573440  0
rfkill                 28672  2 cfg80211
...
I am running this kernel:

Code: Select all

Linux mantis 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
I can remove and insert the module. The dmesg output:

Code: Select all

[39773.531957] usbcore: deregistering interface driver rtl8812au
[39781.470194] usbcore: registered new interface driver rtl8812au
When I remove and re-insert the wifi adapter, dmesg says:

Code: Select all

[39795.148673] usb 1-1.4: USB disconnect, device number 5
[39802.871389] usb 1-1.3: new high-speed USB device number 6 using dwc_otg
[39803.002457] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=c811
[39803.002473] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[39803.002485] usb 1-1.3: Product: 802.11ac NIC
[39803.002495] usb 1-1.3: Manufacturer: Realtek
[39803.002505] usb 1-1.3: SerialNumber: 123456
But, and this is my problem, no network interface is created. ifconfig / ip addr only shows eth0 and lo (my pi has no wifi).

What can I do to debug?
How can i verify, that my dongle really is supported by the 8812au module?

Thanks in advance!

ZaphodB
Posts: 4
Joined: Sat Aug 13, 2016 7:55 pm

Re: USB wifi dongle 0bda:c811 issue: no interface is created, although module is loaded

Sat Jan 05, 2019 9:38 pm

Hi again,

I figured out what the problem was. I was using the wrong driver.

This driver does the job: https://github.com/whitebatman2/rtl8821CU

Before compiling form source, I had to change the file "os_dep/linux/usb_intf.c" to include the USB vendor and product ID that my wifi dongle has. Like this, see line 184:

Code: Select all

179 ...
180 
181 #ifdef CONFIG_RTL8821A
182 	/*=== Realtek demoboard ===*/
183 	{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0811), .driver_info = RTL8821}, /* Default ID */
184 	{USB_DEVICE(USB_VENDER_ID_REALTEK, 0xc811), .driver_info = RTL8821}, /* Default ID */
185 	{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0821), .driver_info = RTL8821}, /* Default ID */
186 	{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8822), .driver_info = RTL8821}, /* Default ID */
187 	{USB_DEVICE(USB_VENDER_ID_REALTEK, 0xA811) , .driver_info = RTL8821},/* Default ID */
188 	{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x0820, 0xff, 0xff, 0xff), .driver_info = RTL8821}, /* 8821AU */
189 	{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x0823, 0xff, 0xff, 0xff), .driver_info = RTL8821}, /* 8821AU */
190 	/*=== Customer ID ===*/
191 	{USB_DEVICE(0x7392, 0xA811), .driver_info = RTL8821}, /* Edimax - Edimax */
192 ...
Afterwards, all the usual steps for installation worked. They are described in either of the driver github repositories.

Cheers, Zaphod

ZaphodB
Posts: 4
Joined: Sat Aug 13, 2016 7:55 pm

Re: USB wifi dongle 0bda:c811 issue: no interface is created, although module is loaded

Sat Jan 05, 2019 10:03 pm

Turns out, the easiest way to check which driver you need is to crack the case and take a look:

Image

I have indeed a RTL8811CU in my no-name ebay wifi adapter.

CheshireCat
Posts: 6
Joined: Sun Jun 17, 2012 10:19 pm

Re: USB wifi dongle 0bda:c811 issue: no interface is created, although module is loaded

Sat Jun 08, 2019 5:31 pm

When installing on a Pi3b (not +) running Stretch Lite 2019-04-08, these instructions needed a minor tweak.
Setting lines 96 to 98 in Makefile to
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
CONFIG_PLATFORM_ARM_RPI3 = n
worked for me.
Turning on RPI3 invoked 64bit code, which didn't work.
The dongle I used was
https://www.amazon.co.uk/Foktech-802-11 ... pons&psc=1

Hope this helps.

JMC31337
Posts: 1
Joined: Fri Aug 09, 2019 5:52 am

Re: USB wifi dongle 0bda:c811 issue: no interface is created, although module is loaded

Fri Aug 09, 2019 6:41 am

having cross-compiled and compiled kernels for the pi (3b+)
Hopefully this will benefit someone else that comes along....

1) This driver worked...
https://github.com/whitebatman2/rtl8821 ... /README.md

Tested with setting the device with iwconfig modes Master Monitor Managed and all were permitted


2) This site worked for cross-compiling
https://sysprogs.com/VisualKernel/tutor ... ildkernel/

Although my Makefiles had to be modded slightly after getting the linux source and tools cloned:

Code: Select all

ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
ARCH ?= arm
CROSS_COMPILE ?= /home/jmc31337/pi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-
KSRC := /home/jmc31337/pi/module/lib/modules/4.19.64-v7+/build
MODDESTDIR := /home/jmc31337/pi/module/lib/modules/4.19.64-v7+/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
Where “/home/jmc31337/pi/” was the directory where git clone was ran


3) For compiling the same driver on the pi for the pi this site worked to get the proper kernel and tools:
https://www.raspberrypi.org/documentati ... uilding.md

Then git clone the above driver...

You still need to change the driver makefile according to the driver’s readme at:
“Build and install without DKMS”

4) And to load the driver once you have the .ko file (for some Realtek devices,) you have to run:

a) sudo usb_modeswitch -KW -v 0bda -p 1a2b
b) then you can insmod/modprobe

Checking it with iwconfig/ifconfig

Lastly, we ran into a situation where after mode-switching and module loading our iwconfig saw the device but not ifconfig

c) ifconfig wlan1 up

Brought it up - assuming you have a built in WiFi card as well as a dongle with a rtl88xx

LateDev
Posts: 44
Joined: Fri Dec 20, 2013 6:27 pm

Re: USB wifi dongle 0bda:c811 issue: no interface is created, although module is loaded

Thu Nov 14, 2019 12:14 pm

I am unsure how to proceed, never having used github for anything.
I am on a fast learning curve here, but with very little information to go on I am blind.

How do you get the driver in the first place ?

I have a pi 2 with only a wifi dongle, no ethernet to connect to. The dongle reports on a PC that it is an RTL8811CU. I have a load of driver files provided by the manufacturer including Linux and Android. presumably the linux is x86 based, but as no one actually states anywhere what it is, I have to make that assumption. Android I would presume ARM but it could equally be MTK . Jeez why don't these people state what they are in simple terms, just for me :)

So where do I start and with what. ?
I have a pi2 psu monitor mouse and keyboard along with a RTL8811CU dual band Wifi
To help where possible, and always to learn.

Return to “Troubleshooting”