# TP-Link TL-WN722N v2



## jiaxing (Feb 23, 2020)

Does FreeBSD support this dongle? I installed FreeBSD on Vbox on Linux but it isn't as smooth as Linux guest. The mouse, apart from having an annoying extra back button also seemed to be lagging. It's not move as fast and smooth as Linux. I also have to click to the VM to capture the mouse. The Linux guest doesn't need this, I can move the mouse freely between host and guest as it auto capture and release the mouse.

Note: I set up everything properly for the FreeBSD VM so it's not about missing guest addition.

So I decided to give FreeBSD a try on my second HDD. The only problem now is this dongle. Please let me know if it works under FreeBSD or not, so I will not waste time migrating TBs of data off the HDD before dedicate it for FreeBSD. Thanks.


----------



## aragats (Feb 24, 2020)

The same model number of that USB WiFi adapter may be used for different chipsets. I have one which is working (at least) in station mode.
I'd suggest running usbconfig() to get more information on the device:
	
	



```
# usbconfig list
# usbconfig X.Y dump_device_desc
```
where X and Y are the <busnum> and <devaddr> from the output of the first command.


----------



## jiaxing (Feb 24, 2020)

I'm not on FreeBSD so I can't post the result of usbconfig. But it's from inxi on Linux:


```
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
           vendor: Micro-Star MSI driver: r8169 v: kernel port: e000 bus ID: 02:00.0
           chip ID: 10ec:8168
           IF: eth0 state: down mac: <filter>
           Device-2: TP-Link TL-WN722N v2 type: USB driver: r8188eu bus ID: 2-7:3
           chip ID: 2357:010c serial: <filter>
           IF: wlan0 state: up mac: <filter>
```


----------



## T-Daemon (Feb 24, 2020)

jiaxing said:


> Device-2: TP-Link TL-WN722N v2 type: USB driver: *r8188eu* bus ID: 2-7:3


If the driver *r8188eu *is an indicator to the chipset, then, according to urtwn(4) driver, wireless network adapters based on RTL8188EU are supported.


----------



## jiaxing (Feb 24, 2020)

Do I need to use the latest version of FreeBSD, 12.1, to get the driver? I usually stick with the oldest but still supported version and upgrade later. I'm still using Debian 8 oldoldstable, lol. Does the driver work with FreeBSD 11.3?

Is there any graphical tool to manage Wifi network like NetworkManager on Linux? I think I will miss NetworkManager very much, but doing wpa_supplicant by hand also OK.

p/s: I installed kernel 4.19 on Linux, though. This dongle will not work with kernel 3.16 provided by Debian 8. As it requires a fairly new Linux kernel so I'm think I will need a fairly new FreeBSD version, too.


----------



## T-Daemon (Feb 24, 2020)

jiaxing said:


> Please let me know if it works under FreeBSD or not, so I will not waste time migrating TBs of data off the HDD before dedicate it for FreeBSD.


To make sure of the support, before installing on hard disk, you could boot a FreeBSD installation image with the wifi dongle plugged in, and check there.


----------



## T-Daemon (Feb 24, 2020)

jiaxing said:


> Do I need to use the latest version of FreeBSD, 12.1, to get the driver?
> ....
> Does the driver work with FreeBSD 11.3?


Sigh! Nobody reads manuals. From urtwn(4):

```
HISTORY
     The urtwn driver first appeared in    OpenBSD    4.9 and    FreeBSD    10.0.
```



jiaxing said:


> Is there any graphical tool to manage Wifi network like NetworkManager on Linux?


There is sysutils/pc-networkmanager, but I never used it. If the dongle is fully supported you can configure it during installation.


----------



## SirDice (Feb 24, 2020)

T-Daemon said:


> Nobody reads manuals. From urtwn(4):


Just because the driver has existed since 10.0, doesn't mean this specific chipset is supported by the driver. New chipset variants are added all the time.


----------



## aragats (Feb 24, 2020)

I found a similar one but of version 2.1, plugged it in, dmesg():
	
	



```
....
ugen0.6: <Realtek 802.11n NIC> at usbus0
rtwn0 numa-domain 0 on uhub2
rtwn0: <Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 10> on usbus0
rtwn0: MAC/BB RTL8188EU, RF 6052 1T1R
```
I loaded the firmware:
	
	



```
# kldload rtwn-rtl8188eufw
```
However, something is still missing:
	
	



```
# ifconfig wlan0 create wlandev urtwn0
ifconfig: SIOCIFCREATE2: Device not configured
```

[EDIT] As you can see dmesg() reports "rev 2.00", but it has "V2.1" printed on the plastic case.


----------



## jiaxing (Feb 24, 2020)

T-Daemon said:


> To make sure of the support, before installing on hard disk, you could boot a FreeBSD installation image with the wifi dongle plugged in, and check there.



Yes. I tried. It correctly detect the device.


----------



## jiaxing (Feb 24, 2020)

T-Daemon said:


> Sigh! Nobody reads manuals. From urtwn(4):
> 
> ```
> HISTORY
> ...



No. I read it many times but still can't figure out how to make it works.

Mine tried to tool named net-mgmt/networkmgr


----------



## jiaxing (Feb 24, 2020)

SirDice said:


> Just because the driver has existed since 10.0, doesn't mean this specific chipset is supported by the driver. New chipset variants are added all the time.


You are so right. I installed FreeBSD 12.1. I grepped the whole /boot/modules and /boot/kernel without found anything named if_urtwn other than a single urtwn.ko. After searching a while I found FreeBSD 12.0 merge urtwn to rtwn. I followed this tutorial and could have network up and working but I found everytime I reboot the rtwn0 device disappear, I have to use ifconfig to create it again. Don't know why. The GhostBSD live usb does detect and load the driver automatically but after I installed it it doesn't create the rtwn0 device for me even though it already put on my rc.conf these line:


```
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

Another weird thing is I can only connect using networkmgr but not the plain wpa_supplicant.conf and the network speed is very poor, I think just 1/4 the speed on Linux: 1260Kb/s vs 5.4Mb/s. I think I would better on Linux and keep BSD on VBox. BSD really doesn't like Wifi.


----------



## aragats (Feb 24, 2020)

Most likely it requires license acknowledgement, but is there a different way except of adding it to /boot/loader.conf?
	
	



```
....
legal.realtek.license_ack=1
```
I cannot reboot my computer now and in the next few days to check, is it possible to acknowledge without rebooting?


----------



## jiaxing (Feb 24, 2020)

aragats said:


> Most likely it requires license acknowledgement, but is there a different way except of adding it to /boot/loader.conf?
> 
> 
> 
> ...


I don't know but the GhostBSD I installed doesn't need this line it will automatically load the driver but it doesn't obey rc.conf to create the rtwn0 device, I have to manually create it everytime with ifconfig. Don't know why but it does create the device automatically for me when I run it live version.

I don't know why but this GhostBSD is awesome but very unstable. It's very beautiful but sometime it just stuck at Saving dependencies cache... and will not allow me to poweroff without using reset button. When I followed the tutorial I mentioned above to restart the netif service it just said there is no netif service to stop. I think we should update the document, it's outdated.


----------



## SirDice (Feb 24, 2020)

aragats said:


> is it possible to acknowledge without rebooting?


I'm not exactly sure when the check happens. You could try to simply unload and load the module, the check may happen when the module is initialized.


----------



## aragats (Feb 24, 2020)

SirDice said:


> You could try to simply unload and load the module, the check may happen when the module is initialized.


I tried, but still got "Device not configured", which doesn't prove or disprove this since it may not work for a different reason.


----------



## jiaxing (Feb 24, 2020)

Wait. Doesn't GhostBSD and FreeBSD the same system? Just like Ubuntu to Debian? I found something wrong. Many commands on the handbook not worked.


----------



## SirDice (Feb 24, 2020)

GhostBSD is a _derivative_. Derivatives are not supported here for that exact reason. 

PC-BSD, FreeNAS, XigmaNAS, and all other FreeBSD Derivatives


----------

