Headless wifi setup on a Raspberry Pi Zero W

So after drawing inspiration from a couple of people and the fact my daughter is now attending the local Coder Dojo. I thought maybe I should get into a bit of hacking and playing around with coding more so I can help answer some of the inevitable questions.

I now have a Pi Zero (W) sitting on my desk with no easy way of setting it up.
Download the latest Raspbian from here. I’m using 2017-11-29-raspbian-stretch-lite in this example which was the latest as of writing.

Oh and because I still can’t solder very well I got the hammer header set to make things a bit easier. (and so I can use a hammer as a soldering iron!)

So this was completed using OSX and serves mainly as a reference for me, but might also be useful for anyone else trying to get Wifi working on a headless Raspberry Pi Zero W

To get the image on to the SD card:

$ brew cask install etcher

And use the simple interface to select the previously downloaded image and your SD card, if the SD card isn’t showing, unplug it from the card reader and plug it back in.

Once etcher has finished writing the image to the card you should be able to use terminal to access the boot volume of the card:

$ cd /Volumes/boot

Create the files you need:

$ touch wpa_supplicant.conf ssh

ssh remains empty and is just there so that SSH is enabled on the Pi at boot time.

** Note: ** If you look at the boot volume of the SD card once it has been used in a Pi you will find that the two files created aren’t present, it’s ok they are moved to the correct location on start up.

You need to configure the wpa_supplicant.conf with your wireless connection(s):

$ vim wpa_supplicant.conf

Add your wifi configuration(s):

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="ESSID"
    psk="Your_wifi_password"
}

Or for multiple connection profiles:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="ESSID1"
    psk="Your_wifi_password"
    priority=100
}
network={
    ssid="ESSID2"
    psk="Your_wifi_password"
    priority=90
}

Save the file

For added winning following this gist you can also set up your Pi Zero W so that you can ssh into it using a USB connection (just plug your USB cable into the right connection, not the power one)

All done? (maybe) unmount the SD card plug into your Pi and power on.

Once you the Pi has successfully booted up you should be able to access it using ssh pi@raspberrypi.local

To get around the inconvenience of having to type your password:

$ scp ~/.ssh/id_rsa.pub pi@raspberrypi.local:~/.ssh/authorized_keys

Don’t forget to still change the default password on the Pi, every time you log in it will be there just above the prompt until you do anyway.

Lego Porsche 911 GT3 RS

So I was fortunate enough to receive an unexpected box of Lego goodness at the end of last week which just happened to contain the Porsche 911 GT3 RS.  Which meant I spent “some” time over the weekend a) building it and b) explaining to the kids that this wasn’t Lego for them.

This should be a longer post about building the Porsche, but I’ll just let the photos of the build do the “talking” instead.

BT Update

So in fairness to BT my letters to Gavin (letter 1 and letter 2)haven’t gone without a response and my numerous complaints have been handed over to the “Executive Level Complaints: BT Consumer” team and they have been pretty good with updating me with no news or positive updates when they say they will.

However there is now news:

GREAT NEWS

Continue reading “BT Update”

Letter to Gavin

My previous letter can be found here.

So still waiting on a decent internet connection, still being fobbed off, still burning through my 4G data allowance to live life in a modern web based world.

So I’ve sent another letter to Gavin Patterson.  As I mention in the email I’ve been updated of the situation, but the update has been “no you can’t have a usable internet connection even though the planning permission for the estate was granted in 2010 and we’ve had nearly six years to upgrade our systems”

Continue reading “Letter to Gavin”