Skip to content

Instantly share code, notes, and snippets.

@dev-zzo
Last active October 11, 2019 19:49
Show Gist options
  • Save dev-zzo/5705fffb20bf30bf1f58726337de5adc to your computer and use it in GitHub Desktop.
Save dev-zzo/5705fffb20bf30bf1f58726337de5adc to your computer and use it in GitHub Desktop.
Airband receiver

Airband receivers

Heya all! I was asked to write up a document on how to build your own autonomous airband ACARS receiver and join the club. Before you start shelling out moneys, though, I recommend checking whether there is any plane activity in your area: go visit your favourite plane spotting site (e.g. flightradar24) and observe air traffic for awhile; if there's nothing flying above for the whole day, there is no big point in setting up.

My big thanks extends to Thierry and Hugo who helped to beta test this document. :-)

Without any further delay, let's dive.

To build a working receiver, you will need:

  • An antenna to actually receive RF signals. The received signal goes into ...
  • An RTL-SDR stick, which converts RF wobbles into samples to be processed. These samples flow via USB into ...
  • A Raspberry Pi 3 that runs the SDR receiver code. And, of course ...
  • The SDR code itself, which magically converts samples into ACARS packets!

Antenna

Typically this is the DIY part in most of the setups, but I reckon not everyone is willing to embark on such an adventure. Therefore I suggest you just get one from Ebay; look for an antenna that receives 118-136 MHz.

For example, this one: http://www.ebay.com/itm/322563240997 works surprisingly okay for its $4. Warning: this one is NOT fit for outdoor installation.

Depending on the connector type on the antenna you chose, you'll need a corresponding cable to mate with it and connect it to the RTL-SDR stick, which has an SMA female connector (note: not RP-SMA!). The example antenna above has the BNC male connector, therefore you'd need a cable with BNC female connector on one end and SMA male connector on the other! Searching on Ebay, I found this one: http://www.ebay.co.uk/itm/282494419843 YMMV! This one is $1 delivered.

The antenna is preferably mounted vertically and far from metallic stuff.

RTL-SDR

I strongly suggest getting the "official" one from rtl-sdr blog: https://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/

Why? Multiple reasons:

  • Frequency stability: I've heard multiple times from people using crappo dongles that the reception frequency varies with time, sometimes quite a lot. This is not good at all, especially for a box you turn on and leave running.
  • Aluminium enclosure: just looks and feels nice. :-) Also dissipates the heat.
  • The price point is almost the same as the next one: $20 delivered.

Then again, any stick will do -- the main impact is on performance (and the type of connector).

Raspberry Pi 3

Buy your favourite one or grab the one you already have. It doesn't really matter. It will have to run Raspbian though.

It is recommended to stick your stick (hehe) directly into the Pi without using a cable to minimise the GODDAMN FM BROADCAST INTERFERENCE. Ugh...

Assembling

Connect everything together. Not super challenging.

First, connect the stick to your PC and start SDR#, tune to 131.725 MHz AM (assunimg you are in EU -- if not, check here: http://www.udxf.nl/Digital-aero.pdf for your local frequency), and crank the gain to about 30 dB. Listen for a couple of minutes. You should hear very characteristic sound of the packets flying through, starting with a clean tone and then digital noise, not unlike good old dial-up modems. Is you got that, all is well! Connect the stick to the Pi and start the device up.

Do git clone https://github.com/dev-zzo/acarsdec and follow compile instructions; you may also need to build librtlsdr. When built, start the program like this: ./acarsdec -g 300 -r 0 131.525 131.725 131.825 and observe output: provided that everything is connected and built correctly, you shoould see messages flying by!

Connecting to the hub

But what's the fun just staring at it? The point of the whole exercise is to pool the messages and spy on as much traffic as possible.

First install screen to avoid killing the program when you disconnect. In addition, you will still be able to maintain stdout in the session for debugging purposes. This seems to be more convenient than nohup.

Now, run acarsdec following this example:

$ ./acarsdec -g 300 -N [hub IP] -i [YOUR-ID] -r 0 131.525 131.725 131.825 > /dev/null &

Replace the [hub IP] with the actual hub IP address -- currently 2.110.96.156, and [YOUR-ID] with your station ID (8 characters or less from [A-Z0-9-]). Fire and forget!

Go to the hub's page and observe your packets online. :-)

For continuous operation, it is highly recommended to make sure acarsdec is started automatically on system boot.

Advanced stuff

Not necessary, but highly recommended in case you have significant out of band interference, is an airband bandpass filter so you only receive the interesting stuff and filter out everything else. This results in higher sensitivity, which means more messages received! I have one like this: http://www.ebay.com/itm/112236495374 Of course, you will need more cables to connect everything together.

If you live in a "radio quiet" area, you might want to throw in a low noise amplifier as well to boost the signal levels. This may or may not help -- a good area for experiments! Due to propagation phenomena, though, you won't be able to hear anything beyond the line of sight anyways. Damn physics!

Ethernet cables were found to produce quite a lot of in-band interference. If possible, connect you Pi wirelessly or use STP cables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment