Feed Flightradar24 and Flightaware concurrently with Dump1090

dump1090-map-web

1. Installation

We’ll assume that your OS (Raspbian) is installed and the network is configured.

1.1 Preparation

Update your system and install some software that we’ll need later (to compile) :

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git cmake libusb-1.0-0-dev build-essential lsof

1.2 Rtl-sdr driver

Clone it from git, compile and install :

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
cd ~
sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/
sudo reboot

1.3 Decoder: Dump1090

Clone it from git, compile and test:

cd ~ 
git clone git://github.com/flightradar24/dump1090
cd dump1090
make
./dump1090 --interactive --net --net-http-port 8080

You may encounter this issue :

Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001 (currently selected)
Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.
usb_claim_interface error -6
Error opening the RTLSDR device: Device or resource busy

This is due to a conflict with the dvb_usb_rtl28xxu module.
Unload the module :

sudo modprobe -r dvb_usb_rtl28xxu

And blacklist it to avoid any future problem by editing the blacklist configuration file :

sudo vi /etc/modprobe.d/rtl-sdr-blacklist.conf

And add the following lines :

blacklist dvb_usb_rtl28xxu

Then try again :

./dump1090 --interactive --net

You should see some planes :
dump1090-data
The option “–net” enable a web interface :
http://X.X.X.X:8080 (replace by the Raspberry Pi address).
The web interface :
dump1090-webinterface

1.4 Feeder: Flightradar24

They did a script, you should just follow the instructions :

sudo bash -c "$(wget -O - http://repo.feed.flightradar24.com/install_fr24_rpi.sh)"

Note, here are the DUMP1090 arguments :

--net --net-http-port 8080

When it’s done, you can start the service :

sudo service fr24feed start

You can check the feeder status by using the following command :

service fr24feed status

Here is my output :

● fr24feed.service - LSB: Flightradar24 Decoder & Feeder
   Loaded: loaded (/etc/init.d/fr24feed)
   Active: active (running) since Sat 2016-10-08 17:05:10 CEST; 16h ago
   CGroup: /system.slice/fr24feed.service
           └─604 /usr/bin/fr24feed -- --monitor-file=/dev/shm/fr24feed.txt --write-pid=/var/run/fr24feed.pid --quiet --log-base=/v...

Oct 08 17:05:10 raspberrypi fr24feed[569]: Starting FR24 feeder: fr24feed.
Oct 08 17:05:10 raspberrypi systemd[1]: Started LSB: Flightradar24 Decoder & Feeder.

There is a web interface as well :
http://X.X.X.X:8754(replace by the Raspberry Pi address).
The web interface :
fr24feed-configuration-page
You can see the list of tracked planes (here in Singapore) :
fr24feed-tracked-planes

1.5 Feeder: PiAware

1.5.1 Installation

PiAware installation process :

wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.1.0_all.deb
sudo dpkg -i piaware-repository_3.1.0_all.deb
sudo apt-get update
sudo apt-get install piaware
1.5.2 Raw data streaming

Make sure that you’re feeding the RAW data from Dump1090.
Edit the FR24 feeder configuration file :

vi /etc/fr24feed.ini

And change the following line :

raw="yes"

Then restart the service :

sudo service fr24feed restart

Note : It’s also possible to do it on the web interface :
http://X.X.X.X:8754/settings.html (replace by the Raspberry Pi address).

1.5.3 Test

Then you can restart the service :

sudo service piaware restart

And check the status :
Then you can restart the service :

sudo service piaware status

Here is my output :

● piaware.service - FlightAware ADS-B uploader
   Loaded: loaded (/lib/systemd/system/piaware.service; enabled)
   Active: active (running) since Sun 2016-10-09 09:25:30 CEST; 4min 13s ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 12611 (piaware)
   CGroup: /system.slice/piaware.service
           └─12611 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json

Oct 09 09:28:39 raspberrypi sudo[12748]: pam_unix(sudo:session): session closed for user root
Oct 09 09:28:39 raspberrypi piaware[12611]: no ADS-B data program is serving on port 30005, not starting multilateration client yet
Oct 09 09:29:38 raspberrypi sudo[12768]: piaware : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/netstat --program --tcp -...numeric
Oct 09 09:29:38 raspberrypi sudo[12768]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 09 09:29:38 raspberrypi sudo[12768]: pam_unix(sudo:session): session closed for user root
Oct 09 09:29:38 raspberrypi piaware[12611]: no ADS-B data program seen listening on port 30005 for 246 seconds, next check in 60s
Oct 09 09:29:39 raspberrypi sudo[12777]: piaware : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/netstat --program --tcp -...numeric
Oct 09 09:29:39 raspberrypi sudo[12777]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 09 09:29:39 raspberrypi sudo[12777]: pam_unix(sudo:session): session closed for user root
Oct 09 09:29:39 raspberrypi piaware[12611]: no ADS-B data program is serving on port 30005, not starting multilateration client yet
Hint: Some lines were ellipsized, use -l to show in full.

2. Results

2.1 Flightradar24

Dashboard :
fr24-dashboard

2.2 FlightAware

Dashboard :
flighaware-dashboard

3. Links

http://cromwell-intl.com/linux/raspberry-pi/sdr-ads-b-piaware-and-fr24feed.html

3 thoughts on “Feed Flightradar24 and Flightaware concurrently with Dump1090”

  1. I’m running into issues with Failed to start LSB: dump1090 daemon (mutability variant)
    during install which causes fr24 to stop functioning as well. Somewhere along the way it says /etc/init.d/dump1090-mutability: Syntax error: “fi” unexpected

    Any help would be appreciated.

    Thank you!

  2. Exactly the same failure here.
    Running Pi3+, Kernel 4.19.75-v7+, Raspbian GNU/Linux 10 (buster).
    FR24feed from yesterday, dump1090-mutability v1.14

  3. “/etc/init.d/dump1090-mutability” is broken. I took an older one and everything works fine.

Leave a Reply to Marek Cancel reply

Your email address will not be published. Required fields are marked *