Robot Control Library
|
Configuring Wifi to work in Debian from the command line is now quite easy thanks to a tool called connmanctl. To set up your BeagleBone Black with a wifi dongle, plug in the dongle while the BeagleBone is powered off then power it on while connected to wifi. These instructions also apply to the BeagleBone Blue, Black Wireless, and Green Wireless.
Once you have restarted your BeagleBone with a wifi dongle plugged in, SSH in with the USB network conenction. Then use ifconfig to confirm the dongle is recognized. Note that no ipv4 address is assigned yet as we haven't yet set up a connection.
Now start the connmanctl tool, enable wifi, and disable wifi tethering. Ignore any warnings regarding VPN connections. Depending on your image tethering may already be disabled.
Now we can scan for networks with 'scan wifi'. Once it says Scan complete, run 'services' to list the available networks.
To connect to a network with WPA/WPA2 security you need to enable the WPA agent. Then connect to your desired networking using the long name listed instead of the SSID. Don't worry, you can use the tab key to autocomplete the name.
Now check to see what ipv4 address your BeagleBone was assigned by your router's DHCP service.
Here you can see my beaglebone was assigned the address 192.168.1.172 which can now be used to SSH in over the network.
Many wifi networks such as those found at universities and enterprises, require a user login instead of a shared passphrase. To demonstrate how to configure connman to connect to such networks, we will use the UCSD campus-wide network as an example.
Start with a normal scan and look for the desired enterprise network.
Note how the type of network is listed as ieee8021x indicating that it uses Network Access Control instead of a typical passkey (psk) as you would find in a consumer home network.
Make a new file in the /var/lib/connman/ directory with a name matching what is listed during the scan. For this example, the name would be 000f540aa884_554353442d50524f544543544544-ieee8021x.config
Fill in this file as follows, replacing the service name, SSID, Identity, and Passphrase with your own details. Your enterprise network may also use an authentication method other than PEAP and MSCHAPV2. Consult the IT help desk for your enterprise for details on that configuration.
Enter your information into the new config file like so:
Restart the connman service and check if the connection was successful