[OUTDATED] Howto Install Piaware 3.8.1 on Ubuntu-20 AMD64 & Kali-2020 AMD64 on PC

TESTED ON:

  • Ubuntu-20.04-desktop-amd64
  • Kali-linux-2020.2-amd64

 

OPTION-1: AUTOMATED INSTALL

(1) DUMP1090-FA

Copy-paste following command in SSH console and press Enter key.
The script will build & install dump1090-fa.

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

 
(2) PIAWARE

Copy-paste following command in SSH console and press Enter key.
The script will build & install piaware.

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

 

https://www.github.com/abcd567a/piaware-ubuntu20-amd64

 

OPTION-2: MANUAL INSTALL

1 - Install build tools (for Dump1090-fa and Piaware).

$ sudo apt update  
$ sudo apt install git dh-systemd devscripts pkg-config     

2 - Build & Install DUMP1090-FA

2.1 - Install dump1090-fa dependencies

$ sudo apt install lighttpd librtlsdr-dev libusb-1.0-0-dev libncurses5-dev   

2.2 - For KALI LINUX only
Enable and start lighttpd

$ sudo systemctl enable lighttpd
$ sudo systemctl restart lighttpd

2.3 - Clone dump1090-fa source code

$ cd ~/  
$ git clone https://github.com/flightaware/dump1090  

2.4 - Workaround for non-available package libbladerf1

The package libbladerf1 is missing from package libbladerf-dev in Ubuntu 20 repository

$ cd dump1090   
$ sudo sed -i 's/BLADERF=yes/BLADERF=no/' debian/rules   
$ sudo sed -i  's/, libbladerf-dev//' debian/control    
$ sudo sed -i 's/libbladerf1 (>= 0.2016.06), //' debian/control   

2.5 - Build & install dump1090-fa package

$ sudo dpkg-buildpackage -b --no-sign  

$ cd ../  
$ sudo dpkg -i dump1090-fa_3.8.1*.deb  

## TWO COMMANDS BELOW ARE FOR KALI LINUX ONLY
$ sudo systemctl enable dump1090-fa
$ sudo systemctl restart dump1090-fa

## Check status
$ sudo systemctl status dump1090-fa 

## If status shows: Failed with result 'exit-code'
## then REBOOT Computer
$ sudo reboot 

## Check status after reboot
$ sudo systemctl status dump1090-fa 

 

3 - Build and Install PIAWARE

3.1 - Install piaware dependencies

$ sudo apt install tcl8.6-dev python3-dev libz-dev    
$ sudo apt install libboost-system-dev libboost-program-options-dev   
$ sudo apt install libboost-regex-dev libboost-filesystem-dev   
$ sudo apt install net-tools tclx8.4 tcllib itcl3   

3.2 - Build & Install dependency tcl-tls from source code.

## Install dependencies
$ sudo apt install libssl-dev tcl-dev chrpath  

## Clone source code, build & Install tcl-tls

$ cd ~/  

$ git clone http://github.com/flightaware/tcltls-rebuild.git  
$ cd tcltls-rebuild  
$ ./prepare-build.sh buster  
$ cd package-buster  
$ sudo dpkg-buildpackage -b --no-sign  
$ cd ../  
$ sudo dpkg -i tcl-tls_*.deb 

3.3 - Clone piaware source code, build package, and install package.

$ cd ~/  

$ git clone http://github.com/flightaware/piaware_builder     
$ cd piaware_builder   
$ sudo ./sensible-build.sh bionic   

## Workaround for pyvenv: 
$ cd package-bionic    
$ sudo sed -i 's/pyvenv $(VENV) --without-pip/$(PYTHON3) -m venv $(VENV) --without-pip/' debian/rules    
$ sudo sed -i 's/python3-venv, //' debian/control    

## After above Workaround, build the piaware package
$ sudo dpkg-buildpackage -b --no-sign   
$ cd ../   
$ sudo dpkg -i piaware_3.8.1*.deb   

## TWO COMMANDS BELOW ARE FOR KALI LINUX ONLY
$ sudo systemctl enable piaware
$ sudo systemctl restart piaware

## Check status
$ sudo systemctl status piaware

 

4 - Configure Station ID

Alternative-1:
Get a brand new station number & feeder id

Log-in to your Flightaware account, go to this page and follow instructions to claim a new station https://flightaware.com/adsb/piaware/claim

Alternative-2:
Configure an Existing Station

(a) - Find existing station’s feeder-id (Unique Identifier)
Log-in to your Flightaware account, go to “My ADSB” / stats page
flightaware.com/adsb/stats/user/ ,
and look for 32-digit Unique Identifier: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Copy Unique Identifier from your “My ADSB” page.

(b) - SSH and configure station id:

sudo piaware-config feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
# Replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx by your
# actual feeder-id (Unique Identifier) 

$ sudo systemctl restart piaware   

$ sudo piaware-config allow-manual-updates yes 
$ sudo piaware-config allow-auto-updates yes 
$ sudo systemctl restart piaware 

## Check status
$ sudo systemctl status piaware

 

5 - Build and Install DUMP978-FA - (For USA only)

5.1 - Install dump978-fa dependencies

$ sudo apt install libsoapysdr-dev soapysdr-module-rtlsdr    

5.2 - Clone dump978-fa source code, build package, and install it.

$ cd ~/  
$ git clone https://github.com/flightaware/dump978  
$ cd dump978 
$ sudo dpkg-buildpackage -b --no-sign  
$ cd ../  
$ sudo dpkg -i dump978-fa_3.8.1*.deb  
$ sudo dpkg -i skyaware978_3.8.1*.deb   

5.3. - Enable piaware to use dump978-fa

$ sudo piaware-config uat-receiver-type sdr  
$ sudo systemctl restart piaware   

6 - Configuration for using both dump1090-fa & dump978-fa (Two dongles are required)

6.1 - Serialize dongles: (CLICK HERE)

If you want to receive both ES1090 and UAT978, then two dongles are required, one for 1090 and other for 978. In this case you will have to serialize dongles so that correct dongle+antenna sets are used by dump1090-fa and dump978-fa.

For 1090 Mhz dongle: use serial # 00001090
For 978 Mhz dongle : use serial # 00000978

6.2 - Configure dump1090-fa & dump978-fa to use dongles of assigned serial numbers

$ sudo sed -i 's/--device-index 0/--device-index 00001090/' /etc/default/dump1090-fa   
$ sudo sed -i 's/driver=rtlsdr/driver=rtlsdr,serial=00000978/' /etc/default/dump978-fa   

6.3 - Reboot so that dump1090-fa & dump978-fa can pick their assigned dongles at boot

$ sudo reboot  

 

 

7 - B O N U S

7.1 - ModeSMixer2

7.1.1 - Copy-paste following command and press Enter key.

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

7.1.2 - When the script finishes installation, it will display instructions to configure. Follow those instructions
 

7.1.3 - For help and to list all config parameters:
$ modesmixer2 --help

7.1.4 - For detailed Install, Configuration, and Uninstall instructions:
https://github.com/abcd567a/mm2/blob/master/README.md

 

7.2 - Flightradar24 Feeder

7.2.1 - Issue following two commands to download and install fr24feed’s deb package for amd64 architecture:

$ wget https://repo-feed.flightradar24.com/linux_x86_64_binaries/fr24feed_1.0.25-3_amd64.deb    

$ sudo dpkg -i fr24feed_1.0.25-3_amd64.deb   

 

7.2.2 - CONFIGURE

CASE (a): If you have a sharing key:
$ sudo nano /etc/fr24feed.ini

Above command will open a file with following entries

bs=yes
raw=yes
mlat="yes"
mlat-without-gps="yes"

Add following lines to the file fr24feed.ini (replace xxxxxxxxxxx by your actual sharing key).

receiver="beast-tcp"
host="127.0.0.1:30005"
fr24key="xxxxxxxxxxxxxx"

Save file (Ctrl+o) and close (Ctrl+x)

Restart fr24feed
$ sudo systemctl restart fr24feed

CASE (b): If you do NOT have a sharing key:
signup using following command and provide your details such as email, latitude, longitude etc

$ sudo fr24feed --signup
$ sudo systemctl restart fr24feed

 

7.3 - Planefinder feeder

This method uses i386 deb package, as planefinder’s amd64 package is not available

7.3.1 - Prepare x86_64 OS to accept i386 deb package and i386 linux binary

$ sudo dpkg --add-architecture i386   
## Check
$ dpkg --print-foreign-architectures    

## Update apt and download necessary i386 packages
$ sudo apt update   
$ sudo apt install gcc-8-base:i386 libc6:i386 libgcc1:i386 libidn2-0:i386 libunistring2:i386  

 

7.3.2 - Download and install deb package “pfclient_4.1.1_i386.deb”

$ wget http://client.planefinder.net/pfclient_4.1.1_i386.deb   
$ sudo dpkg -i pfclient_4.1.1_i386.deb   

$ sudo systemctl status pfclient   

7.3.3 - In your browser go to page localhost:30053 (or to IP:30053 from another computer)
If you dont have a sharing key: Add your email and other details
If you have sharing key, add it & latitude, longitude.

 
 

2 Likes

Victoria AU has gone into lockdown again for the next 6 weeks and I am bored.

Very bored so I decided to load an Ubuntu 20 image for VMWare and follow the above instructions.

From when I went looking for the Ubuntu image took exactly 2 hours to have it up and running.

 piaware.service - FlightAware ADS-B uploader
     Loaded: loaded (/lib/systemd/system/piaware.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-08-06 01:04:30 EDT; 1min 36s ago
       Docs: https://flightaware.com/adsb/piaware/
   Main PID: 930 (piaware)
      Tasks: 4 (limit: 4624)
     Memory: 26.1M
     CGroup: /system.slice/piaware.service
             ├─ 930 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
             ├─1243 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat -37.869 --lon 145.039
             └─1326 /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --input-type dump1090 --results beast,connect,localhost:30104 --results beast,listen,30105 --results ext_bases>

Aug 06 01:04:35 ubun2004 piaware[930]: mlat-client(1326): Using UDP transport to 70.42.6.156 port 5276
Aug 06 01:04:35 ubun2004 piaware[930]: mlat-client(1326): Listening for Beast-format results connection on port 30105
Aug 06 01:04:35 ubun2004 piaware[930]: mlat-client(1326): Listening for Extended Basestation-format results connection on port 30106
Aug 06 01:04:35 ubun2004 piaware[930]: mlat-client(1326): Route MTU changed to 1500
Aug 06 01:04:35 ubun2004 piaware[930]: mlat-client(1326): Input connected to localhost:30005
Aug 06 01:04:35 ubun2004 piaware[930]: mlat-client(1326): Input format changed to BEAST, 12MHz clock
Aug 06 01:04:35 ubun2004 piaware[930]: piaware received a message from dump1090-fa!
Aug 06 01:04:35 ubun2004 piaware[930]: mlat-client(1326): Beast-format results connection with 127.0.0.1:30104: connection established
Aug 06 01:04:46 ubun2004 piaware[930]: piaware has successfully sent several msgs to FlightAware!
Aug 06 01:05:05 ubun2004 piaware[930]: 9 msgs recv'd from dump1090-fa; 9 msgs sent to FlightAware

It was a bit tedious doing a cut and paste on each line but it seems to be working OK.

With the lockdown and ban on recreational flying there are almost no planes.

This is the Ubuntu VMware image I used

Works well thanks @abcd567

S.

Yes it is tedious, but by issueing commands manually, one learns & understands the process.

I will prepare two bash scripts, one for installing dump1090-fa, other for piaware, and upload these to Github. The users who want an easier method will have to simply copy paste two bash commands and press Enter.

1 Like

To make things easy, I have today added two bash scripts, one for automated install of dump1090-fa & other for automated install of piaware, at top of the first post of this thread.

These scripts reduce the tedious work of copy-pasting a large number of commands, to copy-pasting only two commands: one for dump1090-fa and other for piaware. :slightly_smiling_face:

2 Likes

Gosh @abcd567, I had to do it line by line… only if I was more patient :rofl:

2 Likes

@abcd567 thanks for the tutorial.

I built a VM on virtual box Ubuntu 20 using your script method, and it’s working. Now to play with a better antenna…Took less than an hour all up, including downloading the Ubuntu ISO.

I am in a valley, so I’m not sure I will add any value to the rest of the world, but I found it interesting to do.

Oddly, I had an error on my feed (ipaddress:8080) but while I was looking for a solution, it started working. I actually built a Ubuntu 18 yesterday and it worked, then had the same error…will report back in a few days.

If anyone else is considering doing this, using the scripts above, it’s pretty easy. Just look into how to create a virtual machine with virtualbox and away you go. I am half disappointed that it was so easy, as I learnt nothing about linux in the process. haha I’ll need to do that for another project.

1 Like

In the first post of this thread, there are two options:

  • Option-1: Automated install by script for those who want quick and easy method.
  • Option-2: Manual install for those who want to learn the process & Linux.

Yeah, I may end up doing that - I didn’t mean it as negative, just joking around :slight_smile:

1 Like

NEW ADDITION TO FIRST POST:

Scroll down and see new item 7 - B O N U S
Installation instructions for following on Ubuntu20 amd64:

1. ModeSmixer2
2. Flightradar24 feeder
3. Planfinder feeder

2 Likes

@abcd567 Can you please advise -should I be getting MLAT on this build?

If so, any advise please? On my flightware site, I get green for piaware and flightware, but red for MLAT. I am also pushing to adsbexchange, and it tells me I am sending MLAT to them, so I guess the hardware side is correct.

I did setup my location when I got my feeder ID, but I get:

Location Source: FlightAware is estimating. . .

Feeder Check-In: 2 minutes ago
Feeder Type: PiAware (Debian Package Add-on) 3.8.1
Feeder Mode: Mode-S (1090 MHz)
Multilateration (MLAT): Supported / Receiver location not configured

I wonder if I just need to re-setup my location? But I can’t find the option in my profile in https://flightaware.com/account/manage/ ?

Do you know a command to confirm the data is obtained/valid on ubuntu please?

For Beginners - Howto Set Receiver Location

 

legend, thank you. All green now :slight_smile: The height ASL didn’t stick when I’d set it before.

I am surprised I can get a fair distance with my crappy antenna that came with the SDR dongle. I trimmed it down to tune it. It’s just hanging on my blinds, and I live in a valley…and it goes alright.

Next move is to put the crappy antenna on the roof and see how that goes. If it all works well, I’ll get a rasberry pi so I’m online all the time.

EDIT: and I see you have some info on antenna’s too -

Place the magnetic base antenna over a metal plate or food can. This will provide a ground plane and improve performance. An additional advantage is that if the metal is iron or steel, the magnetic base will cling to it and keep antenna upright.

thanks, I saw your recommendation for that, so I’ve done that in my window, waiting for some planes to see how much range I get (my spot is not super busy airspace). Will try to mount it on the roof on the weekend.

I actually started playing with this as a side task. My goal was to be able to listen to airplanes, but I couldn’t get it working so tried this instead.

EDIT: I see abcd567 has put in FR24 feeder in his details, and I missed that. I had already typed this, so I’ll leave it in case abcd567 insturctions don’t work for someone.

For others using a linux box (as opposed to a Rasberry Pi), process is:

  1. Create FR24 account
  2. Visit Share your ADS-B data - Real-time flight tracker | Flightradar24
  3. Click on “linux” tab to get linux software
  4. Choose your variety of linux (if you are following abcd567 guide - that would be Ubuntu 64 bit, so “Linux Debian package amd64/x86_64” is the right choice
  5. Install that package once downloaded - I am still learning, had issues doing it with terminal, so I just double clicked to install.
  6. Run the raspberry pi script on that same page, but back on the rasberry pi tab.

sudo bash -c “$(wget -O - https://repo-feed.flightradar24.com/install_fr24_rpi.sh)”

  1. put in your details (you’ll need to know your antenna position lat/long/ASL in feet

NOTE: I am not 100% sure the script will work…when I did it, I ran the script first, which failed. I then manually ran the lines till I found the issue, which was I was missing fr24 feed package, so I then went and downloaded as per point 3 and 4 above, I then went back and continued running the script one line at a time manually. But I am pretty sure once the package is installed, it should work.

Also, if you want to feed to adsb exchange, just running their script worked for me

sudo bash -c “$(wget -nv -O - https://raw.githubusercontent.com/adsbxchange/adsb-exchange/master/install.sh)”

Installation on KALI LINUX

Successfully installed dump1090-fa & piaware on Kali Linux 2020.2 amd64 using method in 1st post of this thread.

  1. Installed on Win10 Desktop/Oracle VM, the distro “kali-linux-2020.2-amd64”

    abcd@kali:~$ uname -a
    Linux kali 5.7.0-kali1-amd64 #1 SMP Debian 5.7.6-1kali2 (2020-07-01) x86_64 GNU/Linux
     

  2. Installed dump1090-fa and piaware 3.8.1 on “Kali Linux 2020.2-amd64”, using method in first post of this thread. Worked perfectly well on Kali Linux also.

  3. I had to issue following extra commands. This is because on Kali Linux the packages installed by sudo dpkg -i and sudo apt install commands are kept disabled by default. The user has to enabled these manually.

    sudo systemctl enable lighttpd
    sudo systemctl restart lighttpd

    sudo systemctl enable dump1090-fa
    sudo systemctl restart dump1090-fa

    sudo systemctl enable piaware
    sudo systemctl restart piaware

 

LATER ADDITION:

(1) Added above noted systemctl enable commands in:

  • Automated install scripts
  • Manual install how-to

(2) Added “Kali Linux amd64” in the title of this thread

 

Noted that in Kali Linux 2020 amd64, by default the web-server Apache2 is installed, but is disabled by default. In this condition SkyView map works OK as lighttpd serves the map.

However if someone has enabled Apache2 Web-Server, the SkyView map fails to display even though lighttpd is also installed and enabled. This can be overcome by issuing following commands:

$ sudo systemctl stop apache2  
$ sudo systemctl disable apache2  
$ sudo reboot  

Hello,

I’m trying to install on Ubuntu 20.04 but I got some errors
It is in step 2.5 - Build & install dump1090-fa package

Do you have any idea to move on? Google doesn’t help.

sudo dpkg -i dump1090-fa_3.8.1*.deb     

...

Restarting lighttpd..
Job for lighttpd.service failed because the control process exited with error code.
See "systemctl status lighttpd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript lighttpd, action "restart" failed.
● lighttpd.service - Lighttpd Daemon
     Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Tue 2020-09-29 21:25:28 CEST; 16ms ago
     Process: 4665 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=127)

zář 29 21:25:28 tomas-Lenovo-IdeaPad-Z510 systemd[1]: Failed to start Lighttpd Daemon.

For more details I tried:

tomas@tomas-Lenovo-IdeaPad-Z510:~$ systemctl status lighttpd.service
● lighttpd.service - Lighttpd Daemon
     Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2020-09-29 21:26:12 CEST; 35s ago
     Process: 4870 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=127)

zář 29 21:26:12 tomas-Lenovo-IdeaPad-Z510 systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
zář 29 21:26:12 tomas-Lenovo-IdeaPad-Z510 systemd[1]: Stopped Lighttpd Daemon.
zář 29 21:26:12 tomas-Lenovo-IdeaPad-Z510 systemd[1]: lighttpd.service: Start request repeated too quickly.
zář 29 21:26:12 tomas-Lenovo-IdeaPad-Z510 systemd[1]: lighttpd.service: Failed with result 'exit-code'.
zář 29 21:26:12 tomas-Lenovo-IdeaPad-Z510 systemd[1]: Failed to start Lighttpd Daemon.

@quetzalco

Try this:

sudo apt install gamin 

sudo systemctl restart lighttpd  

sudo systemctl status lighttpd  

1 Like

Thanks a lot, it worked. Now I’m a step further with another mistake.

tomas@tomas-Lenovo-IdeaPad-Z510:~$ sudo systemctl status dump1090-fa 
● dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
     Loaded: loaded (/lib/systemd/system/dump1090-fa.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Wed 2020-09-30 08:19:41 CEST; 19s ago
       Docs: https://flightaware.com/adsb/piaware/
    Process: 9311 ExecStart=/usr/share/dump1090-fa/start-dump1090-fa --write-json /run/dump1090-fa --quiet (code=exited, status=1/FAILURE)
   Main PID: 9311 (code=exited, status=1/FAILURE)

Restart did’nt help me.

## If status shows: Failed with result 'exit-code'
## then REBOOT Computer
$ sudo reboot