Dropping the wires on the Raspberry PI
By Leo Gaggl
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={<br></br>ssid="YOUR_SSID"<br></br>#psk="YOURCLEARTEXTWPAKEY"<br></br>psk=c885c4288a0c68b989289586cb075c0ccd1729d2c035820d02ed813fc729f317<br></br>}
Edit network configuration
sudo vim /etc/network/interfaces
auto wlan0<br></br>allow-hotplug wlan0<br></br>iface wlan0 inet dhcp<br></br> wpa-ssid "YOUR_SSID"<br></br> 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