Updated: Custom ADS-B Raspberry Pi Feeding

Brandon Bianchi
9 min readSep 25, 2020

--

24 Hours of ADS-B Traffic — Visualized

Updated: 5-Mar-2022

As someone who is an Amateur Radio Operator, Student Pilot, and tech addict during the Pandemic SIP I decided to build a performant ADS-B feeder. Besides, when you feed these various site, they tend to give you complimentary access to their services. This perk alone saved me from at least one monthly subscription, plus I help fellow pilots at the same time. Win-win in my book!

Before we begin there is some added hardware this will require. I will share a sample list of what you would want to purchase, however there are many options and you don’t have to buy exactly what I suggest. There are also better versions of almost all these components. You can decide what fits your needs the best.

If I can also explain why to feed the same sites I feed:

ADSBExchange — This is the best of them all. No paid blocking, API access if you feed, and they are a very helpful bunch on their Discord server.

FlightAware — While they do make money off your feeding data they do give Enterprise access for free. Additionally Pilots that use the ForeFlight aviation app (myself included) get Internet based ADS-B traffic on our tables from FlightAware. This helps improve the safety in the skies.

FlightRadar24 — I like this site as it’s quite international. They do also make money off your data but at the same time give their Business account for free. Their mobile apps have useful features for pilots and frequent travelers as well.

RadarBox — I just like their website and UI. I figure they are one of the smaller sites with a cool app and app idea which includes trying to pipe in ATC audio which is live presently but needs more coverage.

Once you have the hardware, you will want to set it up in the below configuration:

Wiring diagram of an ADS-B receiving raspberry pi and sdr based dual feeder.
Wiring Diagram

Burning the image to a SD Card

The awesome people over at adsbexchange.com make a raspberry pi image that anyone can use with a lot of the basics already setup. Alternatively, you can use a generic raspberry pi image and setup everything from scratch. The later is how I had initially built my feeder.

You can find the image download at this link: https://www.adsbexchange.com/myip/downloads/adsbx-8.2.220910.zip. As of today (6.Dec.2022) the current version is 8.2.220910. Once downloaded unzip the file and you will have an .img file. Note that this image works well if using RTL based SDR’s but needs work if using an AirSpy. Additionally it has a graphana dashboard that has some nice data but will slightly reduce the lifespan of your SD card.

Next you will want to download balenaEtcher which can be found here: https://www.balena.io/etcher/

balenaEtcher flashing image to a SD card

Once installed and running it’s this simple to burn the image:

Flash from file, select the .img
It should automatically detect your connected SD card
Then click flash!

Once the flashing is complete you will need to remount the SD card on your computer. This should show the /boot partition once mounted. NOTE: If you are using the Raspian Lite aka Raspberry Pi OS — Lite install you can skip the below two steps. However, if you wish to build a wpa_supplicant.conf it will help save time later.

You will want to edit both the adsb-config.txt file and wpa_supplicant.conf if using the ADSBExchange Image. If not, skip these for now.

Sample of adsb-config.txt

In the adsb-config.txt file you will want to make a few edits. First is setting your latitude and longitude. Delete whatever values are in there and replace with the coordinates of your ANTENNA. If you need to determine what they are this is a handy resource: https://www.freemaptools.com/elevation-finder.htm. Additionally, set the altitude of your antenna, your local username, and if you plan to also capture ADS-B on the 978Mhz then change DUMP978 from no to yes.

Sample of wpa_supplicant.conf

In the wpa_supplicant.conf file you need to set your SSID and psk. The SSID needs to be in quotes and it will be the full name of your WiFi network. The PSK option will be your WiFi password. Ensure this also has quotes around it and save the file.

At this point you’re ready to boot the Raspberry Pi. Unmount the SD card from your computer and install it into your Raspberry Pi. If you plan to use AirSpy I highly suggest a Pi4 Model B with 4GB of RAM.

NOTE: If you use a vanilla Raspberry Pi Image make sure you download the correct one. Typically you will want the lite image and unless you have a 16GB RAM Raspberry Pi 4, you do NOT need the 64 bit OS.

https://www.raspberrypi.com/software/operating-systems/

After imaging you can put the wpa_supplicant.conf file in the /boot folder. However, the default raspberry pi image does not ship with the SSH Server enabled by default. You will need to connect the HDMI port and a keyboard and enable ssh through the sudo raspi-config command.

Once the Pi has booted you will want to run through the raspi-config utility. In here you will need to check a few things. Ensure you have enabled ssh access, set a new password, configured your WiFi if you did not before and plan to use it, as well as set the time zone and adjust your locale as necessary. There are plenty of resources on the internet you can search for if you need help with any of this. Additionally before you begin I suggest you also install an NTP client… I prefer chrony. This is a random guide I found that will set you on the right path for this step.

Also install some useful tools:
sudo apt update
sudo apt install chrony mtr git wget curl vim htop rtl-sdr

Now you are ready for the main event! Setting up your Raspberry Pi to be an ADS-B feeder!

I like to break this down in terms of the order in which the various pieces of software work together. As I use an AirSpy I also use readsb vs the standard dump1090 setup, this will also assume you have an Airspy (if not skip the airspy setup step, but you can still use readsb)

First we will install Readsb via the automated method:

sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/adsb-scripts/master/readsb-install.sh)"

On your Pi next you will want to clone this repo from github as it will install the AirSpy software and configure readsb:

sudo bash -c “$(wget -O — https://raw.githubusercontent.com/wiedehopf/airspy-conf/master/install.sh)"

After this has been completed, be sure you check the airspy config. If you happen to use a Bias-T or need to feed power to your LNA then ensure on the options line that you add the -b flag.

sudo vi /etc/default/airspy_adsb

/etc/default/airspy_adsb

My Options line:

OPTIONS= -v -t 90 -f 1 -w 5 -P 8 -C 75 -E 20 -b -m 12

Last you need to set your latitude and longitude. I like to use this site, but there are many others as well: https://www.gps-coordinates.net/

sudo readsb-set-location la.titude lon.gitude

After completing these steps we just need to restart readsb for all of the changes to take effect.

sudo systemctl restart airspy_adsb

Now we should have readsb and airspy installed and next we will want to install the tar1090 GUI so we can see our traffic on a map. To install this GUI it’ also quote simple:

sudo bash -c "$(wget -nv -O - https://raw.githubusercontent.com/wiedehopf/tar1090/master/install.sh)"

Once that installation is complete you can (optionally) edit the configuration file to customize tar1090 to your liking. Note in here you can define different range rings:

sudo vi /usr/local/share/tar1090/html/config.js

For users that have been running their receiver for some time, you can also update the airspy client:

sudo bash -c "$(wget -O - https://raw.githubusercontent.com/wiedehopf/airspy-conf/master/update-binary.sh)"

If you wish to get an overlay on your map for your anticipated coverage area based upon your antenna installation location you can use this website: http://www.heywhatsthat.com/. Once there select ‘New Panorama’ and input either your address or LAT/LONG as well as altitude of antenna. Give it a name and submit it. Within a few minutes it will provide you a link with a string of text. Save that string and replace the XXXX’s in this command with that string:

# load two outlines, 10000 ft and 40000 ft
sudo /usr/local/share/tar1090/getupintheair.sh XXXXX 3048,12192
# load a 10000 ft outline for the tar1090 instance located at /978
sudo /usr/local/share/tar1090/getupintheair.sh XXXXX 3048 978
# load a 40000 ft outline for the tar1090 instance located at /adsbx
sudo /usr/local/share/tar1090/getupintheair.sh XXXXX 12192 adsbx

Now, when you visit http://127.0.0.1/tar1090 you will have a coverage plot on your graph!

You should now have a working ADS-B receiver that plots on a map where nearby aircraft are located, good work! Now, lets make this data useful to a variety of sites. One benefit to feeding numerous sites is that you get their Enterprise/Business (top tier) plan at no monthly cost. Additionally, I highly suggest everyone also feeds ADSBExchange as they do not charge for access or permit people to pay to hide flights.

Let’s start by feeding ADSBExchange first!

curl -o /tmp/feed.sh https://raw.githubusercontent.com/adsbxchange/adsb-exchange/master/install.shsudo bash /tmp/feed.sh

If you wish to feed more sites you can follow these steps…

For FlightAware see this link.

The brief excerpt:
wget https://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_7.1_all.deb
sudo dpkg -i piaware-repository_7.1_all.deb
sudo apt-get update
sudo apt-get install piaware
sudo piaware-config allow-auto-updates yes
sudo piaware-config allow-manual-updates yes
sudo apt-get install dump978-fa
sudo reboot

Then edit the config…

sudo vi /etc/piaware.conf
allow-mlat yes
mlat-results yes
uat-receiver-type sdr

To setup FlightRadar24 you can start with this link.

The brief excerpt:
sudo bash -c "$(wget -O - https://repo-feed.flightradar24.com/install_fr24_rpi.sh)"

Then follow the steps as it asks questions. Once the wizard is done you need to edit the config…

sudo vi /etc/fr24feed.ini

Change these lines to this:
receiver=”beast-tcp”
host=”127.0.0.1:30005"

If you also wish to feed RadarBox visit this link. You can stick with their defaults which is already beast TCP to port 30005.

The brief excerpt:
sudo bash -c "$(wget -O - http://apt.rb24.com/inst_rbfeeder.sh)"

sudo apt-get install mlat-client -y

Then edit your configuration and ensure these are set to active:

sudo vi /etc/rbfeeder.ini

[mlat]
autostart_mlat=true
mlat_cmd=/usr/bin/python3.9 /usr/bin/mlat-client

[dump978]
dump978_enabled=true

Last, restart the client:
sudo systemctl restart rbfeeder

There are other sites you can feed but I think you should have the hang of how to set that up by now. Good luck, have fun and thanks for contributing!

Be sure to share your Raspberry Pi projects with the community.

Photo by threeedil on Unsplash

--

--

Brandon Bianchi

Datacenter and Networking Infrastructure is my day job. Aviation, travel, tech, and family are my passions.