Tuesday, August 5, 2014
On 3:23 PM by Anonymous
BeagleBone Black Angstrom WiFi Installation and Troubleshooting Guide
WiFi installation on the BeagleBone Black is a popular project for anyone working with the growing ARM platform. Unfortunately it can also be one of the most challenging products due to the number of potential variables in play. From the brand and type of WiFi adapter, to the various idiosyncrasies of the various operating systems, we’ve heard from many BeagleBone users that WiFi installation can be frustrating. We’ve created this step by step guide to try and take the mystery out of the process.For this tutorial we’ll look at installing the MT7601 WiFi adapter, the chipset found inside both the UWN100 and UWN200 WiFi adapters. Both have been tested and verified to work with Linux ANGSTROM on the BeagleBone Black.
IMPORTANT NOTES:
(1) During operation (transmitting and receiving) WiFi adapters draw more power. The USB power alone may not be sufficient to power both the BeagleBone and the USB WiFi adapter and under-powering can cause a wide range of unpredictable problems. Because of this we recommend the use of a PW5V-2A high current ac-adapter during the WiFi installation process.(2) Be sure to remove the the Ethernet (RJ45) network cable before installation.
(3) The latest ANGSTROM Linux distribution images can be found here.
(4) The Wireless modem/router being used to connect to the internet must be configured with WPA2 encryption (do not use WEP).
To view your version:
uname -a
You can view the revision in the ID.txt file in the removable drive that appears when you connect to the BeagleBone.
What You Will Need
- BeagleBone Black (with Angstrom Linux)
- Power Adapter DC5V/2A, 10W (strongly recommended)
- BeagleBone expandable case Orange or Black (recommended)
- USB WiFi Adapter UWN100 (compact version) or
- USB Wifi Adapter UWN200 (with 4" Antenna)
- Router/Modem (configured with WPA encryption)
- USB to TTL Debug Cable (optional)
- 6-pin Right-Angle Header adapter (optional)
STEP 1 - Verify That The WiFi Adapter and Driver are Present
The Angstrom Linux distribution includes the MT7601 driver. This can be verified by booting the BeagleBone with the UWN100 or UWN200 USB Wifi adapter installed and the Ethernet cable removed.Power the BeagleBone with the ac-adapter.
Connect to the BeagleBone using SSH(putty) or Serial Cable.
Login as root. Password: (enter)
To view the USB wireless adapter, type:
lsusb
lsmod
All is good, the driver is located and installed.
STEP 2 - Verify That the Adapter is Running
ifconfig
The "ra0" section indicates the device status. The presence of this "ra0"section indicates that the device and drivers are both working correctly. "ra0" means Ralink adapter 0.
STEP 3 - WPA2 Encrypted Access (do not use WEP)
To connect to a WPA protected wireless network, first encrypt the WPA passphrase.wpa_passphrase [SSID] [passphrase]
As an example:
root@beaglebone:~#if wpa_passphrase myhome mysecretpsw network={ ssid="myhome" #psk="mysecretpsw" psk=b8721a39d4e01b85a44c5ca932ce742f4a3da0bfb44712150116ff56da476cd1 }Copy the output (psk=....), we will need it in a second.
Use nano to edit the Connman config file:
nano /var/lib/connman/wifi.config
and enter:
[service_home] Type = wifi Name = MySSID Passphrase = YourEncryptedPassPhrase
NOTES:
1) Replace MySSID with your SSID name.
2) Replace YourEncryptedPassPhrase with the encrypted output you saved from above.
3) Do not put your SSID in quotes, even if it contains spaces.
Exit and Save: (Ctrl-X), Y, (enter)
Reboot
shutdown -h now
NOTE: Ethernet cable must be disconnected from the BeagleBone for the wifi to automatically connect.
STEP 4 - Verifying Connection
Check that you have been assigned a connection:
ifconfig ra0
Look for inet addr: XX.XX.X.XXX this is your dhcp assigned IP address.
NOTES:
1) If you do not get an IP address assigned, repeat STEP 3 carefully once more.
2) Verify that you are using WPA encryption (modem/router) and NOT Wep.
Finally you can access the network.
STEP 5 - Network Access
(Ping Test)STEP 6 - Web Access
Your SSH session can only display text. To browse the web from the BeagleBone Black, you can connect a monitor and keyboard directly or VNC into the BeagleBone.Example VNC session.
Example Chromium Web Browsing. (Application->Internet->Chromium)
Troubleshooting Guide
- Are you running (latest) Angstrom Linux? Check for updates:
opkg update && opkg upgrade
- Incorrect passphrase or SSID? (verify and re-enter data)
- Are you using WPA2 encryption? (do not use wep)
- Ethernet cable plugged in to BeagleBone (remove from RJ45)?
- Wireless device out-of-range? (try getting closer to wireless link)
- Adapter not installed before cold boot? (reboot with Wifi adapter installed)
- Use ac-adapter to power the BeagleBone and Wifi Adapter
ip linkLook for 'ra0' and the status reported.
WEP is an older security protocal, with security issues. Configure Modem/Router for WPA2.
You can test your interface with:
/usr/lib/connman/test/connman-test services
Indoor 50m-100m (Theoritical)
Outdoor 100m-200m (Theoritical)