ADS-B Receiver Project Setup Scripts

The ADS-B Receiver Project is a set of bash scripts and files which can be used to setup an ADS-B receiver on a Debian derived operating system. The scripts are executed in order by the main install script depending on the installation options chosen by the user. The project originally started out as a set of scripts created for my personal use to get a feeder back up and running quickly when a catastrophic event such as a SD card going bad happened. From there the project has grown quite a bit over the last couple months and has been evolving into something bigger than I ever originally expected. The project is still quite young and is still being worked on quite a bit so if you run into any issues using the scripts let me know.

Project Website: adsbreceiver.net
Repository: github.com/jprochazka/adsb-receiver

What Can Be Installed

At this time the following software can be installed using these scripts.

Decoders
• Dump1090 (mutability): github.com/mutability/dump1090
• Dump1090 (FlightAware): github.com/flightaware/dump1090
• Dump978: github.com/mutability/dump978

Site Feeders
• FlightAware’s PiAware: flightaware.com
• Plane Finder ADS-B Client: planefinder.net
• Flightradar24 Feed: flightradar24.com
• ADS-B Exchange: adsbexchange.com

The ADS-B Receiver Web Portal
• Saves all flights seen as well as displays a plot for the flight. (advanced)
• Control what is displayed online via a web based administration area.
• A more uniform website site layout that can be easily navigated.
• Web accessible dump1090 and system performance graphs.
• A web accessible live dump1090 map.
• A web accessible live dump978 map.
• A blog which can be used to share your plane tracking experiences with others.
• Informs visitors when specific flights are being tracked by dump1090.
• Easily customize the look of your portal using the template system.

Supported Operating Systems

The scripts and packages have been tested on most Debian Jessie based operating systems.
Ubuntu 16.04 LTS has also been tested successfully and is now fully supported.

Obtaining And Using This Software

Download the latest ADS-B Receiver Raspbian Jessie Lite images for Raspberry Pi devices.
github.com/jprochazka/adsb-rece … ses/latest

Instructions on how to use the image can be found in the project’s wiki.
github.com/jprochazka/adsb-rece … iver-Image

Manual installations…


sudo apt-get update
sudo apt-get install git
git clone https://github.com/jprochazka/adsb-receiver.git
cd ~/adsb-receiver
chmod +x install.sh
./install.sh

Updating existing installations…


cd ~/adsb-receiver
git fetch --all
git reset --hard origin/master
./install.sh

After doing a fresh install or updating a current installation visit the following URL to complete the installation of the portal.


http://<IP ADDRESS_OF_YOUR_DEVICE>/install/

After installation it is highly recommended that you delete the folder /var/www/html/admin/install/.

In order to utilize dump978 a second RTL-SDR device is required.
It is important to review the dump978 wiki page before installation.
github.com/jprochazka/adsb-rece … ng-Dump978

Special thanks go out to mgunther, dschaper, and jdwall for their direct contributions to the project on GitHub.

8 Likes

**Orange PI PC with Jessie_Xfce (Debian 8 with Xfce desktop) **

Method Used:

sudo apt-get update
sudo apt-get install git
sudo git clone github.com/jprochazka/adsb-feeder.git
cd adsb-feeder
sudo chmod +x install.sh
sudo ./install.sh

Web Portal Result:
Performance Graphs - NO
Plane Finder Client - YES
Adsbexchange - YES
(12/29/2015 18:49:37 Starting multilateration client: /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --results beast,connect,localhost:30004 --results beast,connect,feed.adsbexchange.com:30005 --udp-transport 70.42.6.198:7435:3067410901)

Live Dump1090 Map - YES (dump1090-mutability v1.14 already installed by me manually using apt-get install)
Piaware Data Feeder - YES (already installed by me manually using wget .deb and dpkg -i .deb file from flightaware site)

Now ready to install dump1090-portal.

The goal of the dump1090-portal portal project is to create a very light weight easy to manage web interface for dump-1090 installations This project is at the moment very young with only a few of the planned featured currently available at this time.

github.com/jprochazka/dump1090-portal
Press enter to continue…
Installing packages needed to build and fulfill dependencies…
Checking if the package collectd is installed… [OK]
Checking if the package rrdtool is installed… [OK]
Installing homepage…
Placing homepage HTML file in Lighttpd’s www root directory…
Installing map container…
Placing map HTML file in Lighttpd’s www root directory…
Installing performance graphs…
Backing up and replacing the current collectd.conf file…
Reloading collectd so the new configuration is used…
ok ] Reloading collectd configuration (via systemctl): collectd.service.
Placing performance graph HTML file in Lighttpd’s www root directory…

Adding jobs to crontab…
tee: /etc/cron.d/adsb-feeder-performance-graphs: No such file or directory

Installing performance graphs…
Adding links to the Plane Finder ADS-B Client web interface to the portal pages. …

Installation and configuration of the performance graphs is now complete.
Please look over the output generated to be sure no errors were encountered.

Press enter to continue…/home/pi/adsb-feeder/build/adsbexchange/adsbexchange-m aint.sh: 5: /home/pi/adsb-feeder/build/adsbexchange/adsbexchange-maint.sh: /bin/ nc: not found
/home/pi/adsb-feeder/build/adsbexchange/adsbexchange-maint.sh: 5: /home/pi/adsb- feeder/build/adsbexchange/adsbexchange-maint.sh: /bin/nc: not found

Installation complete.

pi@OrangePI:~/adsb-feeder$ /home/pi/adsb-feeder/build/adsbexchange/adsbexchange- maint.sh: 5: /home/pi/adsb-feeder/build/adsbexchange/adsbexchange-maint.sh: /bin /nc: not found
/home/pi/adsb-feeder/build/adsbexchange/adsbexchange-maint.sh: 5: /home/pi/adsb- feeder/build/adsbexchange/adsbexchange-maint.sh: /bin/nc: not found
/home/pi/adsb-feeder/build/adsbexchange/adsbexchange-maint.sh: 5: /home/pi/adsb-feeder/build/adsbexchange/adsbexchange-maint.sh: /bin/nc: not found
/home/pi/adsb-feeder/build/adsbexchange/adsbexchange-maint.sh: 5: /home/pi/adsb-feeder/build/adsbexchange/adsbexchange-maint.sh: /bin/nc: not found

https://farm2.staticflickr.com/1602/23682018389_26e49efca8_c.jpg

Trying to recreate this on Debian Jessie will update this post once something is found.
Just curious on your installation does the directory /etc/cron.d/? (I would definatly think it would…)

Script now checks that the Netcat package is installed and if not installs it.
To fix this issue on your device run the following command.


sudo apt-get install netcat

Most of the loboris images do not support cron out of the box…

Forgot you posted this in the issue tracker.
github.com/jprochazka/adsb-feeder/issues/28

Installing systemd-cron or cron as suggested by dschaper in the issue should solve things.

I added the cron package as a requirement to the script. You should be able to run the script update commands I just added to the first post in this topic and execute install.sh again. When asked if you want to install the portal select yes. This will create the needed cron file for you as well as check that the cron package is installed.


cd ~/adsb-feeder
git fetch --all
git reset --hard origin/master
./install.sh

Excellent project! Thank you very much! I would like to make a couple of minor mods that I would be glad to share, but I can’t find the crontab. It’s not root or pi. Also I would like to modify the portal page to include a three hour graph. Where are the config files? Thanks again!

PS. Forgot to add that I installed this on my Linux Mint (Debian/Ubuntu) feeder box.

The cron file should be under /etc/cron.d/adsb-feeder-performance-graphs

I was able to get things installed on the Orange Pi. Piaware and Dump1090-Mutablility and collect and graphs. But I get the 404 Message when trying to load the graphs. I changed the setting in the lighttpd.conf file. I removed the html from it.

server.document-root = “/var/www/”
Was “/var/www/html”

But that didn’t help.

Operating System: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.4.39

@jprochazka
Excellent work! Never mind bugs, these will be gradually solved.

@sjacket99
I have adventured with many distros for Orange Pi during holidays. My conclusion, as it stands today is given in this post:
http://discussions.flightaware.com/post185942.html#p185942

This being a dynamic situation, I hope with jprochazka’s drive & effort, and other member’s support, situation will improve a lot in due course

OK, I found that and added a cron job for 3h. Also, I edited the index.html file under graphs/html to add a button and configuration lines for 3h, but they aren’t showing up on the portal graphs page. Basically, I copied the lines for 6h and changed them to 3h, also at the end of index.html I added “3h” in user defined variables. Any idea why my changes aren’t show up?

You should not have to change the Lighttpd server.document-root setting. The script will automatically detect where Lighttpd’s document root is located and use the detected path during setup. I would suggest changing the server.document-root variable back to “/var/www/html”.

Keep in mind dschaper and abcd567 have been hashing through issues with Orange Pi. A couple fixes were applied to the scripts earlier today to address a couple of these. One of the issues had to do with cron not being installed on one of the Orange Pi images. Either make sure the package name “cron” or “systemd-cron” is installed on your device and the file “/etc/cron.d/adsb-feeder-performance-graphs” exists or use the update commands to download the latest version of the scripts and execute install.sh again.

Issues related to Orange Pi installations are currently being tracked here:
github.com/jprochazka/adsb-feeder/issues/28

A couple things to do to help troubleshoot 404 issues as far as the performance graphs are concerned:

Check the folder contents of the folder named “graphs” within the Lighttpd document root directory, usually “/var/www/html” or “/var/www” and see if any .png files exist there.

Run one of the graph generation commands from the crontab file manually and take note of the output. If any errors are reported those are of great help in narrowing down the issue. The command to use would look something like this. Make sure the path to the file make-collectd-graphs.sh is correct.


sudo ~/adsb-feeder/build/portal/graphs/make-collectd-graphs.sh 1h

Is issue number 3 still in play since the scripts were updated to install PiAware v2.1-5? The release of v2.1-5 addressed certificate issues.
If you get the certificate error again if you could copy it a post it I would be more than willing to look into it.

(BTW I am now a couple days out from ordering an Orange Pi to help troubleshoot these issues.)

You should only need to make two additions to the /var/www/html/index.html file, not the one located in the adsb-feeder folder, to add three hour graphs after setting up the cron job. The additions are highlighted in bold. The files in the adsb-feeder folder are copied over to Lighttpd’s document root during setup.

             <h1>Performance Graphs</h1> 
             <div class="btn-group" role="group"> 
                 <button type="button" id="btn-1h" class="btn btn-default btn-sm active" onclick="switchView('1h')">Hourly</button>

** Three Hours**
Six Hours
Daily
Weekly
Monthly
Yearly

	// Set the button related to the selected time frame to active. 
       	$("#btn-1h").removeClass('active'); 

** $(“#btn-3h”).removeClass(‘active’);**
$(“#btn-6h”).removeClass(‘active’);
$(“#btn-24h”).removeClass(‘active’);
$(“#btn-7d”).removeClass(‘active’);
$(“#btn-30d”).removeClass(‘active’);
$(“#btn-365d”).removeClass(‘active’);
$(“#btn-” + $timeFrame).addClass(‘active’);

I am always open to adding contributions made by the community to the project!

If you are familiar with GitHub feel free to fork the project make any additions you would like added and create a pull request back into the main project. If Git/GitHub is not your thing feel free to post the modifications here and either myself or someone else will be more than happy to review, test, then add the contribution for you.

New install report over on https://github.com/jprochazka/adsb-feeder/issues/28

First off thanks for the detailed report.

Looks like the lack of /etc/cron.d/ throws off the installation of dump1090-mutability,

I added the package cron as a requirement before installing dump1090-mutability. I forgot dump1090-mutability needs cron as well. This may very well have caused a failure when dump1090-mutability was being installed. The script should have caught the fact the package did not install and dump out at that point.

I still cannot believe someone actually left cron out of their image it makes no sense…
I am curious if the issue goes deeper and they are having trouble getting cron to work in the first place so decided to just leave it out.

12/30/2015 07:21:18 Connection with adept server at piaware.flightaware.com/1200 established
12/30/2015 07:21:18 TLS verify failed: self signed certificate in certificate chain
12/30/2015 07:21:18 Failing certificate:
12/30/2015 07:21:18 sha1_hash: B69ABB0BF41433F4E27434BF6628CE1EA1CAA704
12/30/2015 07:21:18 subject: CN=FlightAware Root,OU=Operations,O=FlightAware LLC,L=Houston,ST=TX,C=US
12/30/2015 07:21:18 issuer: CN=FlightAware Root,OU=Operations,O=FlightAware LLC,L=Houston,ST=TX,C=US
12/30/2015 07:21:18 notBefore: Dec 9 16:50:04 2015 GMT
12/30/2015 07:21:18 notAfter: Dec 4 16:50:04 2035 GMT
12/30/2015 07:21:18 serial: A9FE756D9E6B94B4
12/30/2015 07:21:18 TLS alert: unknown CA
12/30/2015 07:21:18 TLS error: certificate verify failed
12/30/2015 07:21:18 TLS handshake with adept server at piaware.flightaware.com/1200 failed: handshake failed: certificate verify failed

This is a shot in the dark but try copying the file /usr/lib/fa_adept_packages/ca/flightaware-combined.cert.pem to /etc/ssl/certs/. You may need to run update-ca-certificates as well after the file has been copied.


sudo cp /usr/lib/fa_adept_packages/ca/flightaware-combined.cert.pem /etc/ssl/certs/
sudo update-ca-certificates 

Thanks very much. My index.html is located in /var/www/graphs.

One more question for you: My setup is on a x86_64 Dell laptop, so there’s no /dev/mmcblk0. SSD is /dev/sdb. /etc/fstab:


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=a172d94a-4f32-4f47-a4f5-24aa559e6b5e /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb5 during installation
UUID=1c1839ca-354c-49fa-80f2-c89ae79b7fe9 none            swap    sw              0       0

I changed mmcblk0 to sdb in make-collectd-graphs.sh and collectd.conf, but that didn’t work to produce graphs for that drive. I did restart collectd. Can you tell me what I need to change to graph this drive?

Thanks again and great work. I modified my original System Monitoring thread to direct people to this one.

In your case…

In the file /etc/collectd/collectd.conf one line needs to be changed.


<Plugin "disk">
        Disk "mmcblk0"
        IgnoreSelected false
</Plugin>

Should look like…


<Plugin "disk">
        Disk "sdb"
        IgnoreSelected false
</Plugin>

Two lines in ~/build/portal/graphs/make-collectd.graphs.sh need changed.


disk_io_iops_graph /var/www/graphs/system-$2-disk_io_iops-$4.png /var/lib/collectd/rrd/$1/disk-mmcblk0 "$3" "$4" "$5" 
disk_io_octets_graph /var/www/graphs/system-$2-disk_io_octets-$4.png /var/lib/collectd/rrd/$1/disk-mmcblk0 "$3" "$4" "$5" 

Should look like…


disk_io_iops_graph /var/www/graphs/system-$2-disk_io_iops-$4.png /var/lib/collectd/rrd/$1/disk-sdb "$3" "$4" "$5" 
disk_io_octets_graph /var/www/graphs/system-$2-disk_io_octets-$4.png /var/lib/collectd/rrd/$1/disk-sdb "$3" "$4" "$5" 

Then restart collectd.


sudo /etc/init.d/collectd restart

Those are the only changes which should be needed.

Sounds to me like you got these changes however… If you did not deviate from the scripts when it came to setting up collectd you should have a directory “/var/lib/collectd/rrd/localhost/disk-sdb/” within which you should see 4 .rrd files. The image files displayed to the web should remain the same name as they did before.

When running make-collectd-graphs.sh manually do you get any errors?

1 Like

You’re right, I had already made those exact changes. And I am getting these errors when I run the make graphs script.


ERROR: opening '/var/lib/collectd/rrd/localhost/disk-sdb/disk_ops.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/disk-sdb/disk_octets.rrd': No such file or directory


Edit: Aha. I located the files in /var/lib/collectd/rrd/adsb1/disk-sdb. adsb1 is the hostname. Thanks again for your help.

From what I remember it was a decision based on the fact that it’s running SystemD so the expectation is that everything would be run as a timer instead of a cronjob. Once I get things stable I’ll try to convert the script over to timers and eliminate the missing cron issue altogether.

I’ll give it a shot and follow up over on the opened issue.

I face practically no issues installing on Raspberry Pi using jprochazka scripts.
Orange Pi is still a problem, seems their distros lack some components. Hopefully our Linux Gurus will soon solve it.

Additional info for the Orange PI distros I have used:

Opi with “Ubuntu Vivid Mate”

pi@OrangePI:~$ hostnamectl
Static hostname: OrangePI
Icon name: computer
Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boot ID: dd9e4782cff844e99c6e33d701ba760e
Operating System: Ubuntu 15.04
Kernel: Linux 3.4.39
Architecture: arm
pi@OrangePI:~$

Opi with Jessie Xfce

pi@OrangePI:~$ hostnamectl
Static hostname: OrangePI
Icon name: computer
Chassis: n/a
Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boot ID: 8fe0c307f47649c0ba29a9de40a2372c
Operating System: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.4.39
Architecture: arm
pi@OrangePI:~$

nice script, will have to wait for Wheezy Support then.

EDIT: Nevermind, did a reboot and its working!!