==== 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 **[[http://www.adafruit.com/products/814|WiFi adapter for Beagle Bone]]** adapter in the Adafruit shop. It will not work with other WiFi adapters, as they all have different chipsets! [[http://www.ladyada.net/images/beaglebone/wifiplug.jpg|{{ http://www.ladyada.net/images/beaglebone/wifiplug_t.jpg?nolink&500x385 |}}]] For this tutorial you will need: ***[[http://www.adafruit.com/products/513|Beagle Bone ]]****** ***[[http://www.adafruit.com/products/814|WiFi adapter]]** ***[[http://www.adafruit.com/products/276|5V 2000mA Power Adapter]]** 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 [[http://www.adafruit.com/products/276|5V 2000mA adapter!]] ==== Driver Install ==== You'll need to have [[http://www.ladyada.net/products/beaglebone/ethernet.html|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 **{{ http://www.ladyada.net/images/beaglebone/opkg-update.gif?nolink&794x283 |}}** then type in **opkg list linux-firmware-rt*** and hit return {{ http://www.ladyada.net/images/beaglebone/list-pkg.gif?nolink&759x250 |}} 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 {{ http://www.ladyada.net/images/beaglebone/postreboot.gif?nolink&666x211 |}} 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** {{ http://www.ladyada.net/images/beaglebone/ifconfigwlan0.gif?nolink&626x224 |}} 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 {{ http://www.ladyada.net/images/beaglebone/viconnman.gif?nolink&635x406 |}} 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! {{ http://www.ladyada.net/images/beaglebone/wificonfig.gif?nolink&627x198 |}} Restart connman to get it to accept the new settings: ** root@beaglebone:~# systemctl restart connman.service** {{ http://www.ladyada.net/images/beaglebone/resetartconnman.gif?nolink&649x185 |}} After less than 30 seconds or so, you should be connected: ** root@beaglebone:~# ifconfig wlan0** {{ http://www.ladyada.net/images/beaglebone/wlan0up.gif?nolink&613x263 |}} There should now be an **inet addr **You can then test pinging an IP address and a domain name {{ http://www.ladyada.net/images/beaglebone/wlanping.gif?nolink&613x263 |}} {{ http://www.ladyada.net/images/beaglebone/wlandns.gif?nolink&613x263 |}} 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. {{ http://www.ladyada.net/images/beaglebone/installwirelesstools.gif?nolink&874x198 |}} {{ http://www.ladyada.net/images/beaglebone/iwconfig.gif?nolink&590x263 |}} === 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]] -- 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/]]