# Realtek 8192CU driver not loaded



## BSDfanNo2 (Nov 17, 2016)

Hi,

The Netgear WNA1000M N150 Wi-Fi USB Micro Adapter, based on Realtek 8192CU, is said to be supported in this page.

https://www.freebsd.org/cgi/man.cgi?query=urtwn&sektion=4&manpath=freebsd-release-ports

I have the driver and firmware for it loaded but sysctl net.wlan.devices does not show it. Any idea?

I am running 11.0-RELEASE-p3 on a amd64 PC.


```
# cat /boot/loader.conf
autoboot_delay="1"
fuse_load="YES"

if_ehci_load="YES"
if_uhci_load="YES"
if_ohci_load="YES"
if_usb_load="YES"
if_wlan_load="YES"


# for Ralink USB IEEE 802.11a/g/n wireless network devices
if_run_load="YES"
runfw_load="YES"

# hw.usb.urtwn.debug=1

# for Realtek RTL8188CU/RTL8188RU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network devices such as Netgear WNA1000M
legal.realtek.license_ack=1
if_urtwn_load="YES"

urtwn-rtl8192cfwT_load="YES"
urtwn-rtl8192cfwU_load="YES"
urtwn-rtl8188eufw_load="YES"

# for wireless encryption
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
```


----------



## SirDice (Nov 17, 2016)

As far as I know Realtek has a tendency to modify their chips without changing the identification. It's possible you have some variant that's not detected properly. Can you post the output of `pciconf -lv` (no need for the whole thing, just the bit that shows the Realtek identifications).


----------



## BSDfanNo2 (Nov 17, 2016)

Hi SirDice,

The pciconf command is only showing PCI devices, but the device I am using is USB so it is not shown there.

This is the tail of dmesg after I insert the Netgear dongle:
`ugen2.3: <vendor 0x0846> at usbus2`


The last line in this list is for the Netgear dongle. Note that I have two Ralink dongles that are working well (that the Netgear dongle does not work is unrelated to the Ralink dongles being plugged in).


```
# usbconfig
ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen3.1: <UHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen6.1: <EHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.2: <802.11 n WLAN Ralink> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (450mA)
ugen6.2: <802.11 n WLAN Ralink> at usbus6, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (450mA)
ugen4.2: <Microsoft 5-Button Mouse with IntelliEyeTM Microsoft> at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
ugen4.3: <Dell USB Keyboard Dell> at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (70mA)
ugen2.3: <product 0x9043 vendor 0x0846> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
```


----------



## SirDice (Nov 17, 2016)

Oh, duh. Missed the USB bit. 

`usbconfig -u 2 -a 3 dump_device_desc` (The numbers refer to ugen2.3, modify when needed)


----------



## BSDfanNo2 (Nov 17, 2016)

Below is the tail of dmesg if I plug the dongle on a Linux box. Note that the device is said to be v2 of the WNA1000M. Do you think this could be the reason why it does not work in FreeBSD?


```
[ 1581.041059] usb 1-7: new high-speed USB device number 9 using ehci-pci
[ 1581.161320] usb 1-7: New USB device found, idVendor=0846, idProduct=9043
[ 1581.161326] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1581.161330] usb 1-7: Product: WNA1000Mv2
[ 1581.161334] usb 1-7: Manufacturer: Realtek
[ 1581.161337] usb 1-7: SerialNumber: 00e04c000001
[ 1581.164818] rtl8192cu: Chip version 0x11
[ 1581.287189] rtl8192cu: Board Type 0
[ 1581.287431] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[ 1581.287473] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[ 1581.288842] ieee80211 phy4: Selected rate control algorithm 'rtl_rc'
[ 1582.344574] rtl8192cu 1-7:1.0 wlp0s29f7u7: renamed from wlan0
[ 1582.362244] IPv6: ADDRCONF(NETDEV_UP): wlp0s29f7u7: link is not ready
[ 1582.367456] rtl8192cu: MAC auto ON okay!
[ 1582.401598] rtl8192cu: Tx queue select: 0x05
[ 1582.832301] IPv6: ADDRCONF(NETDEV_UP): wlp0s29f7u7: link is not ready
[ 1582.862983] IPv6: ADDRCONF(NETDEV_UP): wlp0s29f7u7: link is not ready
```
And here is the output of the command you asked for:


```
# usbconfig -u 2 -a 3 dump_device_desc
ugen2.3: <product 0x9043 vendor 0x0846> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x0846
  idProduct = 0x9043
  bcdDevice = 0x0200
  iManufacturer = 0x0001  <Realtek>
  iProduct = 0x0002  <WNA1000Mv2>
  iSerialNumber = 0x0003  <00e04c000001>
  bNumConfigurations = 0x0001
```


----------



## SirDice (Nov 17, 2016)

BSDfanNo2 said:


> Note that the device is said to be v2 of the WNA1000M. Do you think this could be the reason why it does not work in FreeBSD?


That's definitely possible. I don't know the exact specifics but the thread should now have all the information that would be needed for someone who's familiar with the driver.


----------



## BSDfanNo2 (Nov 17, 2016)

So we can let this sleep, or maybe I could file a bug report against the man page of the urtwn driver to ask that a "v1" be added to the line where WNA1000M is mentioned just so that people don't buy that device thinking it will work?


----------



## SirDice (Nov 17, 2016)

I'd give it a few days so everyone is able to read it. Filing a PR is always possible of course but I would create it so the driver itself can be updated to include the new variant.


----------



## BSDfanNo2 (Nov 17, 2016)

Good. Thanks.


----------



## Phishfry (Nov 21, 2016)

I looked thru /sys/dev/usb/usbdevs and I don't see the idProduct listed.
Perhaps you could add it and recompile. The chipset is supported so it is worth a shot.

https://wiki.freebsd.org/USB


----------



## Phishfry (Nov 22, 2016)

So on line 3280 (on FreeBSD11) of usbdevs insert this line and compile a custom kernel.

```
product NETGEAR WNA1000V2       0x9043   WNA1000V2
```


----------

