Networking your BeagleBone Black can be achieved in several ways, most common way is to connect a cable to the build in Network Interface and your up and running, another way is to simply connect a USB cable and plug it into your machine.
We will be using an off the shelf cheap USB dongle that can be found almost anywhere for a few bucks, using a pre-installed BeagleBone Black Rev. C running Ubuntu Server and a TP-Link USB WiFi adapter, if you’re using a different adapter you may want to first make sure that it is supported by Ubuntu Server first.
This Guide Assumes you have a clean install of the Ubuntu Server 18.04 and you have root access and checked to make sure your USB WiFi is supported by Ubuntu.
1. Power On.
power on your BeagleBone Black and make sure the network cable is connected.
2. SSH.
Now your ready to SSH into your BeagleBone Black.
$ ssh miles@192.168.0.45
3. Plugin USB WiFi Adapter.
Now that your powered up and logged in you can insert the USB WiFi Adapter and allow the system to recognize it.
4. Start Connection Manager Daemon.
You may see an error regarding VPN connections .. as we are not setting one up in this guide you can simply ignore it.
5. Disable WiFi tethering.
A Tethered WiFi adapter may cause issues with normal networking operations so we will be sure to disable any possible tethering.
6. Enable WiFi.
We need to make sure that WiFi is enabled.
7. Scan For Networks.
Now run a scan for all possible networks available in your immediate area
8. List Networks.
To show a list of the networks you scanned for.
9. Start Agent.
This is used for the interaction between you and the network you are trying to connect to, it will handle setting the pass phrase.
10. Static IP.
If you do not wish to create a static IP please skip to step 13. The config command is a bit more complex in this step we will configure <Device><Type><Mode><NEWIP><SUBNET><Gateway>
For more information on connmanctl please visit the Manpage
connmanctl> config wifi_60e3270f86e2_xxxxxxxxxxxx_managed_psk ipv4 manual 192.168.0.10 255.255.255.0 192.168.0.1
11. DNS.
If you know your ISP DNS server address please use it here other wise you will need to look at your main router settings or call them to make sure you are using a trusted DNS service.
connmanctl> config wifi_60e3270f86e2_xxxxxxxxxxxx_managed_psk --nameservers x.x.x.x
12. Disable IPv6.
This is optional and is only done to help secure things since only one address is needed for an internet connection.
connmanctl> config wifi_60e3270f86e2_xxxxxxxxxxxx_managed_psk ipv6 off
13. Connection.
Now your ready to connect to your WiFi Router.
connmanctl> connect wifi_60e3270f86e2_xxxxxxxxxxxx_managed_psk
14. Passphrase.
Now enter the passphrase for your WiFi network.
15. Connected.
After you enter your passphrase you should get a confirmation that you are connected.
16. Exit Connection Manager Daemon.
Now you should be setup and ready to go. To exit use quit.
17. List Interfaces.
If you did not assign a static IP to your device you need to see what one was assigned to it automatically. Look for ‘wlan0’ and check the IP that was assigned to it.
$ ifconfig -a
18. New Terminal.
To test it open a new terminal and SSH into your BeagleBone Black using the new IP address you just assigned it.
$ ssh miles@192.168.0.123
Congratulations !! you have just setup your USB Wifi adapter on your BeagleBone Black.
Hi. When I reboot my BBB ubuntu 18.04 all wi-fi config are lost. How can I fix that ?
LikeLike
the guide mentioned is for Ubuntu that is flashed directly to the EMMC onboard memory and as i did just go threw every thing step by step to make sure nothing has changed my BBB does retain the WIFI settings just fine, i would suggest trying it again and if not working then maybe try it with a fresh install, without more information about your setup and versions i can not speculate any further.
LikeLike