Back
Featured image of post Feed Flightradar24 and Flightaware concurrently with Dump1090

Feed Flightradar24 and Flightaware concurrently with Dump1090

How to use a single Raspberry Pi and DVB-T adapter to feed both Flightradar24 and Flightaware.

Installation

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

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

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

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
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 web interface
DUMP1090 web interface

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 : ![FR24 configuration page](fr24feed-configuration-page.png" rel=“attachment wp-att-921) You can see the list of tracked planes (here in Singapore) : ![FR24 tracked planes](fr24feed-tracked-planes.png” rel=“attachment wp-att-923)

PiAware

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

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).

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.

Results

Flightradar24

Dashboard :

FR24 dashboard
FR24 dashboard

FlightAware

Dashboard :

Flightaware dashboard
Flightaware dashboard

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy