FlightAware Discussions

How-to Install dump1090-fa on Arch Linux x64_86 and on AlarmPi


#1

Build and Install dump1090-fa on following distros of Arch Linux

(1) Arch Linux x64_x86
(2) AlarmPi (Arch Linux for armhf RPi 2/3 )

STEP-1

1.1 - Create a file install-dump-fa.sh
1.2 - Make it executable
1.3 - Open it in nano to edit it

[abcd@archlinux ~]$ sudo touch install-dump1090-fa.sh
[abcd@archlinux ~]$ sudo chmod +x install-dump1090-fa.sh
[abcd@archlinux ~]$ sudo nano install-dump1090-fa.sh

STEP-2

2.1 - Copy-paste following code in the newly created file install-dump1090-fa.sh
2.2 - Save the file (Ctrl+o) and close it (Ctrl+x)

NOTE: Scroll down to see full code. Only part is displayed in the window below

#!/bin/bash
#first move to home directory
#all subsequent code is relative to home directory
cd ~/

#Install build tools and dependencies
yes | sudo pacman -Sy git wget make pkg-config gcc rtl-sdr lighttpd

#Clone source code
sudo git clone https://github.com/flightaware/dump1090.git

cd ~/dump1090

#Do you have bladeRF? 
#If not, you dont need to install its support package
#Make dump1090-fa package WITHOUT bladeRF

sudo make BLADERF=no

#CONFIGURE DUMP1090-FA
sudo cp ~/dump1090/dump1090  /usr/bin/dump1090-fa
sudo mkdir -p /usr/share/dump1090-fa
sudo cp -r ~/dump1090/public_html  /usr/share/dump1090-fa/html
sudo cp ~/dump1090/debian/dump1090-fa.default  /etc/default/dump1090-fa
sudo cp ~/dump1090/debian/dump1090-fa.service  /lib/systemd/system/dump1090-fa.service
sudo systemctl enable dump1090-fa.service
sudo useradd --system dump1090

## CONFIGURE LIGHTTPD
sudo cp /etc/lighttpd/lighttpd.conf  /etc/lighttpd/lighttpd.conf.orig
sudo mkdir /etc/lighttpd/conf.d
sudo cp ~/dump1090/debian/lighttpd/88-dump1090-fa-statcache.conf  /etc/lighttpd/conf.d/
sudo cp ~/dump1090/debian/lighttpd/89-dump1090-fa.conf  /etc/lighttpd/conf.d/

#Add "server.module" and "include" lines in lighttpd.conf
sudo chmod 777  /etc/lighttpd/lighttpd.conf
sudo echo ""  >> /etc/lighttpd/lighttpd.conf
sudo echo "server.modules += ( \"mod_alias\" )" >> /etc/lighttpd/lighttpd.conf
sudo echo "include \"/etc/lighttpd/conf.d/*\""  >> /etc/lighttpd/lighttpd.conf
sudo chmod 644  /etc/lighttpd/lighttpd.conf

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

#
#

STEP-3

3.1 - Run the script

[abcd@archlinux ~]$ ./install-dump1090-fa.sh

STEP-4

4.1 - Open your broeser and see SkyView map at this address:
localhost/dump1090-fa
IP-of-Pi/dump1090-fa/

STEP-5

5.1 - Open file /etc/default/dump1090-fa for editing

[abcd@archlinux ~]$ sudo nano /etc/default/dump1090-fa

.
5.2 - Scroll down to following line
RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0 --net-bo-port 30005"

.
5.3 - Add --lat xx.xxxx lon yy.yyyy so line becomes like below
NOTE: Replace xx.xxxx and yy.yyyy by your actual latitude and longitude

RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0 --net-bo-port 30005 --lat xx.xxx --lon yy.yyyy"

.
5.4 - Save (Ctrl+o) and Close (Ctrl+x) the file

.
5.5 - Restart dump1090-fa

[abcd@archlinux ~]$ sudo systemctl restart dump1090-fa

5.6 - Clear browser cache (Ctrl+Shift+Delete) and Reload browser (Ctrl+F5) and see your SkyView map.

ENJOY !


#2

I have too an Core2Duo quad-cpu Q6600 doing nothing around. It would be an interesting exercise… even if in the end will take too much power to run.


#3
  1. The installation of dump1090-fa is easy if you use script I have posted above.

    I had real problem in integration of SkyView map with lighttpd. Whatever I try, lighttpd wont serve the SkyView. Instead it served only its page in document.root directory, although I have included following files in lighttpd.conf:

    88-dump1090-fa-statcache.conf
    89-dump1090-fa.conf

    It took me 3 days to finally discover that unlike Debian flavour of lighttpd, the Arch flavour of lighttpd does NOT have the module “mod_alias” enabled by default. Adding following line in file /etc/lighttpd/lighttpd.conf did the magic:

    server.modules += ( "mod_alias" )

  2. Installation of Arch Linux and AlarmPi distro itself is the harder part. The live .iso is without auto install. For RPi, no burnable image for microSD card available. One has to create, format and mount linux partions manually, and then do all the configuration and settings manually. It is a good learning process, though very frustrating. It took me several failed attempts and several days to finally succeed in installing Arch Linux x64_86 on my desktop, and AlarmPi on microSD card of RPi.

  3. NEXT PROJECT (Not yet tried):
    How to install PIAWARE on Arch Linux / AlarmPi?


#4

I am happy that you took time figure out those :smiley: Like the lack of alias module above!


#5

The first post gave installation of dump1090-fa on Arch Linux “by hand”, i.e. no installation package was build, only the executeable binary was built, and the the script carried out configuration steps.

Now I have written script to build dump1090-fa installation package for Arch Linux. This is in the arch Linux’s standard format and consists of two script files PKGBUILD and install.install.

I intended to upload these to AUR (Arch User’s Repository), but this requires adding a public key for SSH. The site is very user-UNfriendly, and I am unable to add SSH public Key. I made innumerable number of tries, but always got this message:
The SSH public key is invalid.
Finally I got fed up, and uploaded my work on GitHub…very easy.

How to built dump1090-fa’s installation Package for Arch Linux and AlarmPi

git clone https://github.com/abcd567a/dump1090-fa-arch.git
cd dump1090-fa-arch
ls
install.install  PKGBUILD  README.md

makepkg -si

Last command above will build following package

dump1090-fa-latest-1-*.pkg.tar.xz
#here the * will be either  x86_64 or armh6 or armh7, depending on your Computer or RPi architecture

After building the package, it will also offer to install the pakage immediately [yes/no].
Alternatively you can install it later by command

sudo pacman -U dump1090-fa-latest-1-*.pkg.tar.xz  

README.md

#dump1090-fa (AUR) for Arch Linux

Enter cloned directory. It contains following two files
PKGBUILD
install.install

Give command “makepkg -si”

Above command will:

(1) Check for conflicts with existing other versions of dump1090
(2) Install dependencies rtl-sdr, lighttpd, and bladerf
(3) Will build package dump1090-fa-latest--.pkg.tar.xz
(4) Offer to install the above package[yes/no]

The above package can be install later also by following command:
cd dump1090-fa-arch
sudo pacman -U dump1090-fa-latest--.pkg.tar.xz

#=========================================================
T H I N G - TO - DO (AFTER INSTALLATION IS COMPLETED)
#=========================================================
To make SkyView Map show range rings, do following:

(1) Open file “dump1090-fa” for editing

sudo nano  /etc/default/dump1090-fa 

(2) In the opened file, go to following line:
RECEIVER_OPTIONS="–device-index 0 --gain -10 --ppm 0 --net-bo-port 30005"
In above line, add your latitude and longitude, so the line becomes like below:
RECEIVER_OPTIONS="–device-index 0 --gain -10 --lat xx.xxxx --lon yy.yyyy --ppm 0 --net-bo-port 30005"
NOTE: Repalce xx.xxxx and yy.yyyy by your actual latitude and Longitude

(3) Restart dump1090-fa

sudo systemctl restart dump1090-fa 

(4) Clear browser cache and reload browser


#6

After building and installing dump1090-fa as shown in my post above and http://github.com/abcd567a/dump1090-fa-arch , yesterday I built and installed piaware on AlarmPi (Arch Linux ARM) on my RPi model2.

I had also to build following packages from source code, before I could succeed in building piaware package from source code. (These packages are NOT available in Arch Linux Repository).

tcltls tclx tcllib tcllauncher mlat-client

Although Piaware is feeding data to Flightaware, three green buttons are missing from my ADS-B stats page. Dont know why.


#7

PIAWARE & DUMP1090-FA WORKING OK ON ARCH LINUX ARM (ALARM PI)

(1) PIAWARE

[alarm@alarmpi piaware-arch]$ sudo systemctl status piaware

* piaware.service - FlightAware ADS-B uploader
   Loaded: loaded (/usr/lib/systemd/system/piaware.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-11-19 18:08:27 UTC; 45min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 262 (piaware)
    Tasks: 4 (limit: 2211)
   CGroup: /system.slice/piaware.service
           |-262 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
           |-277 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 43.xxx --lon -79.xxx
           `-292 python3 /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --input-type dump1090 --results beast,conn>

Nov 19 18:39:02 alarmpi piaware[262]: 6555 msgs recv'd from dump1090-fa (1082 in last 5m); 6353 msgs sent to FlightAware
Nov 19 18:40:42 alarmpi piaware[262]: mlat-client(292): Receiver status: connected
Nov 19 18:40:42 alarmpi piaware[262]: mlat-client(292): Server status:   synchronized with 110 nearby receivers
Nov 19 18:40:42 alarmpi piaware[262]: mlat-client(292): Receiver:  192.4 msg/s received       66.8 msg/s processed (35%)
Nov 19 18:40:42 alarmpi piaware[262]: mlat-client(292): Server:      0.3 kB/s from server    0.0kB/s TCP to server     0.8kB/s UDP to server
Nov 19 18:40:42 alarmpi piaware[262]: mlat-client(292): Results:  123.1 positions/minute
Nov 19 18:40:42 alarmpi piaware[262]: mlat-client(292): Aircraft: 15 of 37 Mode S, 16 of 24 ADS-B used
Nov 19 18:44:02 alarmpi piaware[262]: 7650 msgs recv'd from dump1090-fa (1095 in last 5m); 7448 msgs sent to FlightAware
Nov 19 18:49:02 alarmpi piaware[262]: 8744 msgs recv'd from dump1090-fa (1094 in last 5m); 8542 msgs sent to FlightAware
Nov 19 18:54:02 alarmpi piaware[262]: 9868 msgs recv'd from dump1090-fa (1124 in last 5m); 9666 msgs sent to FlightAware

.

(2) DUMP1090-FA

[alarm@alarmpi piaware-arch]$ sudo systemctl status dump1090-fa
* dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
   Loaded: loaded (/usr/lib/systemd/system/dump1090-fa.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-11-19 18:08:24 UTC; 48min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 248 (dump1090-fa)
    Tasks: 3 (limit: 2211)
   CGroup: /system.slice/dump1090-fa.service
           `-248 /usr/bin/dump1090-fa --device-index 0 --gain -10 --ppm 0 --net-bo-port 30005 --max-range 360 --net --net-heartbeat 60 --ne>

Nov 19 18:08:24 alarmpi systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Nov 19 18:08:24 alarmpi dump1090-fa[248]: Mon Nov 19 18:08:24 2018 UTC  dump1090-fa  starting up.
Nov 19 18:08:24 alarmpi dump1090-fa[248]: rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832U, SN 00000000)
Nov 19 18:08:24 alarmpi dump1090-fa[248]: Found Rafael Micro R820T tuner
Nov 19 18:08:24 alarmpi dump1090-fa[248]: rtlsdr: enabling tuner AGC

LATER ADDITION:

Just for fun tried “Upgrade and restart Piaware” from “My ADS-B” page :slight_smile: