I recently got a no-name usb wireless interface and tried to get it to work with this driver.
ugen1.3: <Realtek USB3.0 802.11ac 1200M Adapter> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0bda
idProduct = 0xb812
bcdDevice = 0x0210
iManufacturer = 0x0001
iProduct = 0x0002 <USB3.0 802.11ac 1200M Adapter>
iSerialNumber = 0x0003 <123456>
bNumConfigurations = 0x0001
In linux's rtl8812au driver I found the following lines so I decided to give urtwm a try:
#ifdef CONFIG_RTL8822B
/=== Realtek demoboard ===/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB82C, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Default ID for USB multi-function /
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB812, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, / Default ID for USB Single-function, WiFi only /
#endif / CONFIG_RTL8822B */
At first it was not recognized by the driver that was quickly fixed this way:
in sys/modules/urtwm/usbdevs.h:
#define USB_PRODUCT_REALTEK_8812AU 0xB812 /* AmazonNoName */
in if_urtwm.c line 134:
URTWM_RTL8812A_DEV(REALTEK, 8812AU),
and finally in /usr/src/sys/dev/usb/usbdevs:
product REALTEK 8812AU 0xB812 AmazonNoName
The driver compiles and sees the adapter but it looks like it is not enough:
root@tirpitz:~ # kldload if_urtwm
-> I get in /var/log/messages
Nov 16 21:47:54 tirpitz kernel: urtwm0: <USB3.0 802.11ac 1200M Adapter> on usbus1
Nov 16 21:47:54 tirpitz kernel: urtwm0: MAC/BB RTL8812AU, RF 6052 2T2R
Then:
root@tirpitz:~ # ifconfig wlan1 create wlandev urtwm0
However there is no mac address shown in ifconfig
wlan1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=200001<RXCSUM,RXCSUM_IPV6>
ether ff:ff:ff:ff:ff:ff
hwaddr ff:ff:ff:ff:ff:ff
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 1 (2412 MHz 11b)
regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7
scanvalid 60 wme bintval 0
groups: wlan
And in /var/log/messages
Nov 16 21:49:00 tirpitz kernel: wlan1: Ethernet address: ff:ff:ff:ff:ff:ff
Nov 16 21:52:59 tirpitz kernel: urtwm0: urtwm_r12a_power_off: failed to block Tx queues
Of course I can't associate it with any essid or do anaything useful past that point.
Obviously if Linux has a specific #define it is there for a good reason, these noname realtek adapters are best sellers on amazon I think it would be great to have support for them of FreeBSD.
IDK what I can do to help however.