Dropping the wires on the Raspberry PI

Testing the RPi for some remote sensing application I needed to use a wireless connection as it would have been a pain to reach with an Ethernet cable.

Parts

  • Raspberry Pi Series B 512MB
  • Raspbian 3.6.11+ Kernel
  • Comfast 802.11n – Realtek RTL8188CUS WLAN Adapter

Install WPA Supplicant

sudo apt-get install wpasupplicant
See http://en.wikipedia.org/wiki/Wpa_supplicant

Check for the USB adapter

sudo lsusb
This should show output similar to this (depending on your USB adapter)
Bus 001 Device 004: ID 0bda:8176 Realtek SemicondRTL8188CUSuctor Corp. 802.11n WL:AN Adapter

Generate PSK Key

If you want to use the cleartext PSK you could probably skip this step.
wpa_passphrase YOUR_SSID YOURCLEARTEXTWPAKEY
This should show output similar to this:
network={
ssid="YOUR_SSID"
#psk="YOURCLEARTEXTWPAKEY"
psk=c885c4288a0c68b989289586cb075c0ccd1729d2c035820d02ed813fc729f317
}

Edit network configuration

sudo vim /etc/network/interfaces
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "YOUR_SSID"
wpa-psk c885c4288a0c68b989289586cb075c0ccd1729d2c035820d02ed813fc729f317

Finish off

sudo shutdown -h now
Unplug ethernet cable
Power up the RPi and you should see another wireless DHCP assignment on the router

Leo Gaggl

ict business owner specialising in mobile learning systems. interests: sustainability, internet of things, ict for development, open innovation, agriculture

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu