I was having no success setting up the wifi until I hit this thread (
http://raspberrypi.stackexchange.com/questions/11631/how-to-setup-multiple-wifi-networks/11738#11738)
Here's my working config...
the critical component was pairing up
id_str="mywifi" with
iface mywifi inet dhcp. Until I did that it would connect but wouldn't obtain an ip address.
/etc/wpa_supplicant/wpa_supplicant.conf
code:
- network={
- ssid="myssid"
- scan_ssid=1
- mode=0
- proto=WPA2
- auth_alg=OPEN
- pairwise=CCMP
- group=CCMP
- key_mgmt=WPA-PSK
- psk="mypassword"
- id_str="mywifi"
- priority=1
- }
/etc/network/interfaces
code:
- # Local loopback
- auto lo
- iface lo inet loopback
- allow-hotplug wlan0
- iface wlan0 inet manual
- wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
- iface mywifi inet dhcp
- allow-hotplug eth0
- iface eth0 inet static
- address 192.168.1.14
- netmask 255.255.255.0
- gateway 192.168.1.1
- dns-nameservers 192.168.1.1