Difference between revisions of "BBBWiFiConfigs"

From eLinux.org
Jump to: navigation, search
(Working WiFi Configurations for the BeagleBone Black)
Line 1: Line 1:
 
= Working WiFi Configurations for the BeagleBone Black =
 
= Working WiFi Configurations for the BeagleBone Black =
Complete step-by-step guide to getting WiFi running for your BeagleBone Black
+
Complete step-by-step guide to getting WiFi running for your BeagleBone Black.
 +
Note: The instructions should in general work for _any_ WiFi adapter (assuming that the correct driver is already present or has been installed).
 +
Review any WiFi-adapter specific instructions if they are listed here, otherwise continue with the General Instructions below.
  
== UWN100 / UWN200 ==
+
== General Instructions ==
Tested with Debian image: BBB-eMMC-flasher-debian-7.4-2014-03-04-2gb.img
 
 
Perform steps 1 and 2 without plugging in the WiFi device.
 
Perform steps 1 and 2 without plugging in the WiFi device.
 
All steps are performed as root user:
 
All steps are performed as root user:
 
=== 1. Create file /etc/wpa_supplicant/wpa_supplicant.conf ===
 
=== 1. Create file /etc/wpa_supplicant/wpa_supplicant.conf ===
 +
==== WPA (this will be the usual case) ====
 
Inside the speech-marks, change my_ssid to be the SSID name, and my_psk to be the alphanumeric text key (not hexadecimal) of up to 63 characters.
 
Inside the speech-marks, change my_ssid to be the SSID name, and my_psk to be the alphanumeric text key (not hexadecimal) of up to 63 characters.
 
<source>
 
<source>
Line 21: Line 23:
 
}
 
}
 
</source>
 
</source>
=== 2. Modify /etc/network/interfaces file ===
+
==== WEP (If you have an incredibly old network) ====
Place these four lines at the top of the file:
+
<span style="color:#FF0000;">NOTE: Running WEP today is a very silly idea. Move to WPA. </span>
 +
<source>
 +
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 +
update_config=1
 +
network={
 +
    ssid="you have been compromised already"
 +
    key_mgmt=none
 +
    auth_alg=OPEN
 +
    wep_key0=0123456789abcdef0123456789
 +
    wep_key1=0123456789abcdef0123456789
 +
    wep_key2=0123456789abcdef0123456789
 +
    wep_key3=0123456789abcdef0123456789
 +
}
 +
</source>
 +
 
 +
=== 2. Identifying the interface name ===
 +
First, type
 +
 
 +
<tt>ifconfig -a </tt>
 +
 
 +
Then, plug in the USB adapter, and again type:
 +
 
 +
<tt>ifconfig -a </tt>
 +
 
 +
Make a note of the new interface name. It may be 'wlan0' or 'ra0' or 'eth1' or similar.
 +
 
 +
=== 3. Modify /etc/network/interfaces file ===
 +
Place these four lines at the top of the file (change 'ra0' on the first and second line here to be whatever the interface name is for your WiFi adapter:
 +
 
 
<source>
 
<source>
 
allow-hotplug ra0
 
allow-hotplug ra0
Line 29: Line 59:
 
iface default inet dhcp
 
iface default inet dhcp
 
</source>
 
</source>
=== 3. Work around a driver file location issue ===
 
Enter the following commands:
 
 
<tt>mkdir -p /etc/Wireless/RT2870STA
 
  
mv /etc/Wireless/RT2870/RT2870STA.dat /etc/Wireless/RT2870STA/RT2870STA.dat</tt>
 
 
=== 4. Final steps ===
 
=== 4. Final steps ===
Plug in the USB WiFi adapter, and then type:
+
With the USB WiFi adapter inserted, type (change 'ra0' to be your interface name):
  
 
<tt>ifup ra0</tt>
 
<tt>ifup ra0</tt>
  
 
Then, power down safely (e.g. press switch S3 on the BBB), unplug the Ethernet cable and power back up.
 
Then, power down safely (e.g. press switch S3 on the BBB), unplug the Ethernet cable and power back up.
Log on to your router and check what IP address has been assigned to your BBB.
+
Log on to your router web page and check what IP address has been assigned to your BBB (in the DHCP assignments section).
  
 
The WiFi adapter while plugged in, will overide the Ethernet connection. Unplug the WiFi adapter to reuse the Ethernet connection.
 
The WiFi adapter while plugged in, will overide the Ethernet connection. Unplug the WiFi adapter to reuse the Ethernet connection.
 +
 +
==  UWN100 / UWN200 ==
 +
The interface name should be ra0
 +
 +
Tested with Debian image: BBB-eMMC-flasher-debian-7.4-2014-03-04-2gb.img
 +
=== Work around a driver file location issue ===
 +
Perform this before the General Instructions above.
 +
 +
Enter the following commands:
 +
 +
<tt>mkdir -p /etc/Wireless/RT2870STA
 +
 +
mv /etc/Wireless/RT2870/RT2870STA.dat /etc/Wireless/RT2870STA/RT2870STA.dat</tt>
 +
 +
Then continue from step 1 in the General Instructions above.

Revision as of 07:48, 9 March 2014

Working WiFi Configurations for the BeagleBone Black

Complete step-by-step guide to getting WiFi running for your BeagleBone Black. Note: The instructions should in general work for _any_ WiFi adapter (assuming that the correct driver is already present or has been installed). Review any WiFi-adapter specific instructions if they are listed here, otherwise continue with the General Instructions below.

General Instructions

Perform steps 1 and 2 without plugging in the WiFi device. All steps are performed as root user:

1. Create file /etc/wpa_supplicant/wpa_supplicant.conf

WPA (this will be the usual case)

Inside the speech-marks, change my_ssid to be the SSID name, and my_psk to be the alphanumeric text key (not hexadecimal) of up to 63 characters.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
 ssid="my-ssid"
 scan_ssid=1
 psk="my-psk"
 proto=RSN
 key_mgmt=WPA-PSK
 pairwise=CCMP
 auth_alg=OPEN
}

WEP (If you have an incredibly old network)

NOTE: Running WEP today is a very silly idea. Move to WPA.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
     ssid="you have been compromised already"
     key_mgmt=none
     auth_alg=OPEN
     wep_key0=0123456789abcdef0123456789
     wep_key1=0123456789abcdef0123456789
     wep_key2=0123456789abcdef0123456789
     wep_key3=0123456789abcdef0123456789
}

2. Identifying the interface name

First, type

ifconfig -a

Then, plug in the USB adapter, and again type:

ifconfig -a

Make a note of the new interface name. It may be 'wlan0' or 'ra0' or 'eth1' or similar.

3. Modify /etc/network/interfaces file

Place these four lines at the top of the file (change 'ra0' on the first and second line here to be whatever the interface name is for your WiFi adapter:

allow-hotplug ra0
iface ra0 inet manual
  wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

4. Final steps

With the USB WiFi adapter inserted, type (change 'ra0' to be your interface name):

ifup ra0

Then, power down safely (e.g. press switch S3 on the BBB), unplug the Ethernet cable and power back up. Log on to your router web page and check what IP address has been assigned to your BBB (in the DHCP assignments section).

The WiFi adapter while plugged in, will overide the Ethernet connection. Unplug the WiFi adapter to reuse the Ethernet connection.

UWN100 / UWN200

The interface name should be ra0

Tested with Debian image: BBB-eMMC-flasher-debian-7.4-2014-03-04-2gb.img

Work around a driver file location issue

Perform this before the General Instructions above.

Enter the following commands:

mkdir -p /etc/Wireless/RT2870STA

mv /etc/Wireless/RT2870/RT2870STA.dat /etc/Wireless/RT2870STA/RT2870STA.dat

Then continue from step 1 in the General Instructions above.