RPi Ralink WLAN devices

From eLinux.org
Revision as of 09:06, 5 September 2012 by Cygnum (Talk | contribs)

Jump to: navigation, search

How configure RALink based devices on Official Distro (Raspbian) for a WPA-PSK/WPA2-PSK secured network

Source: mikma.eu

1) sudo apt-get install wpasupplicant

2) sudo apt-get install firmware-ralink

3) sudo wpa_passphrase NetworkEssid password

4) sudo joe /etc/wpa_supplicant.conf - paste text from step 3, remove the passkey line

 network={
       ssid="NetworkEssid"
       psk=945609a382413e64d57daef00eb5fab3ae228716e1e440981c004bc61dccc98c
 }

5) sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf - ctrl+c to stop

6) sudo joe /etc/network/interfaces - add:

 auto wlan0
 iface wlan0 inet dhcp
 wpa-driver wext
 wpa-conf /etc/wpa_supplicant.conf

7) sudo ifup wlan0

Alternative method of configuring a ralink network interface card for a WPA-PSK/WPA2-PSK secured network (Somewhat simpler)

Install the wpasupplicant and the ralink firmware:

1) sudo apt-get install wpasupplicant

2) sudo apt-get install firmware-ralink

Restrict access to /etc/interfaces so only root can read it (in this method, this file will contain your network password):

3) sudo chmod 0600 /etc/network/interfaces

Edit you /etc/network/interfaces:

4) sudo nano /etc/network/interfaces

5) The file already contains the configuration for eth0 (your Ethernet port) and looks something like this:

auto eth0
iface eth0 inet dhcp

add the following lines below, enter you network name (ssid) and password:

iface wlan0 inet dhcp
   wpa-ssid <your network ssid here>
   wpa-psk <your network password>

6) save the file.

The network interface will connect every time the RPi boots up. To connect it now manually, run:

7) sudo ifup wlan0


Configuring a ralink network interface card for a WEP-PSK secured network

If at all possible, stop using WEP, and change your access point settings to use WPA/WPA-2 instead. From a security standpoint, WEP is completely broken, meaning that any 12 year old can crack your network password with easily available tools.

If you still want to connect to a WEP secured network (read: unsecured network):

install the ralink firmware:

1) sudo apt-get install firmware-ralink

edit /etc/network/interfaces:

2) sudo nano /etc/network/interfaces

3) add the following below the configuration for eth0:

iface wlan0 inet dhcp
wireless-essid <your network ssid here>
wireless-mode managed
wireless-key s:<your network's "secret" password, known to the whole neighborhood>

4) save the file.

The network interface will connect every time the RPi boots up. To connect it now manually, run:

5) sudo ifup wlan0