FlightAware Discussions

Install Piaware 5.0 On x86_64 Machines and RPi armv7l & aarch64

Automated Installation Scripts for following Mahines & OS:

(1) x86_64 / amd64 Debian, Ubuntu & Kali on PC
(2) 32-bit and 64-bit (armv7l & aarch64) Raspbian, Ubuntu, and Kali on RPI Model 4
(3) x86_64 / amd64 Arch Linux on PC (scroll down to next post)

(1) DUMP1090-FA

sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu20-amd64/master/install-dump1090-fa.sh)"

(2) PIAWARE

sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu20-amd64/master/install-piaware.sh)"

(3) PIAWARE-WEB

sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu20-amd64/master/install-piaware-web.sh)"

(4) DUMP978-FA (For USA ONLY. Requires 2nd Dongle)

sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu20-amd64/master/install-dump978-fa.sh)"

 
4.1 - Serialize your dongles as below.
1090 Mhz dongle: serial # 00001090
978 Mhz dongle : serial # 00000978

Please see this serialization guide:
How-to Serialize Dongles for ES1090 + UAT978

4.2 - Configure dump1090-fa and dump978-fa to use above serial numbers by issueing following commands:

sudo sed -i 's/--device-index [^ ]* /--device-index 00001090 /' /etc/default/dump1090-fa   
sudo sed -i 's/driver=rtlsdr[^ ]* /driver=rtlsdr,serial=00000978 /' /etc/default/dump978-fa   

 

RESULTS

Debian 10.6 amd64

 

Ubuntu 20.02 amd64

 

Kali 2020 amd64


 

Piaware-Web

3 Likes

Installation on Arch Linux amd64

(1) DUMP1090-FA

Followed procedure here:
https://github.com/abcd567a/dump1090-fa-arch/blob/master/README.md

(2) PIAWARE:

Followed procedure here:
https://github.com/abcd567a/piaware-arch/blob/main/README.md

 

 

I’m still trying to make this work, was too dumb to build it on my own, apparently. I run the above script (x86_64 Debian 10.8) attempting to update the build and doesn’t appear to actually update anything. Update via FlightAware “My ADS-B” page’s Site Configuration (gear icon) also fails, as Automatic updates not available for OS debian:10 (Debian GNU/Linux 10 (buster))

The above script runs, completes and suggests i reboot the machine, however after restarting (attempted both yesterday and today) the version remains:
dump1090 ModeS Receiver dump1090-fa 4.0

Unsure what I’m doing wrong, but gaining physical access to the machine right now isn’t that easy, so SSH or remote desktop are the only options available. Appreciate the time and care you’ve put into these builds.

Seems that from your manual attempts to build, you already had cloned folders dump1090 and piaware_builder when you ran the script.

This will cause the script to fail. To make the script sucessful you need to first delete these forders as well as any dump1090-fa*.deb packages there.

Please list the files & folders in the directory from which you ran the script. If you ran the script while in home folder, following 2 commads will list these

cd ~/

ls

 

EDIT:

On March 19, 2021, I modified my scripts. Now there is no need to delete old source-code folders and built packages. The script updates the sexisting source code, then bulids & installs the latest version.

 

1 Like

You’re absolutely correct, I had old files/folders in my home directory which would have prevented the initial script(s) from running. You’re amazing, sorry for the hassle. Will report back once upgrade is complete. You’re the best!

To be on safe side, better dont delete old files and folder. Create a new folder named OLD and move all the old stuff into it.

After you have successfully upgraded to ver 5.0, and tested it for few days, you can delete the old stuff by deleting the folder OLD.

sudo mkdir ~/OLD

sudo mv piaware_builder dump1090 dump1090-fa* dump978 dump978-fa* ~/OLD/

EDIT:

On March 19, 2021, I modified my scripts. Now there is no need to delete old source-code folders and built packages. The script updates the sexisting source code, then bulids & installs the latest version.

1 Like

Thank you for always encouraging best-practices and the immense assistance you provide to this community overall. It is greatly appreciated. That being said, I’m a complete maroon and kind of embarrassed i continually failed over a period of two days and you swoop in to resolve the issues in a matter of minutes. Thank you. Appears to be working perfectly already.

PiAware running
PiAware (Debian Package Add-on) 5.0

And the piaware -v command also returns a value of 5.0

Cannot thank you enough, sir!

1 Like

@peatrick
Did you check version of dump1090-fa also?

The piaware and dump1090-fa packages are build and installed independent of each other. It is quiet possible that piaware ver 5.0 was built and installed successfully, but dump1090-fa ver 5.0 did not built and install, and you still have dump1090-fa ver 4.0 running. The piaware 5.0 can run with dump1090-fa 4.0 without complaining.

1 Like

The scripts worked OK if it was a fresh install.

However if a previous version was built and installed, the source code of previous version is still existing on the machine. In this case the source code of latest version will not be downloaded with warning “fatal: destination path 'dump1090' already exists and is not an empty directory”. The script will then proceeded with building package from existing old source code, and install the old version over the old version.

To overcome this problem, I have modified the script as shown below. If the old source code exists, the script updates it to latest version and builds & installs the latest version.

The modifications shown below are for dump1090-fa, but I have done similar modifications in scripts for piaware and dump978-fa.

ORIGINAL CODE MODIFIED CODE
git clone https://github.com/flightaware/dump1090
cd dump1090
sudo dpkg-buildpackage -b --no-sign
    git clone https://github.com/flightaware/dump1090
cd dump1090
git fetch --all
git reset --hard origin/master
VER=$(git describe --tags | sed 's/^v//')
sudo dpkg-buildpackage -b --no-sign
sudo dpkg -i dump1090-fa_*.deb     sudo dpkg -i dump1090-fa_${VER}_*.deb

 

1 Like

ABCD567 Just used

To update an archaic Wind PC with an Atom (amd-64) processor. Worked great

Thanks

1 Like

I could successfully install on Kali 2020, but last night I tried to installed on Kali 2021. The install failed due to

package not found: dh-systemd

Trying to find a way out.

Could solve by adding following code, but this does not seem to be a proper solution as Kali 2021 is based on Debian Testing, not on Buster proper.

if [[ `lsb_release -sc` == "kali-rolling" ]]; then
echo "For Kali 2021, adding debian Buster repository to get all packages needed"
sudo echo "deb http://deb.debian.org/debian/ buster main" >> /tmp/deb.list
sudo mv /tmp/deb.list /etc/apt/sources.list.d/
fi

sudo apt update
echo "Installing build tools"
sudo apt install -y git build-essential debhelper pkg-config dh-systemd 

You could try just removing the build-dep on dh-systemd. My understanding is that it got rolled into debhelper at some point.

Thanks Oliver. It worked.

git clone https://github.com/flightaware/dump1090
cd dump1090
sudo sed -i 's/dh-systemd,//' debian/control
sudo dpkg-buildpackage -b --no-sign

One strange thing (rather a bug) in Kali2021 is that if a command is issued like below
sudo apt install pkg1 pkg2 pkg3 pk4 ... pkgn

and if any one of these packages is not available, the apt gives warning about it and exits without installing rest of the installable packages.

Please see second command in screenshot below in which I have added a non-available package foo. In the command with package foo, the apt totally ignored the installable packages python3 and rtl-sdr

1 Like

The Kali Linux 2021 exits without installing any package if any one of the packages in following commands are not found / not installable:

sudo apt install -y git build-essential debhelper pkg-config dh-systemd 

sudo apt install -y librtlsdr-dev libncurses5-dev lighttpd 

sudo apt install -y libbladerf-dev libhackrf-dev liblimesuite-dev

Due to this stupid behaviour of Kali, I am forced to re-write the commands as one package per command as below:

sudo apt install -y git 
sudo apt install -y build-essential 
sudo apt install -y debhelper 
sudo apt install -y pkg-config 
sudo apt install -y dh-systemd 
sudo apt install -y librtlsdr-dev 
sudo apt install -y libncurses5-dev 
sudo apt install -y lighttpd 
sudo apt install -y libbladerf-dev 
sudo apt install -y libhackrf-dev 
sudo apt install -y liblimesuite-dev 

Piaware, dump1090-fa, dump978-fa, and piaware-web on Kali Linux 2021

https://flightaware.com/adsb/stats/user/abcd567#stats-114692

Finally solved the issue of failure of installation of dump1090-fa and piaware on Kali Linux 2021 as follows:

(1) In the installation script for the piaware, dump1090-fa, dump978-fa, & piaware-web added this snippet:

if [[ `lsb_release -sc` == "kali-rolling" ]]; then
sudo sed -i 's/dh-systemd,//' debian/control
fi

(2) In the installation scripts for the piaware, dump1090-fa, dump978-fa, and piaware-web changed commands for installation of dependencies from following format:

sudo apt install -y pkg1 pkg2 pkg3 pkg4

To following format:
sudo apt install -y pkg1
sudo apt install -y pkg2
sudo apt install -y pkg3
sudo apt install -y pkg4

2 Likes

Thanks, all worked perfectly.

>> $dump1090-fa --version
-----------------------------------------------------------------------------
| dump1090 ModeS Receiver                                   dump1090-fa 5.0 |
| build options: ENABLE_RTLSDR ENABLE_BLADERF ENABLE_HACKRF ENABLE_LIMESDR  |
-----------------------------------------------------------------------------
  detected runtime CPU features:
  selected DSP implementations:
    magnitude_uc8                            lookup_unroll_4_generic
    magnitude_uc8_aligned                    lookup_unroll_4_generic
    magnitude_power_uc8                      twopass_generic
    magnitude_power_uc8_aligned              twopass_generic
    magnitude_sc16                           exact_float_generic
    magnitude_sc16_aligned                   exact_float_generic
    magnitude_sc16q11                        exact_float_generic
    magnitude_sc16q11_aligned                exact_float_generic
    mean_power_u16                           u32_generic
    mean_power_u16_aligned                   u32_generic
1 Like

Updated dump1090:

 dump1090-fa --version
-----------------------------------------------------------------------------
| dump1090 ModeS Receiver                                   dump1090-fa 5.0 |
| build options: ENABLE_RTLSDR ENABLE_BLADERF ENABLE_HACKRF ENABLE_LIMESDR  |
-----------------------------------------------------------------------------
  detected runtime CPU features: AVX
  selected DSP implementations:
    magnitude_uc8                            lookup_unroll_4_generic
    magnitude_uc8_aligned                    lookup_unroll_4_generic
    magnitude_power_uc8                      twopass_generic
    magnitude_power_uc8_aligned              twopass_generic
    magnitude_sc16                           exact_float_generic
    magnitude_sc16_aligned                   exact_float_generic
    magnitude_sc16q11                        exact_float_generic
    magnitude_sc16q11_aligned                exact_float_generic
    mean_power_u16                           u32_generic
    mean_power_u16_aligned                   u32_generic

The automated install scripts given in the first post of this thread were originally written for a FRESH INSTALL on X86_64 architecture.

I have now upgraded these to also do the UPGRADE of an existing install. If someone has an older install such as 3.8.1 or 4.0, running these scripts upgrades dum1090-fa and piaware to latest version (currently 5.0)

Although the title of script is AMD64, I have done another modification to make it work on armv7l (32-bit) and aarch64 (64-bit) on RPi.

Now if the automated install script detects architecture is armv7l or aarch64 (i.e. 32-bit or 64-bit OS on RPi), it installs dump1090-fa version 5.1~dev (development branch). This is due to failure in installing version 5.0 (master branch) on aarch64 (64-bit OS on RPi). I have tested it on following two distros on RPI Model 4:

kali-linux-2021.1-rpi4-nexmon-64.img
kali-linux-2021.1-rpi4-nexmon.img

The updated automated install script may work on other 64-bit OS on RPi, but I have not yet tested it.

Tested on following distros. The automated installation scripts work OK:

64-bit Ubuntu Server on RPi Model 4:
ubuntu-20.04.2-preinstalled-server-arm64+raspi.img

64-bit Raspberry PI OS on RPI Model 4:
2020-08-20-raspios-buster-arm64.img

`

1 Like

To enable:

  1. Update an existing installation of older version of dump1090-fa
  2. Installation of dump1090-fa on RPi with 32 & 64 bit Raspbian, Ubuntu & Kali

I have added following snippet in automated installation script

cd dump1090

# If older version's cloned source code exists on the computer, 
# following two commands will update it to latest

git fetch --all
git reset --hard origin/master

# If an installation is on RPi, following will select the
# appropriate version of source code (master or development)

if [[ `uname -m` == "aarch64" || `uname -m` == "armv7l" ]]; then
    if [[ `lsb_release -si` == "Debian" ]]; then
        echo "Using master branch"
    else
        echo "Using development branch"
        git fetch --all
        git reset --hard origin/dev
    fi
fi

I just ran these install scripts on an existing Piaware 4 installation on an RPi4 running PiOS aarch64. Everything looks on my feeder on my Flightaware.com page, however, I can’t run local maps because lighttpd will not start. Here is the log info:
Mar 28 09:26:49 tahoe systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Mar 28 09:26:49 tahoe systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 1.
Mar 28 09:26:49 tahoe systemd[1]: Stopped Lighttpd Daemon.
Mar 28 09:26:49 tahoe systemd[1]: Starting Lighttpd Daemon…
Mar 28 09:26:49 tahoe lighttpd[9532]: Duplicate array-key ‘/data/’
Mar 28 09:26:49 tahoe lighttpd[9532]: 2021-03-28 09:26:49: (configfile.c.1296) source: /etc/lighttpd/conf-enabled/89-skyaware.conf line: 41 pos: 1 parser failed somehow near here: (EOL)
Mar 28 09:26:49 tahoe lighttpd[9532]: 2021-03-28 09:26:49: (configfile.c.1296) source: /etc/lighttpd/lighttpd.conf line: 47 pos: 15 parser failed somehow near here: (EOL)
Mar 28 09:26:49 tahoe systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTION
Mar 28 09:26:49 tahoe systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Mar 28 09:26:49 tahoe systemd[1]: Failed to start Lighttpd Daemon.

pi@tahoe:~ $ ls -al /etc/lighttpd/conf-enabled
07-mod_setenv.conf
47-stat-cache.conf
50-piaware.conf (newly created in this install)
88-dump1090-fa-statcache.conf
88-graphs1090.conf
88-tar1090.conf
89-dump1090-fa.conf
89-skyaware978.conf
89-skyaware.conf (newly created in this install)
90-javascript-alias.conf
95-tar1090-otherport.conf