ADS-B Receiver Project Setup Scripts

Thx SoNic67
Interesting, setting the executable bit took care of the -6 error on the HDMI screen log but dump978 isn’t showing up on the top command at all. I’ll try it with the 1090-mutability and see if that gets it working right. I’ve been trying a lot of different images/builds for the last week trying to learn the in’s and out’s of ADSB on a Pi and it was on my list anyhow.

This are my running processes:


top - 05:42:13 up 2 days,  8:40,  2 users,  load average: 1.35, 1.19, 1.08
Tasks: 150 total,   1 running, 149 sleeping,   0 stopped,   0 zombie
%Cpu(s): 12.8 us,  1.7 sy,  0.0 ni, 84.9 id,  0.0 wa,  0.0 hi,  0.5 si,  0.0 st
KiB Mem:    949572 total,   458652 used,   490920 free,    88896 buffers
KiB Swap:   102396 total,        0 used,   102396 free.   268244 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  618 dump1090  15  -5   28160  10020   2116 S  27.4  1.1 922:53.12 dump1090-mutabi
  579 root      20   0    2436   1304   1040 S  26.4  0.1 866:08.45 dump978
  577 root      20   0   14816   5376   1500 S   3.0  0.6  92:10.48 rtl_sdr
23866 pi        20   0    5108   2560   2144 R   1.0  0.3   0:00.11 top
 1138 piaware   20   0   13096   9804   6336 S   0.7  1.0  34:29.49 fa-mlat-client
   91 root      20   0       0      0      0 S   0.3  0.0   2:16.83 mmcqd/0
  602 root      20   0   86340   5104   2248 S   0.3  0.5  22:24.19 fr24feed
  994 piaware   20   0    2884   2248   1900 S   0.3  0.2  10:17.73 faup1090
 8614 root      20   0       0      0      0 S   0.3  0.0   0:54.70 kworker/u8:2
    1 root      20   0   22868   3920   2736 S   0.0  0.4   0:07.79 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.09 kthreadd
    3 root      20   0       0      0      0 S   0.0  0.0   0:34.21 ksoftirqd/0
    5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H
    7 root      20   0       0      0      0 S   0.0  0.0   7:05.42 rcu_sched
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh
    9 root      rt   0       0      0      0 S   0.0  0.0   0:00.47 migration/0
   10 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 lru-add-drain
   11 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/0
   12 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/1
   13 root      rt   0       0      0      0 S   0.0  0.0   0:00.53 migration/1
   14 root      20   0       0      0      0 S   0.0  0.0   0:09.12 ksoftirqd/1
   16 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/1:0H
   17 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/2
   18 root      rt   0       0      0      0 S   0.0  0.0   0:00.47 migration/2
   19 root      20   0       0      0      0 S   0.0  0.0   0:15.42 ksoftirqd/2
   21 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/2:0H
   22 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/3
   23 root      rt   0       0      0      0 S   0.0  0.0   0:00.44 migration/3
   24 root      20   0       0      0      0 S   0.0  0.0   0:13.34 ksoftirqd/3
   26 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/3:0H
   27 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kdevtmpfs
   28 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 netns
   29 root      20   0       0      0      0 S   0.0  0.0   0:00.29 khungtaskd


The bandwidth usage isn’t showing up in the web portal while running Raspbian Stretch,
due to the fact that ethernet interfaces names in Stretch are based on MAC addresses instead of eth0, eth1, etc.

It can be fixed by adding net.ifnames=0 at the end of the line on boot/cmdline.txt file.

1 Like

[SOLVED] Raspbian STRETCH [SOLVED]

Flightradar24 Feeder fails to install by automated script/bash script.

sudo apt-get update
sudo apt-get install dirmngr

cd ~/adsb-receiver
./install.sh
#Select Flightradar24 feeder when prompted.

New release v2.6.0

Went to add the git package to put on a SD card that had jessie on it to try a different approach to dump978 yesterday. When I looked at the variables.sh file I saw it was a new rec proj version 2.6.0 and all the revision were updated correctly. Anyhow loaded everything up and dump978 wasn’t working but looked at the log files and saw some errors from dump978-maint.sh that the installer built and as it turned out the path needed an additional /dump978 on 3 entries to get it working so no biggie.

Brought up dump978 to feed to dump1090 and it’s been working for 18 hrs or so no problem. There are some new additions to the install but I haven’t tried them yet

Big thanks to Joe Prochazka for updated version 2.6.0

I have done following installs successfully and very smoothly on the odd OS, i.e. Linux Pixel x86, running on my Desktop amd64. The Pixel x86 image was written to USB flash, and I booted Desktop from USB flash memory stick.

(1) dump1090-mutability + data feeders piaware, flightradar24, planefinder, adsbexchange + web portal

(2) dump1090-fa + data feeders piaware, flightradar24, planefinder, adsbexchange + web portal

Noted 3 differences between previous version and current version 2.6.0:

(a) Version numbers in file varables.sh are now upto date.

(b) Before start building dump1090-fa, the script first built bladeRF. The script installed packages required for bladeRF, such as doxygen, libtecla-dev, help2man, pandoc, libncurses5-dev, and then itcreated a folder ~/adsb-receiver/build/bladeRF was created, then it built bladeRF, and after that it built dump1090-fa.

( c ) During installation of Flightradar24 feeder, the script installed missing package dirmngr.

I will next try both above installs on Raspbian STRETCH installed on RPi, and report.

Thanks once again to Joe.

1 Like

Tested ADSB Project Scripts Ver 2.6.0 on RPi / Raspbian STRETCH Lite

Install 1:

dump1090-fa + data feeders Piaware, Planefinder, Flightradar24, adsbexchange + Web Portal/Graphs.
All went smoothly and install is ok

Install 2:

dump1090-mutability + data feeders Piaware, Planefinder, Flightradar24, adsbexchange + Web Portal/Graphs.
All went smoothly and install is ok, except dump1090-mutability fails to open DVB-T (cause: missing rtl-sdr.rules). As a result no data is available to feeders, and map is without planes and shows following warning
Ajax Call Failed
.
.

It started working OK after following workaround

sudo wget -O  /etc/udev/rules.d/rtl-sdr.rules "https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules"

sudo reboot

.
.

Other minor workarounds:
(1) dump1090-mutability: As normal, the range circles started showing after in file /usr/share/dump1090-mutability/html/config.js , SiteShow = false; was changed to SiteShow = true; .

Although the Metric=“false;” entry was there in the same file, the circle diameters were in kms. The reason for non-implementation of Metric=“false;” entry was the extra quotes " " around false;. Removing quotes " " and making it Metric=false; resulted in Range Circles diameters in nautical miles.

(2) adsbexchange feeder: The configuration dialog at the end of install of adsbexchange feeder does NOT give option to enter user location (lat & lon). As a result, its Mlat fails to work. Manually entering the values in file adsb-receiver/build/adsbexchange/adsbexchange-mlat_maint.sh makes it work. The entries –lat --lon are available in above file, but the values are missing. add the values to make these –lat xx.xxxx --lon yy.yyy

1 Like

It appears that the changes\fixes are in process per info on github. I tried today to use it on Stretch with 1090-mut --net only and feed a dump from SDRplay into it but the files on github changed while I was doing it as Joe is obviously working on it. I think the best thing for now is to wait till he has some more time on it to get things ironed out.

Exactly that is my observation. Yesterday when I installed everything on Raspbian Pixel x86 (jessie) on amd86/i386 computer, it worked flawlessly, as I have reported in my above post.

Today when I tried to install again on a fresh copy of Raspbian Pixel x86 on amd64/i386, all went ok, but when Web Portal installation started, it exited due to failure of installation of some php packages. Error: package not found. One thing i noted the packages which failed to be found, their name were php-something, instead of php5-something or php7.0-something.

I will wait and see.

As I have mentioned in my last post, error messages showed missing php packages without version number (5 or 7.0). Two missing packages were reported as follows
php-cgi
php-xml

I checked file ~/adsb-receiver/bash/portal/install.sh, and it shows the script finds distro version and then accordingly decides what version of php (5 or 7.0) should be used (variable ${DISTRO_PHP_VERSION}). However for some reason on pixel (jessie) x86, this number does not get attached to package name. Here is the relevant part:

sudo nano ~/adsb-receiver/bash/portal/install.sh
..........
..........
## CHECK FOR PREREQUISITE PACKAGES

# Detect the OS distribution and version.
DISTRO_ID=`. /etc/os-release; echo ${ID/*, /}`
DISTRO_RELEASE=`. /etc/os-release; echo ${VERSION_ID/*, /}`

case $DISTRO_ID in
    debian|raspbian)
        if [[ $DISTRO_RELEASE -ge "9" ]]; then DISTRO_PHP_VERSION="7.0"; fi
        ;;
    ubuntu)
        if [[ $DISTRO_RELEASE -ge "16.04" ]]; then DISTRO_PHP_VERSION="7.0"; fi
        ;;
    *)
        DISTRO_PHP_VERSION="5"
        ;;
esac

# Install PHP.
CheckPackage php${DISTRO_PHP_VERSION}-cgi
CheckPackage php${DISTRO_PHP_VERSION}-json

# Performance graph dependencies.
CheckPackage collectd-core
CheckPackage rrdtool

# Portal dependencies.
CheckPackage libpython2.7

# Install packages needed for advanced portal setups.
if [[ "${ADVANCED}" = "true" ]] ; then
    CheckPackage python-pyinotify
    case "${DATABASEENGINE}" in
        "MySQL")
            CheckPackage mysql-client
            CheckPackage python-mysqldb
            CheckPackage php${DISTRO_PHP_VERSION}-mysql
            ;;
        "SQLite")
            CheckPackage sqlite3
            CheckPackage php${DISTRO_PHP_VERSION}-sqlite
            ;;
    esac
else
    CheckPackage php${DISTRO_PHP_VERSION}-xml
fi
...........
...........

Tried to install on Piaware 3.5.1 (SD Card image), Feeders installed smoothly, but portal installation failed , giving same error as in my last post above (E: Package not found).

Finally succeeded by following WORKAROUND

sudo nano ~/adsb-receiver/bash/portal/install.sh

Above command will open portal installation script file for editing
Go to search (Ctrl+w), and type install php, then press Enter.
The cursor will jump to line “# Install PHP.”
Make necessary changes as shown in screenshot below
After editing Save (Ctrl+o) and close editor (Ctrl+x).

Now proceed with installation

cd ~/adsb-receiver
./install.sh

due to a myriad of reasons, I need to have just a basic setup (rPi is doing a bunch of other items and I need the cpu cycles for something other than the graphs, portal, etc). What is the best way to remove this? I’d rather not reformat and start over as a bunch of other programs would need to be reinstalled/configured. I just need piaware and dump1090-fa.

[BUG FOUND]

On Raspberry Pi (armhf) running Raspbian Jessie or Stretch, and on Desktop (amd64/i386) running Pixel x86, the Web Portal install fails due to script trying to install wrong packages as follows:
php-cgi instead of php5-cgi
php-json instead of php5-json
php-xml instead of php5-xml

I have finally found 2 bugs are causing this.

BUG 1 of 2:

The version numbers are not added to package names. This is cause by wrong type of quotes in lines 240 & 241. When I replaced the quotes by correct type, the script added version number 5 to package names and installed php5-cgi and php5-json.

.
Wrong Type Quotes
.
.
.

BUG 2 of 2:

After fixing Bug-1, when I run the install.sh, it installed php5-cgi and php5-json, but when it reached the stage to install php5-xml, it halted saying package not available. I tried to install php5-xml manually, and got message copied below.

pi@piaware:~$ sudo apt-get install php5-xml
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-xml

I then commented-out the line 281, and tried again and install succeeded.

.
NOTE:
Later I checked Debian Wiki and found php5-xml package is not available, but php7.0-xml package is available in Debian repositories.

If that’s a shellscript fragment, then backquotes are correct - it runs the command between the backquotes and substitudes the output of the command.

You are right. The backquotes should work, but for some reason did not. The script was failing as these two lines of code were not giving output. When I replaced those 4 backquotes by straightquotes, the script started functioning.

I still dont understand why, but this trick worked like magic. (Professor Dumbledore at Hogwarts has taught me this trick :smile: )

I have now created a test script, copying the relevant part (lines 239 to 253) from github to a blank file test.sh

# Detect the OS distribution and version.
DISTRO_ID=`. /etc/os-release; echo ${ID/*, /}`
DISTRO_RELEASE=`. /etc/os-release; echo ${VERSION_ID/*, /}`

case $DISTRO_ID in
    debian|raspbian)
        if [[ $DISTRO_RELEASE -ge "9" ]]; then DISTRO_PHP_VERSION="7.0"; fi
        ;;
    ubuntu)
        if [[ $DISTRO_RELEASE -ge "16.04" ]]; then DISTRO_PHP_VERSION="7.0"; fi
        ;;
    *)
        DISTRO_PHP_VERSION="5"
        ;;
esac

#Following 3 lines added by me to check outputs
echo "DISTRO ID = "$DISTRO_ID
echo "Distro Release = "$DISTRO_RELEASE
echo "Distro PHP Version = "$DISTRO_PHP_VERSION

I ran it first with original back-quotes, and found that back-quote make these lines to work and give proper output, but variable DISTRO_PHP_VERSION has null value instead of 7.0 or 5. The blank vale of php version results in installation script trying to install php-cgi instead of php5-cgi, and upon failure to find php-cgi, halt and quit further execution of installation script.

#created blank file test.sh, and copy-pasted code above
pi@raspberrypi:~ $ sudo nano test.sh

#run the file test.sh
pi@raspberrypi:~ $ sudo chmod +x test.sh
pi@raspberrypi:~ $ ./test.sh
DISTRO ID = debian
Distro Release = 8
Distro PHP Version = 

I replaced back-quotes by straight-quotes, and again ran the script, and found that the straight-quotes make these lines to malfunction. Due to this malfunction, the variable DISTRO_PHP_VERSION uses its default value of 5, which enables portal installation script to continue and complete the install.

#After replacing back-quotes by straight-quotes
pi@raspberrypi:~ $ ./test.sh
DISTRO ID = . /etc/os-release; echo ${ID/*, /}
Distro Release = . /etc/os-release; echo ${VERSION_ID/*, /}
Distro PHP Version = 5
pi@raspberrypi:~ $  

This either needs an else clause or you need to set DISTRO_PHP_VERSION to the default value (5) before the case

Tested “test.sh” on 3 distros (Raspbian Pixel x86, Ubuntu 16.04 amd64, Debian 9 amd64)

Found it performs OK on Debian 9 amd64. Seems JProchazka is testing his work on Debian 9 amd64, and that is why he did not notice the bug.
.

Raspbian Pixel x86 (same results on Piaware SD card img v 3.5.1 which is Jessie based)
snapshot2
.

Ubuntu 16.04 amd64
Screenshot from 2017-10-10 08-49-14
.
.

Debian 9 amd64
Screenshot_20171010_134901
.
.

EDIT: Tested on Raspbian STRETCH
Portal on Stretch

Hi, I’m running the FA ‘distro’ (rel. 3.5.1) and would like to have the ‘Performance Graphs’ (rrd), is there any possibility to install only that and don’t mess up my current configuration ? Thanks.

Yes. You have to install Web Portal. It will check if rrd is there, it will skip its installation, and install graphs. It may update rtd if it finds an old version is already installed.

When installation starts, it will present options one after the other. Keep saying no to all till at the end it presents option to install web portal. Say OK to it, then no to advance option.

1 Like