How to switch your WiFi connection to a USB WiFi adaptor on your Raspberry Pi

Recently been researching USB WiFi adaptors a for my Pi3 given I just installed a PCIe Intel 8290 on my Lenovo Thinkstation M93a and I'm getting a whopping 780Mb/s connection through my WiFi broadband router. I'm also running out of ethernet ports on the router and my preference is to use one for my printer instead of it's onboard WiFi as it nicely WoL. I know the 100Mb/s spped of the ethernet isn't going to slow the Pi down on the web server side of things but it will allow me to site the Raspberry Pi closer to the bluetooth devices it interacts with and will hopefully increase the speeds to my computer. Lets get the current state of affairs:

iwconfig

We see that I'm already connected to my WiFi network using the onboard at a measly 24Mb/s:

mc@RaspberryPi3:~ $ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"MYSSIDNAME"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: AA:BB:CC:DD:EE:FF   
          Bit Rate=24 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-37 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:13  Invalid misc:0   Missed beacon:0

I then went ahead and connected my new dongle:

wlan1     IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=3 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

Sadly WiFi is still coneected to my onboard adapter. So we can take down the connection by:

sudo ifconfig wlan0 down

Now re can run netowrk-manager's connection UI:

sudo nmtui

To activate the connection:

And we can see we are now connected:

wlan1     IEEE 802.11  ESSID:"MYSSIDNAME"  
          Mode:Managed  Frequency:5.18 GHz  Access Point: AA:BB:CC:DD:EE:FF   
          Bit Rate=780 Mb/s   Tx-Power=3 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-38 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:1   Missed beacon:0

780Mb/s, nice :-)

You can check your WiFi connection scripts here:

/etc/NetworkManager/system-connections/

it'll show you the connection details, you could probably change them both to be wlan1 or even delete one of them.

Tags : wifi raspberrypi usb linux network

Subscribe to newsletter

Search Posts

Back to top