Tags

, ,

Since yesterday, I have been trying to configure my WiFi dongle on Raspberry Pi by following some tutorials here and there. However it was to no avail.

I tried wicd-curses as well. I think it is good and it is able to detect the WiFi available. However, just one problem with it. I could not save my configuration using F10! I couldn’t exit the wicd-curses program as well. So I removed it because multiple wlan0 configuration files will interfere with each other.

wicd-curses

I continue searching for the right configuration using command line and I found this site. I’m using DHCP so my configuration for /etc/network/interfaces look like this:
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

*note that wpa-roam is for manual only

And the WPA configuration sudo nano /etc/wpa_supplicant/wpa_supplicant.conf looks like this:
network={
ssid="SSID-GOES-HERE"
psk="WIFI-PASSWORD-GOES-HERE"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
auth_alg=OPEN
}

Unplug the Ethernet cable and type
sudo /etc/init.d/networking restart
Tadaa~ I’ve got DHCPOFFER and DHCPACK from the WiFi router and R-Pi is not connected to the internet using the wifi dongle!
raspberry pi wifi

By using WiFi, it is much more convenient to install Raspberry Pi at anywhere without to consider how to route the Ethernet cable. However this wifi connection is currently configured to my room only (thank my roomie for sharing the router and password!) and if I set this up using my campus Wifi, I’m not too sure how to do it as it requires user authentication and login.

Next up, I will try to change the IP for Raspberry Pi to static. 🙂

Advertisements