Building a Rover project day 6 – wifi

Important note: This steps were validated on the following Angström version:

Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.06.18.img.xz

The difference between this and the previous tutorial is that in the new version of Angström they introduced a light-weight network manager daemon called connman. On one hand this makes things easier but on the other hand it renders all the old tutorials unusable.


To see how to get your hardware running with the BeagleBone read this tutorial:
http://wp.me/p1ILL7-9l

You can check which version are you running:

connmand -v
The output in our case:
0.79

Unfortunately connman seems to be in a less user-friendly shape as the usual linux utilities. By this I mean that there is no direct command line interface to configure but they did set up a test library which contains a few python scripts which you can use to configure things if needed.

root@beaglebone:~# opkg install connman-test

After this you should have the scripts at /usr/lib/connman/test.
Check /var/lib/connman/settings and change WiFi from false to true if necessary.

Create the file which will serve as the default connection config file. You can use your favourite command line text editor, which is vim 🙂

root@beaglebone:~# vim /var/lib/connman/wifi.config

Now add these lines and modify them to fit the network you would like to connect to.

[service_home]
Type = wifi
Name = WIFI_NAME_HERE
Security = wpa
Passphrase = WIFI_PASS_HERE

Important! The wifi.config file must have an empty new line at the end of the above text. Here you can read about it.

Now you should have it running after a reset. Instead of the Windows-style all-reset we can reset only the network interface:

root@beaglebone:~# systemctl restart connman.service

You should have it after a few seconds.

 

Notes about connman:

  • it cannot handle multiple connections at the same time (if some version can, please prove it to me with a tutorial)
  • you can try to use the old tutorials (containing ifup, ifconfig, iwlist, iwconfig, dhclient), but connman will be likely overriding them

References

http://connman.net/documentation

https://wiki.archlinux.org/index.php/Connman

http://www.gigamegablog.com/2012/02/06/beaglebone-linux-101-assigning-a-static-ip-address-with-connman/

http://learn.adafruit.com/beaglebone/wifi

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s