Back in the saddle

I’m visiting my PhD lab this week, it’s so nice to hang out with my buddies and work at the bench again!

2014-09-24 16.27.05


Studious me

Studious me

My main project right now is a solar-powered PiCam that I will be using for time lapse photography on our upcoming drive across the country. So far I’ve gathered the parts and tested the camera:

Auto recursive shot (I refuse to use the word s**f** )

Auto recursive shot (I refuse to use the word s**f** )

The last two days I’ve been working out a method to gracefully shut down the Pi in the event of battery depletion. Although the MoPi looks super cool, it ships from the UK and I’m strapped for cash anyhow. It looks like I will be able to do low power shut down myself using the LBO indicator on the PowerBoost routed to a GPIO pin. Then I’ll write a little script to run in the background and query that pin, safely shutting down the Pi if the signal goes low.

Next up: finishing the wiring and jumping into some Python!

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.*