I am using a BeagleBone Black PCB Rev B6 with debian 12.15 and kernel 6.18.21-bone26. I have a TP-Link TL-WN822N usb wireless adapt which has a RTL8192CU chip. This is for IoT device and plain 802.11n (2.4GHz) is required.
The RTL8192CU in-tree kernel module works but stability is poor. So I decided to try the rtl8xxxu driver. I have blacklisted the various rtl8192cu modules. I have installed the firmware-realtek package.
The vendor and product info is 0bda:8178. This is supposed to be supported based on looking in the source code.
The rtl8xxxu module is loaded successfully at boot or on inserting the adapter into the usb A port. dmesg reports usbcore: registered new interface driver rtl8xxxu. However, there are no more messages related to loading firmware, etc and no interface is created.
This does work when using the rtl8192cu module.
I would like to try and debug what is going on when the module loads to determine what is going wrong. I’m not proficient at debugging kernel modules but have made an attempt using debugfs.
I have tried setting the module option rtl8xxxu debug=0x2000 which enables EFUSE but cannot locate the relevant directories such as mac80211 in /sys/kernel/debug/. I have checked and /sys/kernel/debug is mounted.
Advice about how to proceed to troubleshoot this problem will be gratefully received
0bda:8178 via lsusb should be a tell-tell sign of what to place in a udev file located at:
/etc/udev/rules.d/99-WIFI-device.rules
You can also get data from the kernel for your part via udevadm info --attribute-walk --name=/dev/ttyUSB0.
First, try with lsusb and then udevadm.
Also, try SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="my_device" for example.
In the SUBSYSTEM=="" section of the udev rule, I have had to use "tty" and/or "usb".
Sometimes "net" works also for SUBSYSTEM==""
The SYMLINK+="" section makes a link to the device located in /dev/.
also,
I have heard this and have not tested it:
ATTR{power/control}="on" will force power to the USB device if regular dropping or inconsistent connections are made.
Also and dually noted, find your MAC Address. At times these work within the udev rules files that keep persistent naming for /dev/ files.
update
This is all untested as I do not have your wifi adapter. I have some and I will look up data as time goes on. I have some mice adapters. I will test those first.
and another one…
This may help in your udev rule: GROUP="plugdev"
I am sorry. I erased my known_hosts file and nothing is working now. I will get back to it later.
So here’s an old trick… Do you have the hdmi enabled? Long ago, we had issues with HDMI causing interference on these short USB wifi dongles, also try a short usb cable to move the wifi module away.
@RobertCNelson,
Thank you for the helpful information and comments.
HDMI is disabled and the TL-WN822N uses a mini USB socket connection so it’s already using a 0.5m cable to plug into the BBB usb A port.
The output of modinfo rtl8xxxu does not have the module alias with the vendor and product id 0bda:8178. It has 0bda:8179.
When I look at the output of the usb-devices command, the driver attribute is (none) for tfecusb wlan adapter. I believe this is likely to be why no interface is created.
I tried to inject the additional vendor:product data into the new_id file in /sys/bus/usb/drivers/rtl8xxxu as rhe x root user but get a permission denied error. After some searching, this is caused by the parameter .no_dynamic_id=1 being set in the module.
I have tried a workaround I came across using modprobe -i with some shell commands to accomplish this but it still didn’t work.
The driver is now loaded (which was already happening) but is now attached to the hardware. The wireless interface is created and connects, using iwd, to my wireless SSID. I am setting a static IP address on this interface.
So we have made progress!
However, I cannot get a reply when I ping another LAN device or ping the adapter. When I check the interface statistics using ifconfig, I notice the RX packets are zero and not increasing. Also, the RX speed is low - 1000kbit/sec. TX rate is 144000kbits/sec. I am using the default module options provided in the source code.
So, I have had to revert to the kernel mainline rtl8102cu driver for now until I get some time to contact the code author(s) and try and work out what is going on.