USB wifi dongle with RTL8188CUS

Hello,

I wonder what I am doing wrong. I have USB wifi dongle, which seems to be recognized, but no interface is created.

Here what I see in dmesg output after plugging it in:

Code:
ugen0.2: <Realtek 802.11n WLAN Adapter> at usbus0
rtwn0 on uhub0
rtwn0: <Realtek 802.11n WLAN Adapter, class 0/0, rev 2.00/2.00, addr 8> on usbus0
rtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R

Moreover,

Code:
$ doas kldstat | grep rtwn
 2    1 0xffffffff82138000    19f98 if_rtwn_usb.ko
 3    2 0xffffffff82152000    262d0 rtwn.ko
 4    1 0xffffffff82179000     9828 rtwn-rtl8821aufw.ko
 5    1 0xffffffff82183000     a7d8 rtwn-rtl8192eufw.ko
 6    1 0xffffffff8218e000     a8c8 rtwn-rtl8812aufw.ko
 8    1 0xffffffff821a1000     6a88 rtwn-rtl8192cfwU.ko
 9    1 0xffffffff821a8000     6b78 rtwn-rtl8192cfwE_B.ko
10    1 0xffffffff821af000     6570 rtwn-rtl8192cfwE.ko
12    1 0xffffffff821d3000     61d8 rtwn-rtl8188eufw.ko
13    1 0xffffffff821da000     5758 rtwn-rtl8188eefw.ko
15    1 0xffffffff827ac000     6a88 rtwn-rtl8192cfwT.ko

$ grep realtek /boot/loader.conf
legal.realtek.license_ack=1

Nevertheless,

Code:
$ ifconfig rtwn0
ifconfig: interface rtwn0 does not exist
$ ifconfig -a | grep rtwn | wc -l
       0

I have FreeBSD 14 STABLE:

Code:
$ uname -a
FreeBSD barad-dur 14.1-PRERELEASE FreeBSD 14.1-PRERELEASE #0 stable/14-n267571-a3b8266f5420: Wed May  1 11:10:03 EEST 2024     root@barad-dur:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

What am I doing wrong?

P.S. I just tried with the same result on another system, running 14.0-RELEASE-p6.
 
This is exactly what I was following when I found the problem. The following command is given in section 7.4.2:
Code:
ifconfig wlan0 create wlandev iwm0

However,

Code:
# ifconfig wlan0 create wlandev rtwn0
ifconfig: SIOCIFCREATE2 (wlan0): Invalid argument

So my question still stands.
 
...and the hardware surely works -- I have tested the dongle in question in live Devuan Linux system, was able to join the wireless network and had network connectivity.
 
This may be helpful

 
This may be helpful

Unfortunately, while I can see the device in systctl output, the things still do not work:

Code:
root@barad-dur:~ # sysctl net.wlan.devices
net.wlan.devices: rtwn0
root@barad-dur:~ # ifconfig wlan1 create wlandev rtwn0
ifconfig: SIOCIFCREATE2 (wlan1): Invalid argument
 
Yes. RTL8188CUS. And even if the chipset would be wrong, how come that I can see the interface in sysctl output, but ifconfig fails to create wlan device? I would expect in the case of wrong chipset I see working ifconfig and non-working wifi. I clearly miss something.
 
Out of desperation, I have recompiled and reinstalled kernel and world, without doing any other changes. Surprisingly, now everything works. Weird. I am still to understand why the things do not work on 14.0-p6 either. Maybe I do zfs snapshot, and then recompilation. Anyway, I think this case is closed now.
 
Back
Top