I am using Ångström Linux on BeagleBoard-xM. I have installed a RTL8188SU USB Wi-Fi adapter and configured it properly. But it doesn't connect automatically even though I have marked the interface as auto in /etc/network/interfaces file. My /etc/network/interfaces file is seen below (only wlan0 settings pasted):

As you can see, there is no inet connection on interface wlan0. When I type ifdown wlan0 and ifup wlan0 consecutively, the wireless connection can be established successfully according to interface settings. The output of ifconfig after restarting wlan0 is shown below:

I like to setup any embedded project with ethernet a static IP so I can ssh into it easily. WiFI is preferred over wired so I can make my project mobile. The great part of doing this was that the BBB didn’t need drivers to work with the Edimax USB WiFi module I have. This is the same one that is often used with the Raspberry Pi. Angstrom to their credit (and some times detriment) is great at keeping up with the latest revisions of packages and drivers.

I first tried to go through the network manager that comes with Angstrom, Connman. Connman was able to setup the WiFi for DHCP no problem. Where it fell down was that it didn’t seem to be able to bring the interface up on boot, nor was it able to configure it with a static IP. I tried to achieve this both through the GUI as well through writing a Connman config file for the wireless interface. So I gave up on Connman. It’s not ready for primetime. Some will argue that Ubuntu’s adoption of it validates it’s readiness. But those of us who’ve suffered through years of poor network managers on Ubuntu know better than to accept that. BUt more to the point, the BBB is an embedded system not a laptop. It shouldn’t be concerned with a GUI interface that let’s a user on the go frequently reconfigure the wireless interface. I plan on building this into something and I want the interfaces to come up reliably the same way every time.

So I decided to get back to basics. First, I needed Connman out of the way. You can disable it like this:

$ systemctl disable connman.service

Next I needed to write a interfaces file to configure both the wired and wireless interfaces.

If you are using encryption on your wireless (and you should) then you’ll want a wpa_supplicant file to help you connect. You’ll need a passkey for this file. YOu can get that for your network like this:

$ wpa_passphrase

Just copy and paste the output into your wpa_supplicant file (/etc/wpa_supplicant.conf). It should look something like this:

Finally, Angstrom doesn’t use init.d so we need more than just auto wlan0 in the interface file to get the interfaces up at boot time. Angstrom is using systemd instead on init. I read that for backwards compatibility systemd will run scripts in the init.d folder, but this didn’t seem to be the case. Regardless, it seems to make sense just to go with the new systemd way of things. So I wrote a quick service configuration to bring up the interfaces on boot. It lives in /etc/systemd/system/net.service.