One of the final steps in a to-be-announced project involved getting a headless Raspberry Pi up on WiFi at boot time—which turned out to be a little more challenging that first expected. Not because it was particularly difficult, but because the documentation was poor.
Below are my full configuration files that were required. The WiFi USB dongle itself was an Adafruit USB WiFi with Antenna which is actually a B-LINK BBL-LW05-AR5; notable becuase of its sizeable antenna, and for working with the latest Raspbian Wheezy distribution.
Prior to getting started, make sure your Raspbian is up to date by issuing:
At that point, reboot and connect your WiFi module to USB. Then, edit your config. It’s worth noting that I have an interface
eth0 which is set to DHCP, and my
wlan0 interface which has a static IP. This allows me to use ethernet as a failsafe if something goes wrong.
First, in the file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
This is setting up your ethernet to dhcp, your wifi to manual, sourcing the
wpa_supplicant.conf file, and then assigning your named Wireless connection to a static IP. Note that YOUR_WIFI_ID above should be an identifier you make up yourself. For example, mine is NORTH_WPA.
Now, configure the network information in
1 2 3 4 5 6 7 8 9 10 11
Again, note that YOUR_WIFI_ID is present.
At that point, reboot. Assuming you’ve got all your information correct (and that your key management and etc. match mine) you’ll be connected automatically at boot!
Much of the information in this post was gleaned from this thread. The original poster’s information didn’t work for me, but I was able to assemble a working config from various commenters’ information.
When I switched from the older-style Airport Extreme base stations to the new “tower”-shaped base stations, I was having issues with the WiFi disconnected and then not reconnecting without a reboot. To resolve this, I followed one of the answers in this stack exchange post, reproduced below for convenience. This is originally from the user AndaluZ:
Well, there is a very simple solution:
- Go to
/etc/ifplugd/action.d/and rename the
- Then do:
cp /etc/wpa_supplicant/ifupdown.sh ./ifupdown
That’s all. Test this by turning off/on your AP; you should see that your Raspberry Pi properly reconnects.