A truly headless and wireless Raspberry Pi (with Mac OSX and an SDcard reader)

***Okay, “wireless” is a bit of a misnomer right now, at this point I still need to power my Pi through the wall or a computer. This little detail will be eliminated once solar panel et al. arrive from Adafruit!***
I found myself in a precarious situation of late, having brought my Pi with me on an extended road trip with just my mac and no peripherals (except a goofy little USB SDcard reader that looks like it came out of a Cracker Jack box). I intend to use this Pi in a headless and wireless project, so I figured I should bootstrap this puppy and never plug in all those needless extras (ethernet cable, monitor, keyboard, mouse…which of course I don’t have in my meager road trip supply).

The challenge: starting from a Pi + Edimax wifi adapter + fresh installation of Raspbian Wheezy (release date  2014-09-09), configure a wireless network connection to allow SSHing without ever connecting an ethernet cable, external monitor, or keyboard.

The drivers for this particular wifi adapter are included in the latest versions of Wheezy, so it should work out of the box. We just need the Pi to automatically connect to a given network when it boots.

One suggestion I found was to change the network interface file on the SDcard (last comment on this page, also here).

The only trick here is that you need to access the wireless configuration on the Pi’s boot disk, which is problematic because the file format is not compatible with Mac OSX. This site suggested using a virtual Linux installation, so I made an Ubuntu 14 machine using VirtualBox.

Making sure the SDcard is ejected on the OSX side, mount the drive from within Ubuntu and voila, you’re free to edit /etc/network/interfaces to include the ssid and password of any wireless network.

Now, with the SDcard back in the Pi, boot that sucker up and watch for the wifi adapter to start blinking sporadically (apparently this is a good sign). Do an IP scan to discover the Pi’s address and then it’s a simple matter to blind SSH using the default user/password:

ssh pi@
password: raspberry

And there you have it, terminal access to the Pi without connecting any peripherals!

Big thanks to my friend William who showed me how to scan the IP addresses connected to a given network. He suggested using Angry IP Scanner, although the nmap utility also works well, adjusting the search IP according to your terminal’s address, e.g.:

nmap -sP 192.168.1.*

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s