How to setup a USB wlan connection on a Raspberry Pi

A little while ago I got myself a Raspberry Pi to tinker around. I didn’t know anything about Linux / Debian / Wheezy but I was inspired by the many different kind of applications of the Raspberry Pi that I read about on the internet.

In the meantime I’ve managed to turn the Raspberry into an Airpi. It took me some time to figure everything out, but I finally got there.

Every time I want to change/add some functionality I find myself spending lots of time Google-ing for the right solution. The solutions that work I’ll share on this blog so you can save some time achieving the same.

Today I figured out how to setup and enable the USB wlan connection on the Raspberry Pi and make it connect to my wireless network.

update, I’ve also posted an alternative solution: How to setup a USB wlan connection on a Raspberry Pi – alternative method

I got two usb wlan adapters which I both tested and seemed to work with this method:

Edimax WLAN Hi-Speed USB 2.0 EW-7811Un Nano

WLAN 11n USB Micro Stick US300EX Lite

First you need to configure the network adapter interface

sudo nano /etc/network/interfaces
#———————————————-
# This file describes the network interfaces available on your system
# and how to activate them.
# The loopback network interface
auto lo
iface lo inet loopback
# the LAN network interface
auto eth0
iface eth0 inet dhcp
# the WLAN network interface
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

#———————————————-

Then you need to set the wlan parameters

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
#———————————————-
network={
ssid=”put your SSID here”
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
auth_alg=OPEN
psk=”put your psk here”
}
#———————————————-

Then you need to reboot

sudo reboot
Advertisements

2 thoughts on “How to setup a USB wlan connection on a Raspberry Pi

  1. Pingback: Turning your Raspberry Pi into an AirPi with iOS6 support | raspberrypi4dummies

  2. Pingback: How to setup a USB wlan connection on a Raspberry Pi – alternative method | raspberrypi4dummies

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s