User Tools

Site Tools


tutorials:products:beaglebone:wifi.html

Introduction

Now that you have your Bone up and running, and Ethernet works, wouldn't it be nice to get rid of that Ethernet cable? Yeah, let's go WiFi! This tutorial is specifically for the verified WiFi adapter for Beagle Bone adapter in the Adafruit shop. It will not work with other WiFi adapters, as they all have different chipsets!

For this tutorial you will need:

Pick these parts up at the Adafruit shop!

Power and WiFi

The BeagleBone has the neat ability to power itself just through the mini USB port. However, this can cause some problems because the USB port cannot supply enough power for BOTH the Bone and a WiFi adapter.

An external power supply is required to use WiFi, due to the power requirements. Flaky behavior, crashes, etc will result if you do not plug in a 5V 2000mA adapter!

Driver Install

You'll need to have Internet connectivity using Ethernet, and also be logged into the terminal to install the WiFi adpater's driver, so make sure to complete those tutorials first!

While logged in, type in opkg update and hit return, you should see the following

then type in opkg list linux-firmware-rt* and hit return

Finally type in opkg install linux-firmware-rtl8192cu and press return. Plug in the WiFi dongle, then type in reboot and return to reboot the machine

Now that its rebooted, check dmesg - you should see the following

And if you type in ifconfig wlan0 there should be a link, it wont be connected yet so there's a lot of 0's and no inet addr

Now we can set up the connection manager to automatically manage the wifi. Edit /var/lib/connman/settings (I use vi but nano is also installed) and change WiFi from false to true, save it

Create a file /var/lib/connman/wifi.config with your settings as shown below, starting with the [service_home] line and with a return after the Passphrase line, of course this should match your home network, not the adafruit one!

Restart connman to get it to accept the new settings:

root@beaglebone:~# systemctl restart connman.service

After less than 30 seconds or so, you should be connected:

root@beaglebone:~# ifconfig wlan0

There should now be an inet addr You can then test pinging an IP address and a domain name

Finally, if you want more detailed information about your link you can opkg install wireless-tools to get the iwconfig command, which will give you tons of details.

Troubleshooting

If you get an error device descriptor read/64, error -71, reboot and stop the boot process with the space bar. Then add the following boot option with the follow at the U-Boot prompt

setenv bootargs irqpoll RETURN

boot RETURN

=== SOME NOTES & SUGGESTIONS FROM RICBLUE, AN ADAFRUIT CUSTOMER ===

After much frustration, I have wifi working on my BeagleBone (using latest 2012-06-18 build of Angstrom)

There is clearly lots of confusion about Connman so I thought I'd share my findings. I'm not a Unix guru so your mileage may vary but hopefully this will be helpful:

1) CONNMAN APPEARS TO ONLY ALLOW ONE CONNECTION AT A TIME

This was the key for me. I was following these LadyAda directions in order, first Ethernet + SSH login to BeagleBone, then use that to set up Wifi.

It appears that the only thing stopping my wifi from connection was that I STILL had my Ethernet connected. I unplugged by Ethernet, rebooted (unplug/replug the power to the BB) and THAT allowed the wifi connection to be made

Does anyone understand Connman configurations in enough detail to know if any of the following are possible…

– simultaneous Ethernet and Wifi?

– setting up a series of wifi SSIDs in order of preference?

Also… – what are the valid options for different types of Wifi security. I used "psk" for a WPA (not WPA2) network, that seemed to work.

2) ALTERNATIVES TO CONNMAN

It appears you either use Connman and can ignore (not specify anything in) /etc/network/interfaces and wpa_supplicant). OR you can uninstall Connman and use those tools instead.

Maybe someone can clarify what the pros and cons are. At least if you are trying to follow the approach in this LadyAda post, it appears you can ignore anything you read online about those other configuration options

3) CONNMAN TOOLS These are very helpful to know about…

use:

opkg install connman-tools

(the blog post I read suggested " Maybe it will require additionally python-gobject. " - this wasn't necessary (or recognized) with my Angstrom build)

then:

cd /usr/lib/connman/test ./connman-test

and:

./get-services

That should really help with debugging problems. That showed me that the wifi stick could see my networks and all the Connman field values for each

4) SOME USEFUL DOCUMENTATION SOURCES ON CONNMAN…

The only in depth write up of Connman that I've found…

http://git.kernel.org/?p=network/connman/connman.git;a=blob_plain;f=doc/overview-api.txt;hb=HEAD

Several BeagleBoard user group posts which have useful clues:

https://groups.google.com/forum/?fromgroups#!searchin/beagleboard/connman$20wifi/beagleboard/o2B7LJq9u3U/rAEfJ-f6NC8J

  1. - particularly this post but the whole thread is useful

Description of Connman tools and Connman to set static IP address on the BB (I do it using the router)

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

/home/ladyada/public_html/wiki/data/pages/tutorials/products/beaglebone/wifi.html.txt · Last modified: 2016/01/28 18:05 (external edit)