I found this "outdated" tutorial on the Ubuntu forums: How To: set up wpa_supplicant roaming mode and automatically start at boot. I haven't tested it yet, butand it says, almost in an aside down at the bottomworks just fine. The id_str is optional, thatbut allows you can add an "id_str" to your network stanza in wpa_supplicantuse different /etc/network/interfaces entries with different wireless networks.conf file like so:
network={
ssid="MyNetwork"
#psk="text passphrase"
psk=(a huge long number here)
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
id_str="home"
}
and then match that up with a corresponding entry in /etc/network/interfaces:
# This entry is used for any wireless networks without an id_str property
iface default inet dhcp
# This is for wireless networks with an id_str="home"
iface home inet dhcp
and that will cause the wireless network to connect at boot time (though I'm supposing if you're not on the appropriate network. My testing didn't work at first, but it won't happen)turned out that my router wasn't answering the DCHPDISCOVER requests. Editing /etc/network/interfaces to look like this:
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
wpa-debug-level 3
and then running
ifup wlan0 && tail -f /var/log/syslog
allowed me to watch the loading process and find the issue with DHCP.