# Wanted: USB wireless with 11n functionality



## phalange (Sep 4, 2020)

So after the train wreck of 76841, and since I decided against throwing my T470s off the roof, I'm on the market for a solution.

Can anyone recommend a USB wireless adapter that has 11n (meaning 300Mbps) functionality in FreeBSD? Yes, I spent an hour cross-referencing chipsets from the FreeBSD hardware notes, but if someone has a proven solution, I'd rather hear that.

Ideally:
small form factor, and NO antenna -- I want to leave it in always but still be portable.
11n speed -- must have


----------



## Alexander88207 (Sep 6, 2020)

I think you can forget about that, i was in the same situation as you: Looking for a working 802.11n stick but i realized that 99,x% all of them using rtwn/urtwn (Realtek) chips, the chipset 8812au seems to be often in use for powerful 802.11n sticks, but this driver only works currently with 802.11a/g here.


----------



## ekvz (Sep 6, 2020)

TP-Link WN-722N v1(!) uses at least some Atheros chipset (AR9002U according to some sites). I don't know if or how well FreeBSD supports that chipset though. It also has an external antenna but the quality is pretty nice and it supports monitor/ap modes.


----------



## kpedersen (Sep 6, 2020)

What do you need the 11n speed for? Is it really a must have or just a nice to have?
Generally if you need fast, then an ethernet cable is the correct choice.

Some other solutions could be a USB passthrough (i.e VirtualBox) to Windows 10 and then share the connection through that. Think of this as a "proprietary compatibility layer". If Linux has a driver, then you might be able to switch the Windows 10 out for a Linux distro.

Perhaps there is something like this for 11n?: https://www.amazon.co.uk/PQI-Air-Express-Wireless-Router/dp/B00BNAST1I

Offtopic:
Do many routers around you support 11n speed? Certainly in England where we know our internet is shite and the main bottleneck, all our coffee shops generally restrict connection to around 56kbps each so there is enough internet to share XD


----------



## ekvz (Sep 6, 2020)

kpedersen said:


> Do many routers around you support 11n speed? Certainly in England where we know our internet is shite and the main bottleneck, all our coffee shops generally restrict connection to around 56kbps each so there is enough internet to share XD



To be honest, i really don't know. It's extremely rare i will even get out my laptop in public places and then i have an UMTS modem builtin so i usually just use this and ignore any kind of wifi there might be. My personal networks usually do at least N though. The above mentioned WN-722N is pretty well supported in Linux (ath9k) and makes for a quite good software router (even just using the default antenna) if a PCI card is not an option (like with the stoneage laptop i was using a couple years back).


----------



## phalange (Sep 6, 2020)

ekvz said:


> TP-Link WN-722N v1(!) uses at least some Atheros chipset (AR9002U according to some sites). I don't know if or how well FreeBSD supports that chipset though. It also has an external antenna but the quality is pretty nice and it supports monitor/ap modes.



Yeah, it seems the smaller USB wireless modems tend to have chip sets poorly supported in freebsd -- meaning they can achieve no more than 11a speeds. I found some big ugly ones with those jumbo antennae, but on a laptop (especially an ultra-portable) those aren't my favorite.



kpedersen said:


> What do you need the 11n speed for? Is it really a must have or just a nice to have?
> Generally if you need fast, then an ethernet cable is the correct choice.



Must have. I have a great mesh wifi in my home along with service provider giving me 300Mbps. I easily get near that in almost any room (250Mbps or better). Streaming, file transfer, etc are just a breeze. So 20Mbps is a "no way." I agree that coffee shops are hit or miss, but I do find workplaces around me, back when we went to such places, had fast connections too.


----------



## phalange (Sep 6, 2020)

kpedersen said:


> Some other solutions could be a USB passthrough (i.e VirtualBox) to Windows 10



This is interesting, there's a thread here where someone used Linux to do it. The config is hard for me though. Is the idea that a VM can auto-mount at bootup, then access the bare metal modem -- in other words basically circumvent vbox abstraction -- and then output that connection back to the host as a full speed connection?

The complexity concerns me, as does having vbox chew up system resources (this is a t470s after all) but the concept is pretty cool if it works.


----------



## kpedersen (Sep 7, 2020)

phalange said:


> This is interesting, there's a thread here where someone used Linux to do it.



Actually, this is a better solution (though more complex). VirtualBox doesn't have the proprietary extension pack so you only get usb 1.1 (maybe 2.0) support. This would be a bottleneck for your wifi chip.

Bhyve allows you to pass hardware through but works in terms of the whole PCI device (i.e USB bus) rather than individual USB devices. If this works for you, then that would be ideal.

It seems that tingo was successful in his experiment and has more expertise than me. He is still around on these forums so perhaps if you do go this route, revive that thread and he might be able to help out.

I wouldn't worry too much about the performance impact. Just use a very bare-bones Linux like Alpine and it will probably use less RAM and processor resources than just the Windows DRM or anti-piracy service alone XD


----------



## Phishfry (Sep 7, 2020)

The MediaTek RT5370 and RT5372 usb devices support 802.11n using the run(4) driver.
It is also one of the only usb wireless drivers to support hostapd.

The Atheros wireless driver does not support USB devices.


			dev/ath(4) - FreeBSD Wiki
		

"Notably - this doesn't yet support the AR5523 NICs (AR5212 + USB), the AR7010 series USB NICs, or the AR9271 series USB NICs."


----------



## T-Daemon (Sep 7, 2020)

phalange said:


> vbox chew up system resources (this is a t470s after all)



If system resources are a concern, there is a step by step guide of running OpenWRT in bhyve on the freebsd-hackers@ list from June. The author claims having with that method 866Mbps on a notebook with intel 8265. The required resources are not much.



			Technical discussions relating to FreeBSD: WiFi with AC on FreeBSD


----------



## phalange (Sep 7, 2020)

Phishfry said:


> The MediaTek RT5370 and RT5372 usb devices support 802.11n using the run(4) driver.
> It is also one of the only usb wireless drivers to support hostapd.



We might have winner here. They sell this in a very small form factor for $9. For 9 bones, I'm in. Thanks for this suggestion



T-Daemon said:


> If system resources are a concern, there is a step by step guide of running OpenWRT in bhyve on the freebsd-hackers@ list from June. The author claims having with that method 866Mbps on a notebook with intel 8265. The required resources are not much.
> 
> 
> 
> WiFi with AC on FreeBSD



Yeah, this is cool. He's using an 8265 and mine is 8260, but it might still work.


----------



## Phishfry (Sep 7, 2020)

I won't guarantee that you will get 802.11n.
If you look at the bottom of the man page notice the caveats.
"The *run* driver does not support any of the    802.11n    capabilities offered
     by    the RT2800, RT3000 and RT3900 chipsets."

I seem to remember the RT53XX and RT55XX offering 802.11n.
It has been a while since I have used them though.


----------



## phalange (Sep 7, 2020)

Phishfry said:


> I won't guarantee that you will get 802.11n.
> If you look at the bottom of the man page notice the caveats.
> "The *run* driver does not support any of the    802.11n    capabilities offered
> by    the RT2800, RT3000 and RT3900 chipsets."
> ...



I don't know, that caveat looks pretty blunt to me. The 5730 is one of several radio chips in the 3900 chipset, and the language is clear about 3900 having no 11n using run(4). I think I'm back where I started.


----------



## ekvz (Sep 7, 2020)

phalange said:


> I don't know, that caveat looks pretty blunt to me. The 5730 is one of several radio chips in the 3900 chipset, and the language is clear about 3900 having no 11n using run(4). I think I'm back where I started.



Yes, i also fear that might be the case. The ral driver has the same disclaimer and it's certainly true for the WMP600N PCI card (RT2860) i was trying some time ago.

Maybe looking at https://deviwiki.com/ and matching chipsets to what FreeBSDs drivers support could find you something.

Edit: https://deviwiki.com/wiki/Special:A...efault]=&p[class]=sortable+wikitable+smwtable could be interesting as according to ath():



> The ath driver provides support for wireless network adapters based on the Atheros AR5210, AR5211, AR5212, AR5416 and AR9300 programming APIs.





> AR5416 and    later class devices are    capable    of 802.11n operation



I'm not sure if AR9300 means AR93xx though but i couldn't find any exact matches for AR9300 so i guess it might mean the whole range.


----------



## judd (Sep 7, 2020)

As mjollnir says, in my humble knowledge and understanding  I use both in Linux, FreBSD, nomadBSD and everything I want in VirtualBox, a WUSB54gc, which I bought and didn't use for almost 10 years, and I started using it when the network card of my old PC burned out.
Hasta el día de hoy, funciona de maravilla. Funciona con el controlador de ejecución.

Edito: well it's not for 300 Mbps.


----------



## phalange (Sep 7, 2020)

judd said:


> WUSB54gc
> funciona de maravilla. Funciona con el controlador de ejecución.
> Edito: well it's not for 300 Mbps.



Yes this is the compromise so far. There's no 300Bps wifi until 11ac support comes along. In the meantime, the only USB wifi adapters capable of 11n (that I've found) are long sticks that look like donkey ears on my ultrabook.


----------



## Mjölnir (Sep 7, 2020)

WTF, me on this thread without even posting here?  The alternative would be to exchange the internal M.2 WiFi card with another one with the appropiate chipset, instead of an external USB stick.  You'll also have a better antenna (in the display).  These ThinkPads are easy to maintain/repair as long as you don't have two left hands.


----------



## judd (Sep 7, 2020)

phalange said:


> ... are long sticks that look like donkey ears on my ultrabook.



I understand perfectly, but, (there is always a but ...) seeks to connect you to the Internet above the aesthetics. Sometimes everything can't be ...


----------



## phalange (Sep 7, 2020)

mjollnir said:


> WTF, me on this thread without even posting here?  The alternative would be to exchange the internal M.2 WiFi card with another one with the appropiate chipset, instead of an external USB stick.  You'll also have a better antenna (in the display).  These ThinkPads are easy to maintain/repair as long as you don't have two left hands.



I like this idea a lot. I've had the laptop open to add RAM, and it's an m.2 2230 size wireless card. Is there an easy way to cross-reference what chipsets (or really what drivers) actually achieve 11n speeds in FreeBSD?

For example I quickly turned up an Intel 7265 card, but it uses that iwm(4) driver which seems to be still cursed to 11a speeds.

EDIT
It's partly a limitation of the hardware database. The term "supported" doesn't mean "all protocols supported."

The 8265 seems to be a drop-in replacement for the 8260, but is also stuck with the iwm(4) driver.


----------



## ekvz (Sep 7, 2020)

mjollnir said:


> WTF, me on this thread without even posting here?  The alternative would be to exchange the internal M.2 WiFi card with another one with the appropiate chipset, instead of an external USB stick.  You'll also have a better antenna (in the display).  These ThinkPads are easy to maintain/repair as long as you don't have two left hands.



That's what i thought about too but then he wrote about an Ultrabook and i am not sure what exactly that is (maybe one of those ultra thin laptops that already break when someone looks funny at them?). Also while Thinkpads are quite easy to take apart (just get a service manual if you are really scared about damaging the device) they usually have a BIOS whitelist of allowed components so that has to be taken into account (by either getting an allowed part or installing a BIOS mod to remove the restriction: https://www.thinkwiki.org/wiki/Custom_BIOS).  Or maybe this is the perfect opportunity to install Coreboot/Libreboot (if it's available for the T470 OP wrote about)?


----------



## kpedersen (Sep 7, 2020)

phalange said:


> are long sticks that look like donkey ears on my ultrabook.



You just need to embrace it 

Buy a set of these: https://i.ebayimg.com/images/g/TaYAAOxyDgRQ9jHn/s-l400.jpg
Dismantle it and wrap the antenna with the fabric ears. Bonus points if you have a USB dongle plugged in each side of your laptop!

Heck, I would even wear the tail if it made the UK internet speeds faster XD


----------



## phalange (Sep 7, 2020)

ekvz said:


> That's what i thought about too but then he wrote about an Ultrabook and i am not sure what exactly that is (maybe one of those ultra thin laptops that already break when someone looks funny at them?). Also while Thinkpads are quite easy to take apart (just get a service manual if you are really scared about damaging the device) they usually have a BIOS whitelist of allowed components so that has to be taken into account (by either getting an allowed part or installing a BIOS mod to remove the restriction: https://www.thinkwiki.org/wiki/Custom_BIOS). Or maybe this is the perfect opportunity to install Coreboot (if it's available for the T470 OP wrote about)?



It's a T470s. I used ultrabook, but maybe thin and light is more accurate. I'd nuke the bios if I had to, but I don't think there's a card that fits in any event.



kpedersen said:


> You just need to embrace it
> 
> Buy a set of these: https://i.ebayimg.com/images/g/TaYAAOxyDgRQ9jHn/s-l400.jpg
> And wrap the antenna with the fabric. Bonus points if you have a USB dongle plugged in each side of your laptop!
> ...



Well, we agree that network speed is the wellspring of all happiness. But those ears.


----------



## ekvz (Sep 7, 2020)

phalange said:


> but I don't think there's a card that fits in any event.



If you found a suitable chipset (i would be interested to know too) you could look here: https://deviwiki.com/wiki/Main_Page. Just select the manufacturer and see if you can locate a mPCIe (or there something elsein recent laptops?) card.


----------



## phalange (Sep 7, 2020)

ekvz said:


> If you found a suitable chipset (i would be interested to know too) you could look here: https://deviwiki.com/wiki/Main_Page. Just select the manufacturer and see if you can locate a mPCIe (or there something elsein recent laptops?) card.



Yeah, this is excellent. They have a table and everything.


----------



## ekvz (Sep 7, 2020)

There seems to be A LOT Atheros based mPCIe cards that according to https://wiki.freebsd.org/dev/ath(4) would be supported and have N standard abilities.

https://deviwiki.com/wiki/Special:A...efault]=&p[class]=sortable+wikitable+smwtable

https://deviwiki.com/wiki/Special:A...efault]=&p[class]=sortable+wikitable+smwtable

https://deviwiki.com/wiki/Special:A...efault]=&p[class]=sortable+wikitable+smwtable

https://deviwiki.com/wiki/Special:A...efault]=&p[class]=sortable+wikitable+smwtable

https://deviwiki.com/wiki/Special:A...efault]=&p[class]=sortable+wikitable+smwtable

And that's only the AR928x ones.


----------



## Mjölnir (Sep 7, 2020)

ekvz said:


> [...] or there something elsein recent laptops?


Yes, M.2, but you have to beware the sizes EDIT & notches /EDIT of the cards differ, so one must carefully watch that.  EDIT the _minor pitfall_ with the notches is clearly documented in the Wikipedia link I gave...


----------



## phalange (Sep 7, 2020)

mjollnir said:


> Yes, M.2, but you have to beware the sizes of the cards differ, so one must carefully watch that.



Yes, I'm finding that form factor is only part of the story. My card has a mounting screw notch like a horseshoe shape top center, but many others have holes top left and right. These would take some work to mount properly.


----------



## Phishfry (Sep 7, 2020)

Yes I just dug up an RT5592 and no 802.11n

```
usbconfig
ugen1.5: <Ralink 802.11 n WLAN> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (450mA)

ifconfig -vv wlan2
wlan2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 7c:dd:90:7e:b3:07
    inet 192.168.1.115 netmask 0xffffff00 broadcast 192.168.1.255
    groups: wlan
    ssid apu2ap channel 36 (5180 MHz 11a) bssid 4c:5e:0c:11:65:38
    regdomain FCC country US anywhere -ecm authmode WPA2/802.11i -wps
    -tsn privacy ON deftxkey UNDEF
    TKIP 2:128-bit powersavemode OFF powersavesleep 100 txpower 17
    txpowmax 50.0 -dotd rtsthreshold 2346 fragthreshold 2346 bmiss 7
    11a     ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
    11b     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
    11g     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
    scanvalid 60 -bgscan bgscanintvl 300 bgscanidle 250
    roam:11a     rssi    7dBm rate 12 Mb/s
    roam:11b     rssi    7dBm rate  1 Mb/s
    roam:11g     rssi    7dBm rate  5 Mb/s
    -pureg protmode CTS -ht -htcompat -ampdu ampdulimit 64k
    ampdudensity 8 -amsdu -shortgi htprotmode RTSCTS -puren -smps -rifs
    -stbc -ldpc -vht -vht40 -vht80 -vht80p80 -vht160 wme -burst -dwds
    roaming MANUAL bintval 100
    AC_BE cwmin  3 cwmax 10 aifs  2 txopLimit  64 -acm ack
          cwmin  4 cwmax 10 aifs  3 txopLimit   0 -acm
    AC_BK cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm ack
          cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm
    AC_VI cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm ack
          cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm
    AC_VO cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm ack
          cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm
    media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a
    status: associated
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```


----------



## Phishfry (Sep 7, 2020)

Top center half circle mount is good for M.2 cards. That is standard. Those offset half circle ones are bastards.
What you really have to worry about is this: Does your machine use a BIOS whitelist for hardware.
If not then there are two Atheros M.2 cards that work. I will have to dig them up for model numbers.
Pretty sure they were AR94xx


----------



## Phishfry (Sep 7, 2020)

Here is the card:








						Atheros QCNFA222 2.4GHz/5GHz 802.11ABGN 300Mbps Bluetooth 4.0 WiFi Card  | eBay
					

Model: QCNFA222. 1 x Wifi card. Support: Bluetooth 4.0. (E.g. you brought wrong model or wrong color). Hope to get your understand!



					www.ebay.com
				



QCNFA222 with AR9462
Notice there are two variants. One with a single notch like above and one with dual notches:








						Dell Atheros QCNFA222 802.11a/b/g/n M.2 BT4 WiFi WLAN Network Card 4K380 04K380  | eBay
					

Find many great new & used options and get the best deals for Dell Atheros QCNFA222 802.11a/b/g/n M.2 BT4 WiFi WLAN Network Card 4K380 04K380 at the best online prices at eBay! Free shipping for many products!



					www.ebay.com
				




Most Wireless M.2 cards that I have seen are the same length= 2242


----------



## phalange (Sep 7, 2020)

Phishfry said:


> What you really have to worry about is this: Does your machine use a BIOS whitelist for hardware.



I may just have to test it. There's some info I found suggesting the whitelists ended with the T450, but that is far from certain.



Phishfry said:


> Notice there are two variants. One with a single notch like above and one with dual notches:
> 
> 
> 
> ...



Excellent. For 6 dollars I'm willing to take a chance. Thanks for this suggestion.


----------



## phalange (Sep 7, 2020)

Ordered the Dell. We'll know on Saturday. 

On a related note, does anyone have a tested/proven 11n USB stick they're using, even if it's large form factor?


----------



## ekvz (Sep 7, 2020)

phalange said:


> Ordered the Dell. We'll know on Saturday.
> 
> On a related note, does anyone have a tested/proven 11n USB stick they're using, even if it's large form factor?



Not at the moment but i could test the WN-722N v1 (WN-721N should be the same chipset just without external antenna) in the next couple of days. Just need to get back home. At the moment there is a good 500km between me and the device and telepatic experiments have disappointed me quite a lot in the past 

At some point i will probably try a bunch of hardware though. There is a wifi mesh on my TODO list and i wonder if i could use FreeBSD. I am curious whats my chances of finding a highpowered 5Ghz dongle/card that works with at least N standard (is there any kind of AC support in FreeBSD yet?).


----------



## phalange (Sep 7, 2020)

ekvz said:


> Not at the moment but i could test the WN-722N in the next couple of days. Just need to get back home. At the moment there is a good 500km between me and the device and telepatic experiments have disappointed me quite a lot in the past
> 
> At some point i will probably try a bunch of hardware though. There is a wifi mesh on my TODO list and i wonder if i could use FreeBSD. I am curious whats my chances of finding a highpowered 5Ghz dongle/card that works with at least N standard (is there any kind of AC support in FreeBSD yet?).



I focused all my brain power on the laptop, but the speed didn't change. I think it actually slowed down a little. I may stick with hardware after all.

To the 11ac question, the answer is no, but the project of getting it has been blessed and will at least see some activity:



			WiFi/80211ac - FreeBSD Wiki
		







						FreeBSD To Sponsor Work For 802.11ac Support - Phoronix
					






					www.phoronix.com


----------



## ekvz (Sep 7, 2020)

phalange said:


> I focused all my brain power on the laptop, but the speed didn't change. I think it actually slowed down a little. I may stick with hardware after all.



I agree, all those sinus waves tend to make me dizzy also.



phalange said:


> To the 11ac question, the answer is no, but the project of getting it has been blessed and will at least see some activity:
> 
> 
> 
> ...



Nice! It's kinda crazy how AC only really got any adoption during the last couple years when it is really from 2013 (https://en.wikipedia.org/wiki/IEEE_802.11#Protocol). Maybe we should skip it and go straight for AY? I am amazed right now how many weird wifi standards there are (which are probably supported just about nowhere - which OS/hardware would let me do something like AD, AF or even infrared wifi!?)


----------



## phalange (Sep 7, 2020)

ekvz said:


> I agree, all those sinus waves tend to make me dizzy also.
> Nice! It's kinda crazy how AC only really got any adoption during the last couple years when it is really from 2013 (https://en.wikipedia.org/wiki/IEEE_802.11#Protocol). Maybe we should skip it and go straight for AY? I am amazed right now how many weird wifi standards there are (which are probably supported just about nowhere - which OS/hardware would let me do something like AD, AF or even infrared wifi!?)



Yeah, looking at the amount of work still to go to get 11ac there, it's hard to imagine the hours it will take. But as an end user it's seriously painful to be saddled with connection protocols from 15 years ago.

Personally I'd prefer a subset of wireless hardware with great support over a mountain of hardware with mediocre support, but it looks like 11ac isn't so compartmental? Maybe the bulk of the work will trickle into many drivers.


----------



## Phishfry (Sep 7, 2020)

We have two camps working on 802.11ac
One for Intel support and Adrian is working on Atheros. Adrian started on AC back in 2015 and just recently restarted development.




__





						I'm back into the grind of FreeBSD's wireless stack and 802.11ac
					

hi!   Yes, it's been a while since I posted here and yes, it's been a while since I was actively working on FreeBSD's wireless stack. Life's...




					adrianchadd.blogspot.com


----------



## ekvz (Sep 7, 2020)

phalange said:


> Yeah, looking at the amount of work still to go to get 11ac there, it's hard to imagine the hours it will take. But as an end user it's seriously painful to be saddled with connection protocols from 15 years ago.
> 
> Personally I'd prefer a subset of wireless hardware with great support over a mountain of hardware with mediocre support, but it looks like 11ac isn't so compartmental? Maybe the bulk of the work will trickle into many drivers.



I consider myself somewhat techsavy but wireless drivers are sadly a bit over my head. I've patched a little here or there (go away powersaving!) but as for writing one from scratch or even just adding support for a new protocol i wouldn't know where to start otherwise i would probably already have contributed a bit. My biggest gripe with open source wireless drivers is DFS/TPC (to use the 5Ghz 1W channels in the EU) or rather the lack of it. I would take this over AC, AX, AY, ... any day (of course both would be best!). Even Linux implements a "usable" form only for a single lonely driver (ath10k) and still nobody really knows if it's actually compliant since there is no reference to test it against. So if i were to deploy it i'd have to pray it actually works and doesn't interfere with some weather radar or whatever (which would likely make people angry at me...).


----------



## elgrande (May 1, 2021)

Hi...
Has any of the participants finally found an USB dongle which can do 802.11n wifi?


----------

