Solved "Device not configured" problems using generic Realtek USB wifi adapter

Initially I wanted to make my Macbook's bcm4360 card work for networking, but gave up as it seems bwn(4) does not support it.
So, as recommended to me by a fellow forum user, I decided to use a USB Wifi dongle/adapter/whatever.

I had bought one years back and it came with a CD containing Linux, Mac & Windows drivers + a manual, both of which I have lost. It was some cheap red-tones-on-black unbranded/generic stuff that used Realtek drivers and it did work well, at least on Windows which I used to run at the time. I tried using it, and with the rsu(4) driver loaded through /boot/loader.conf, it shows up as ugen0.2: <Realtek 802.11n> at usbus0 on bootup and in dmesg(8)

EDIT : Using a Realtek Windows Utility , I have identified my chipset to be RTL8188FTV

However, any and all attempts to run sudo ifconfig wlan0 create wlandev rsu0 generate : ifconfig: SIOCIFCREATE2: Device not configured. I see the same error pass by during the bootup process as well.

For reference, this is what I added to /boot/loader.conf:
Code:
if_rsu_load="YES"
rsu-rtl8712fw_load="YES"

I was later informed that I have to agree to the license in the loading process so I also tried :
Code:
if_rsu_load="YES"
legal.realtek.license_ack=1
rsu-rtl8712fw_load="YES"
as well as :
Code:
legal.realtek.license_ack=1
if_rsu_load="YES"
rsu-rtl8712fw_load="YES"
But to no avail.

My /etc/rc.conf has :
Code:
wlans_rsu0="wlan0"
ifconfig_wlan0="WPA DHCP"

Output of pciconf -lv (as suggested to check somewhere in the wiki) :
Code:
hostb0@pci0:0:0:0:    class=0x060000 rev=0x09 hdr=0x00 vendor=0x8086 device=0x0154 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '3rd Gen Core processor DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:2:0:    class=0x030000 rev=0x09 hdr=0x00 vendor=0x8086 device=0x0166 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '3rd Gen Core processor Graphics Controller'
    class      = display
    subclass   = VGA
none0@pci0:0:4:0:    class=0x118000 rev=0x09 hdr=0x00 vendor=0x8086 device=0x0153 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '3rd Gen Core Processor Thermal Subsystem'
    class      = dasp
xhci0@pci0:0:20:0:    class=0x0c0330 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e31 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family USB xHCI Host Controller'
    class      = serial bus
    subclass   = USB
none1@pci0:0:22:0:    class=0x078000 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e3a subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C216 Chipset Family MEI Controller'
    class      = simple comms
uart1@pci0:0:22:3:    class=0x070002 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e3d subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family KT Controller'
    class      = simple comms
    subclass   = UART
em0@pci0:0:25:0:    class=0x020000 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1502 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '82579LM Gigabit Network Connection (Lewisville)'
    class      = network
    subclass   = ethernet
ehci0@pci0:0:26:0:    class=0x0c0320 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e2d subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C216 Chipset Family USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
hdac0@pci0:0:27:0:    class=0x040300 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e20 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C216 Chipset Family High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
pcib1@pci0:0:28:0:    class=0x060400 rev=0xc4 hdr=0x01 vendor=0x8086 device=0x1e10 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C216 Chipset Family PCI Express Root Port 1'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:28:3:    class=0x060401 rev=0xc4 hdr=0x01 vendor=0x8086 device=0x2448 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '82801 Mobile PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
ehci1@pci0:0:29:0:    class=0x0c0320 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e26 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C216 Chipset Family USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
isab0@pci0:0:31:0:    class=0x060100 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e55 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = 'QM77 Express Chipset LPC Controller'
    class      = bridge
    subclass   = PCI-ISA
ahci0@pci0:0:31:2:    class=0x010601 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e03 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series Chipset Family 6-port SATA Controller [AHCI mode]'
    class      = mass storage
    subclass   = SATA
ichsmb0@pci0:0:31:3:    class=0x0c0500 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e22 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C216 Chipset Family SMBus Controller'
    class      = serial bus
    subclass   = SMBus
none2@pci0:0:31:6:    class=0x118000 rev=0x04 hdr=0x00 vendor=0x8086 device=0x1e24 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family Thermal Management Controller'
    class      = dasp
cbb0@pci0:9:0:0:    class=0x060700 rev=0x02 hdr=0x02 vendor=0x1180 device=0xe476 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Ricoh Co Ltd'
    device     = 'CardBus bridge'
    class      = bridge
    subclass   = PCI-CardBus
sdhci_pci0@pci0:9:0:1:    class=0x080501 rev=0x00 hdr=0x00 vendor=0x1180 device=0xe823 subvendor=0x10f7 subdevice=0x8338
    vendor     = 'Ricoh Co Ltd'
    device     = 'PCIe SDXC/MMC Host Controller'
    class      = base peripheral
    subclass   = SD host controller

Please let me know if there is any more information to be provided to understand the situation.

Also let me know if there is any good way to accurately identify the exact chip/chipset in that adapter.
I browsed through dmesg(8) and the above pciconf(8) output but found nothing useful.
 
Are rsu/rsu-rtl8712fw really loaded? Check with # kldstat. What output does # usbconfig give?
Code:
$ kldstat
Id Refs Address                Size Name
 1  104 0xffffffff80200000  1f11ef8 kernel
 2    3 0xffffffff82113000    8f088 vboxdrv.ko
 3    1 0xffffffff821a3000    20c50 rsu-rtl8712fw.ko
 4    1 0xffffffff821c4000    15eb0 if_rsu.ko
 5    1 0xffffffff821da000     8c78 ums.ko
 6    1 0xffffffff82318000     c940 geom_eli.ko
 7    1 0xffffffff82325000     4cfc geom_uzip.ko
 8    1 0xffffffff8232a000    11f10 fusefs.ko
 9    2 0xffffffff8233c000     4240 vboxnetflt.ko
10    2 0xffffffff82341000     aac8 netgraph.ko
11    1 0xffffffff8234c000     31c8 ng_ether.ko
12    1 0xffffffff82350000     55e0 vboxnetadp.ko
13    1 0xffffffff82356000     21a8 acpi_panasonic.ko
14    1 0xffffffff82359000     4350 acpi_video.ko
15    1 0xffffffff8235e000     6730 cuse.ko
16    1 0xffffffff82365000     3250 ichsmb.ko
17    1 0xffffffff82369000     2180 smbus.ko
18    1 0xffffffff8236c000     2340 uhid.ko
19    1 0xffffffff8236f000     3380 usbhid.ko
20    1 0xffffffff82373000     31f8 hidbus.ko
21    1 0xffffffff82377000     3320 wmt.ko
22    1 0xffffffff8237b000     4500 ichwd.ko
23    1 0xffffffff82380000     4700 nullfs.ko
24    1 0xffffffff82385000     2a08 mac_ntpd.ko
25    1 0xffffffff82388000   158458 i915kms.ko
26    1 0xffffffff824e1000    7e4c8 drm.ko
27    2 0xffffffff82560000     cbc8 linuxkpi_gplv2.ko
28    2 0xffffffff8256d000     2328 lindebugfs.ko
29    1 0xffffffff82570000    1ae78 ext2fs.ko
30    1 0xffffffff8258b000     4354 geom_linux_lvm.ko
31    1 0xffffffff82590000     2138 msdosfs_iconv.ko
32    1 0xffffffff82593000     4798 libiconv.ko
$ usbconfig
ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen2.1: <Intel EHCI root HUB> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.1: <Intel EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <Realtek 802.11n> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen2.2: <vendor 0x8087 product 0x0024> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.3: <SanDisk Ultra Fit> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (224mA)
ugen2.3: <vendor 0x214b USB2.0 HUB> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen2.4: <MOSART Semi. 2.4G RF Keyboard  Mouse> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen2.5: <SEM HCT Keyboard> at usbus2, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (98mA)

TL;DR : Yes the rsu modules are loaded and usbconfig is promising.
 
And does anything show with:

# sysctl net.wlan.devices

(Apologies if you have already done this and I have missed it)

You should see something like rsu0 being reported.
 
Also, I don't think you have installed the firmware the if_rsu manpage mentions.

/boot/kernel/rsu-rtl8712fw.ko


Edit: It seems to be provided in base. Usually if the firmware can't load you get some errors in dmesg. So just check that to be sure.

Weirdly all I can find is the one for if_bwn (https://cgit.freebsd.org/ports/tree/net/bwn-firmware-kmod)

Perhaps you might want to try this out for your inbuilt Macbook wifi?
 
And does anything show with:

# sysctl net.wlan.devices
Code:
$ sysctl net.wlan.devices
net.wlan.devices:
Usually if the firmware can't load you get some errors in dmesg. So just check that to be sure.
Perhaps you might want to try this out for your inbuilt Macbook wifi?
1. I always check by doing a kldload before adding a module to be loaded during boot.
No, there are no missing modules.
2. Yeah, I'd like to have bwn work. Unfortunately it's not that simple. For more details, see the parent thread to this thread. In short, see this to know why it most likely doesn't work for my bcm4360, so while I did try it once, I didn't try that seriously. Besides, as the parent thread informs, I am using modded NomadBSD, i.e., I intend to have this USB-installed OS that works across amd64 machines for me to use portably, frequently switching machines. In such a context, it is better to have one constant network hardware that your OS works with than trying to get Wifi working on every new machine, so that was also a design choice. My OS (its not my OS, its my customisation of FreeBSD) is supposed to have no specific primary target machine per se.
 
Update :
I tried the below -
Code:
$ sudo kldunload if_rsu rsu-rtl8712fw
$ sudo kldload if_rtwn_usb
$ sudo ifconfig wlan0 create wlandev rtwn0
ifconfig: SIOCIFCREATE2: Device not configured

So the rtwn module/driver also does not help :(
 
It would be incredibly useful if someone here could point me to some way to identify the exact chip on this unbranded USB adapter. At the moment I am about to try to find this on Windows because there's hardly any consumer hardware that can't work on Windows.

EDIT :
The REALTEK USB Wireless LAN Utility , download here, tells me that I've got on my hands a Realtek RTL8188FTV Wireless LAN 802.11n USB 2.0 Network Adapted.

BSD-Hardware.info tells me that there's no drivers for this on any BSD. True ?
 
Forget RTL8188FTV, for the time being it does not work on FreeBSD. I spent a whole weekend to compile a driver and get the firmware blob (as available for Linux) loaded. I even get the device shown in ifconfig, but it does not work - so I gave up.

In case somebody does not want to start at zero, please send me a PM, so I can share a brief log of my efforts so far.
 
Forget RTL8188FTV, for the time being it does not work on FreeBSD. I spent a whole weekend to compile a driver and get the firmware blob (as available for Linux) loaded. I even get the device shown in ifconfig, but it does not work - so I gave up.

In case somebody does not want to start at zero, please send me a PM, so I can share a brief log of my efforts so far.
Thanks a lot for letting me know !
Stupid network hardware and it's stupid lack of standardisation :(
 
How would I identify the chipset trying to shop, any tips ?
Tricky, most of the time the chipset isn't mentioned in the specifications. Or only the 'main' branch of a certain chipset but nothing about which variant it is. A certain model of a device can use different variants over the course of its production. So brand A model B isn't guaranteed to use the same variant of the chipset either.
 
i have one like the above


rtwn0: <Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 5> on usbus1
rtwn0: MAC/BB RTL8188EU, RF 6052 1T1R

performance is not great, about 1MB/s but i use it on pi zero so no idea where the bottleneck is
 
I've got one of those cheap Edimax dongles that works. But I've been told the newer models of the same dongle don't work. Mine's a few years old now.

Code:
ugen1.4: <Realtek 802.11n WLAN Adapter> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
Code:
rtwn0 on uhub1
rtwn0: <Realtek 802.11n WLAN Adapter, class 0/0, rev 2.00/2.00, addr 4> on usbus1
rtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R
ieee80211_load_module: load the wlan_amrr module by hand for now.
 
rtwn0: <Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 5> on usbus1
rtwn0: MAC/BB RTL8188EU, RF 6052 1T1R

performance is not great, about 1MB/s but i use it on pi zero so no idea where the bottleneck is

Try to add in the create_args_wlan0 directive in /etc/rc.conf the additional argument roam:rate 7.

If this works, you can increase the rate even more by specifying dev.rtwn.0.ht40=1 in /boot/loader.conf. Then try to increase the rate to 15.
 
Find a dongle with the RTL8188EU chipset. That one works very well.
It does play well with linux too , right ? (Forget my username, I have to use linux a lot, primarily because valgrind and bleeding edge device drivers).

Yeah it can be frustrating. Luckily usb wifi (and bluetooth) adapters are cheap and easy to replace. Whereas if you have issues with Audio or GPU on your laptop, you have a much more annoying problem on your hands.
Oh boy, that would be terrible. I have actually had this, as someone who refused to give in to consumerism and line up of GPUs in 2020, and re-used a GTX750 with an EXP-GDC mPCIe model to slot the desktop GPU to a old toughbook's Wifi mPCIe input (very decent CPU). Oh boy, that hardware was so terrible, I reinstalled Windows a handful of times and even had to roll my own EMF shielding around sensitive PCIe data cables (Aluminium foil !). Sound issues are mostly chill though, USB sound adapters are cheap and functional ?

Tricky, most of the time the chipset isn't mentioned in the specifications. Or only the 'main' branch of a certain chipset but nothing about which variant it is. A certain model of a device can use different variants over the course of its production. So brand A model B isn't guaranteed to use the same variant of the chipset either.
You talk specifications but where I live, the cheapest ones are generic by the dictionary, they barely ever have a brand name, and if they do, that brand wont even have a website, just the amazon seller's name. They're all half-assed repackages of chinese electronics made for domestic markets, which means they are a lot cheaper than in some other countries but documentation is as real as Cinderella.
If you have a few minutes, admin/mod I'd like to make an informal "bug report" : all my posts are hidden until moderator verification, but I've noticed that every alternate post gets through in a matter of minutes but the next can stay for hours (one stayed in limbo for 7 hrs, literally copied it to a new one and deleted the old one and it passed in a minute or so). Is this somehow by design ?

i have one like the above
Thanks for your 2 cents, I'll see if that's available here.
 
Try to add in the create_args_wlan0 directive in /etc/rc.conf the additional argument roam:rate 7.

If this works, you can increase the rate even more by specifying dev.rtwn.0.ht40=1 in /boot/loader.conf. Then try to increase the rate to 15.
tried both but doesn't seem to change much if any
my testing is not very scientific i just nc /dev/zero from one box to /dev/null on another via pv

Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether d0:37:45:d8:11:aa
    inet 10.1.1.83 netmask 0xffffff00 broadcast 10.1.1.255
    groups: wlan
    ssid xxx channel 1 (2412 MHz 11g ht/20) bssid 46:d9:e7:09:d3:e8
    regdomain ETSI country XX authmode WPA2/802.11i privacy ON
    deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 60
    protmode CTS ampdulimit 64k ampdudensity 8 shortgi -stbc -ldpc -uapsd
    wme roaming MANUAL
    parent interface: rtwn0
    media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
    status: associated
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
 
Back
Top