Cheap Wireless USB Adapter: RTL8188EU, RTL8821AU or something else?

MasterOne , now that you mentioned (possibly again) the exact FreeBSD version, I recalled that I used to have some problems similar to what you see and eventually I had to fix a bug in the code. So, I am actually using FreeBSD main branch (aka [14-]CURRENT). And the fix I am referring to is https://cgit.freebsd.org/src/commit/?id=c5fa78d35d718a0a8aa5cd0226a5abbe56f755d0 That fix is not in 13.0, but it is in stable/13.

So I just gave it a try with STABLE and CURRENT, but the problem persists with both FreeBSD 13.0-STABLE #0 stable/13-n248872-2c7441c86ef: Thu Jan 6 02:34:00 UTC 2022 and FreeBSD 14.0-CURRENT #0 main-n252239-ac413189f53: Thu Jan 6 06:24:59 UTC 2022.

This seems to be totally crazy, because as said, trying to download something directly at the laptop in a console works without problems.

If trying the same while logged in by ssh immediately results in the shown problem.

Starting a download in a console at the laptop while being logged in by ssh as well, I only need to enter a single character in the terminal with the ssh connection to cause the device timeout error followed by a reconnect.

How is this even possible?
What's the possible connection between a wireless device driver and ssh?
 
I'm now back at FreeBSD 13.0-RELEASE-p6 with the Ralink wireless adapter. Just checked by downloading a 1GB test file while being logged in by ssh again and everything is working as supposed to.

Once again concerning the rtwn(4) driver:

Having tried with RTL8188EU and RTL8821AU chipsets, any idea why it didn't load any firmware (with or without legal.realtek.license_ack=1 in loader.conf(5))?

Or is the firmware not necessary anymore (except the shown problem, it's obviously working without any firmware)?

Because the run(4) driver loads the appropriate Ralink firmware automatically without anything configured.

This whole matter isn't a show-stopper right now, because I only need the ssh connection to be able to configure the new laptop from my other computer, so as long as the wireless connection is working when using the new laptop directly, it's kind of OK (I'll just use the Ralink adapter for as long as I need ssh access, and when ready I'll switch to the Realtek adapter). But I really would like to find out what's up with that awkward rtwn(4) driver problem, because whatever is going on over the wireless connection, it should not result in a device timeout followed by a driver reset.

P.S. To be clear, all my tests have been done with fresh FreeBSD 13.0-RELEASE installations with nothing else installed or configured, so nothing else can be blamed for the described problem.
 
In my case the firmware is auto-loaded.
I think that it is loaded for you as well.
It's just that FreeBSD does not need to keep the firmware kld in kernel memory after uploading the actual firmware to the hardware, so the kld gets auto-unloaded as well.
You can do this test:
  • remove all loading and auto configuration of the interface
  • kldload if_rtwn_usb
  • sysctl dev.rtwn.0.debug=128
  • ifconfig wlan0 create wlandev rtwn0 wlanmode ... (whatever you need here)
  • ifconfig wlan0 up
After the last step I see:
rtwn0: FW V11.1 01-33 17:39
 
After the last step I see: rtwn0: FW V11.1 01-33 17:39

Indeed, I get rtwn0: FW V22.0 17-34 19:49 that way.

So the firmware gets loaded (with or without legal.realtek.license_ack=1 in loader.conf(5), which makes me wonder why acknowlegment of the Realtek license is ignored, making that configuration option as per man page obsolete) and that obviously is not responsible for the shown problem.
 
TP-Link TL-WN725N 150Mbps Wireless N Nano USB Adapter points to a v3 device, but rtwn_usb(4) only claims to support TP-LINK TL-WN725N v2. Did you order the v2 or the v3?

Unfortunately I don't know, but I guess the versioning only has to do with the used chipset. So as long as the chipset is supported by the driver, this should not matter.

I have no guess about the problem with the RTL8821AU device, unless perhaps it might be plugged into a USB 3.0 port?

The used laptop indeed only has USB 3.0 ports. What's the possible relation with that?

I don't see where it says that legal.realtek.license_ack=1 is required. Maybe it's not required?

It says so in the rtwnfw(4) man page:

For the loaded firmware to be enabled for use the license at /usr/share/doc/legal/realtek.LICENSE must be agreed to by adding the following line to loader.conf(5):

legal.realtek.license_ack=1
 
Unfortunately I don't know, but I guess the versioning only has to do with the used chipset. So as long as the chipset is supported by the driver, this should not matter.
If you say so. But why then does the manual mention version numbers for each supported chipset?
Code:
     TP-Link TL-WN722N v2           RTL8188EU     USB 2.0
     TP-LINK TL-WN723N v3           RTL8188EU     USB 2.0
     TP-LINK TL-WN725N v2           RTL8188EU     USB 2.0
     TP-LINK TL-WN727N v5           RTL8188EU     USB 2.0

The used laptop indeed only has USB 3.0 ports. What's the possible relation with that?
I'm only going by what I see in the manual:
Code:
     TP-Link Archer T2U    Nano           RTL8821AU     USB 2.0
     TP-Link Archer T4U               RTL8812AU     USB 3.0
     TP-Link Archer T4U    v2           RTL8812AU     USB 3.0

It says so in the rtwnfw(4) man page:
Thanks, I didn't see that. I'm guessing that might apply more to FreeBSD version 12. Version 13.0 seems better at loading kernel modules automatically.
 
If you say so. But why then does the manual mention version numbers for each supported chipset?

Again, I can only guess, but it shows specific revisions with known chipsets. I've seen adapters which had different chipsets with the same name / model number but different revisions.

About USB 2.0 vs USB 3.0, that's obviously the capability of the adapter and not of the computer, as it's downwards compatible anyway. Since I have used both RealTek adapters at the same port of the laptop, and both showed the exact same issue, this can't have any influence.


Thanks, but the relevant recent entries of USB devices in that list are from this thread, any other RealTek adapter will likely show the same behavior, and older devices are pretty much impossible to get. I also don't want to start a collection of adapters here, the few that I already have should do.

As it's working on its own, but problems start as soon as there is a ssh connection involved, something else is obviously wrong (though not on my part, because as said, this is always only on fresh FreeBSD installation with no configuration that could inflict any such problems).
 
I have some experience with Usb and Pcie wireless network devices. So far, only the Realtek Usb and and Pcie wireless allow me to create a 5Ghz access point. Well of course the device must support dual band 2.4Ghz and 5Ghz but a lot of them can only be in 5Ghz as client or in managed mode. All channels are disabled or so to emit in 5Ghz access point.

All can serve as access point in 2.4Ghz (must be verify anyway) and be client in managed mode but a Pcie Atheros and Intel cannot serve in 5ghz. They can be in 5Ghz only as clients. I have this new Usb3 dongle dual band who work in managed mode and as an access point in both bands buy on amazon. I must compile the Linux module sources not in the Vanilla tree to make it work and on FreeBSD it it not supported by default.

0bda:b812 Realtek Semiconductor Corp. RTL88x2bu [AC1200 Techkey]

This one is supported by FreeBSD and can serve as 5Ghz access point but is Usb2.

0bda:a811 Realtek Semiconductor Corp. RTL8811AU 802.11a/b/g/n/ac WLAN Adapter
 
Last edited:
Back
Top