Sniffing planes out of thin air

Hey you! Up in the sky!

One thing I always wondered when I started my Raspberry Pi adventure was how many things I’d do with it and how quickly I’d put it down and never play with it again.

The first task my Pi 3 had was as a Minecraft server for my wife and I, but we’ve kinda given up on the game as it’s all a bit samey. We killed the dragon finally and I’ve given up on finding an End City.


Then I had TinyProxy running on there to help get around my place of work’s overly-aggressive web filter. It also saved my bacon a few times when we lost our routes out of the Janet academic network to our various cloud (ugggh!) services. An SSH tunnel to my Pi restored service to our campus.

More recently I’ve got back into coding (I’m not good at it) and I’ve been using it as a development platform. I wrote the Teletext Twitter software that you can now find live on the Teefax service at http://teastop.plus.com:8080 - this was by far my most rewarding project and I learnt a lot about Python from it.


Finally I’ve been using the Pi as a BOINC data cruncher and as a controller for my other hosts running in the cloud. It’s not especially fast, as you’d expect, but it’s a nice bonus to my credit total.

Leavin’ on a jet plane

I got a bit bored though. And I was afraid that I’d hit finally hit a wall. I tried to think of things that interested me that I hadn’t done for a while and I suddenly had an inspiration: I’ve been into radio scanning and monitoring for years, but more recently (since I got a life, basically) I gave up on it. So I dug my scanner out of the loft and had a play to see what there was around me. Quite a lot, it seems. Not quite as fun these days, but good enough to get me back into scanning.

I’d also read about RTL-SDR dongles, and after a quick Google I realised I could marry my love of aviation as well and install an ADS-B tracker to scan my local sky and also feed data to some of the flight tracker websites that seem popular these days. Much like BOINC this is a project that helps a community and I like being benevolent like that.

There’s a lot that’s already been written about ADS-B, so the simple explanation for this blog is that it’s a broadcast radio system that aircraft use to send out position and altitude data for collision avoidance and navigation purposes.

I live in Edinburgh now and live fairly close to the airport, so the idea to use the radio scanner to listen to the ATC and also get a flight tracker up and running on the Pi was really appealing. There’s plenty of tutorials on doing it but this is a learning experience and I like writing so I thought I’d go with it. Maybe it’ll be a better tutorial for someone out there and I’ll mention any issues I had along the way as well.

Come fly with me, let's fly, let's fly away

As with the last Pi I built it was off to The Pi Hut to buy some parts. Googling revealed that a Pi Zero was good enough for the task and expense was (isn’t it always?) a factor in this project. Annoyingly I couldn’t add a case to any of the kits they sell. Cases can only be bundled with a Zero W board on its own. So I had to buy a PSU as separate item and an SD card from Amazon.

There’s also the small matter of the RTL-SDR dongle and an antenna. You may be tempted to buy this from a Pi store too, but I’d advise against that. The dongles sold on those sites aren’t always the best. For a start they make it impossible to listen to lower frequency bands - most of the generic ones stop at 24MHz. The RTL-SDR blog sells a specially modified dongle that improves reception, has a more sane SMA antenna socket and also enables tuning on the lower frequency bands - plus lots of other useful things. Finally they have a telescopic antenna - I want to use it on a wide range of frequencies.

The downside with that is the long delivery time from China. They do have some resellers in a few other countries but the one in the UK didn’t have a kit with an antenna and I wasn’t keen on ordering from an unknown shop. FlightAware do a dongle with special features to specifically improve reception on the ADS-B frequency of 1090 MHz, but again they didn’t do a kit with an antenna.

I could buy an antenna separately of course, but I didn’t want to restrict myself to a certain receive frequency/band. What if I want to do more things with it than just ADS-B? In the end I decided to go with The Pi Hut anyway. I don’t really have much need to do low frequency bands, and if I ever do I can take an output from my handheld scanner and feed it into my laptop. Also I live pretty close to the airport and the UK has good coverage from community receivers already, so it’s not like I’m providing a vital service and need the brilliant reception I’d get from a perfectly tuned antenna - the stock one will do, and if I want to I can lop a few centimetres off it and make it better.

There’s also a few extras, like requiring a Micro HDMI cable or adapter (and I had one lying about) as well as another laptop to prepare the SD card and a keyboard and mouse if required.

So, here’s a full parts list including prices from The Pi Hut:

  • Pi Zero W board + official case: £15.00
  • Official PSU: £8.00
  • Heatsink: £1.00
  • Adafruit RTL-SDR dongle and antenna kit: £22.50
  • Keyboard, mouse, a computer to prep the SD card: owned already
  • We’ll get this all of set up soon! But sadly the ethical side of my brain needs to have a word with myself first. We’ll do that in part 2...

    Comments