Listening to the skies

This is my ‘how to’ post for feeding data to flightradar24.com with a RaspberryPi, a simple digital TV tuner USB stick and some freely available software. If you don’t particularly want to feed data, you can still see a lovely output of nearby aircraft with their altitude, speed, callsign and other information [ steps 1 - 6 ].

Equipment I used

Operating System

The operating system I used to setup my feed to flightradar was Raspbian GNU/Linux 7 . If you are not sure which operating system you are running, login to your Pi and run the following command.

cat /etc/issue.net

Step by step setup

This section runs through the installation and configuration of the software and tools you need to get you up and running.


1. Plug in the USB stick

Pretty self explanatory, plug in the USB stick and attach the antenna, placing the antenna on a windowsill or somewhere with a view of the sky.

2. Login to your PI

Next you need to login to your Pi using SSH, from a Windows machine you can do this using putty, or if you are on a linux box or Mac, you can use the terminal application.

ssh pi@$MYSERVER

3. Create the software user

If you would like to keep your system nice and tidy, create a user to run the software as (you can safely skip this step if you are happy to run the software as your normal unprivileged user account e.g. pi)

sudo -s
useradd -m flightdata
passwd flightdata 

Now you must log back into the box as the flightdata user.

ssh flightdata@$MYSERVER

4. Download the software

In order to get the data we want, we need a few different applications which are freely available from github.

mkdir setup
cd setup
git clone https://github.com/antirez/dump1090.git
git clone git://git.osmocom.org/rtl-sdr.git

5. Build the software required

Build the rtl-sdr software using the following commands, see the RTL-SDR build page for further information.

sudo make install-udev-rules
cd rtl-sdr
autoreconf -i
sudo make install
sudo ldconfig

Build the dump1090 sofware

cd ../
cd dump1090/
sudo make install

6. Blacklist the module to make it work

Simply run the command below as root or run the sudo -s command [listed below] before executing the commands that follow.

sudo su - 
if ! grep -iq "dva_usb" /etc/modprobe.d/no-rtl.conf ; then echo "  blacklist dvb_usb_rtl28xxu" >> /etc/modprobe.d/no-rtl.conf ; fi ;
if ! grep -iq "RTL3838" /etc/udev/rules.d/rtl-sdr.rules ; then echo -e '# Realtek Semiconductor Corp. RTL2838 DVB-T \nSUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666", GROUP="adm", SYMLINK+="rtl_sdr"' >> /etc/udev/rules.d/rtl-sdr.rules ; fi ;

7. Reboot the system

Run the following command to reboot the box

sudo init 6

8. Test the receiver software

Now you should be able to simply run the application and see some data from your reciever. Login to your flightdata user, or your pi user (Depending on what you did in step 2 above).

cd dump1090/bin
./dump1090 --interactive

You should now see the output on the screen (similar to the above) from the reciever listing some visible aircraft, their altitude, callsign etc, if not something is wrong and you need to re-check the instructions above.

9. Bonus points! Feeding flightradar24.com

Contact the flightradar team to get a sharing key, e-mail support@fr24.com . The team will ask you for some details and your decimal co-ordinates which you can easily get from google maps or use something simple like http://itouchmap.com/latlong.html to find it.