Raspberry Pi, RTL-SDR and PiAware – feeding ADS-B spots to the Flightaware network
Earlier in the week, the nice people from Flightaware got in touch and mentioned they had some software called PiAware. This software runs on a Raspberry Pi which has an RTL-SDR dongle and antenna attached and the Dump1090 software running.
Flightaware say:
If you are running an inexpensive Raspberry Pi ADS-B receiver with dump1090 then you can install the PiAware Package from FlightAware to freely view nearby flight traffic and transmit this data to FlightAware’s tracking network. Most aircraft within Europe by 2017 and USA by 2020 will be required to have ADS-B transmitters onboard.FlightAware’s user-hosted worldwide ADS-B receiver network tracks about 90,000 unique aircraft per day and feeds this live data into the FlightAware website in combination with other public/private flight tracking data sources. FlightAware has over 500 user-hosted ADS-B sites online across 60 countries, with top contributors tracking over 10,000 aircraft per day. To see how ADS-B data is put to use, check out the FlightAware Live Map.The PiAware installation process takes only a few minutes. If you don’t have PlanePlotter, you can download it and then send FlightAware your installation’s serial number and we’ll buy you a license. FlightAware will also give users a free Enterprise Account ($90/month value) in return for installing PiAware.
So, if you don’t have a copy of PlanePlotter and would like one – this is a nice bonus for setting up and sending your data into Flightaware. I had a copy of PlanePlotter anyway, but this looked like a fun challenge to get working.
The instructions from Flightaware are good and comprehensive and can be found here
It was a while since I had run Dump1090 on my Pi, so I had to do a bit of work to get things in a state where PiAware would work.
– After some issues, I decided to ensure that Raspbian was updated: sudo apt-get upgrade (this takes a while!)
– I then refreshed rtl-sdr
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig
– Having read around a little, I decided to install a Flightaware specific version of Dump1090. It appears that this shouldn’t be necessary and you can use a ‘regular’ version of Dump1090, but I decided that my chances were improved of getting it working if I did this!
cd ~
git clone git://github.com/MalcolmRobb/dump1090.git
cd dump1090
make
sudo apt-get install pkg-config
make
Having compiled this – assuming you have installed RTL-SDR and have your RTLSDR stick, with an antenna (the little antenna which comes with the stick should work fine), plugged into the Pi – or a connected USB hub, it’s time to see if you can receive any ADS-B transmissions
Navigate to your dump1090 directory (dump1090_mr in my case)
cd dump1090_mr
./dump1090 — interactive
If everything is working, you should start to see some data coming through from the aircraft in your area.
Having got this going, you can install the PiAware software. Goto this page and you can start from step 2. I had some issues (mostly my fault!) with PiAware versions prior to 1.7-1 – but that is working fine.
Before you start PiAware up (in Step 4), stop your Dump1090 if it’s still running and restart it as follows:
./dump1090 –quiet –net
I used the quiet parameter to keep resource usage to a minimum. The net parameter ensures that Dump1090 makes the data available to other applications (PiAware in our case).
Start up another LX Terminal window and type
sudo piaware start
Hopefully, you will shortly see a message saying that PiAware has started. You can get a good idea of what is going on by checking the Piaware log file
tail -f /tmp/piaware.out
With any luck, you will see a bunch of messages including ‘Connected to Flightware – logging in and so on).
You should then see a message every 5 minutes detailing the number of messages that Flightaware has received from your receiver. If you run into problems, there is a helpful forum thread here
After all this, my Pi is feeding date into the Flightaware network successfully!
It’s intriguing to note, running the Pi/RTLSDR combo at the same time as PlanePlotter and the LZ2RR microADSB receiver (on similar antennas). In the same time interval, the microADSB receiver has seen 488 aircraft and the RTLSDR has heard 329. So, the RTL_SDR is not quite as sensitive, but it’s not bad at all! It may be worth trying different versions of Dump1090 and see if this can be improved.
Great fun to try – thanks in particular to Max at Flightaware for letting me know about PiAware.
Finally, if you want to see the map that your spots feed into – it’s here