FlightAware Discussions

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

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 !

1 Like

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.

1 Like
  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?

1 Like

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

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

1 Like

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.

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:

How To Install Arch Linux x86_64 OS on PC

(1) Download .iso file using torrent

https://www.archlinux.org/download/

(2) Burn a CD with the Archlinux .iso, and boot your PC from CD.

Select “Boot Arch Linux (x86_64)”

Click image for larger version
image

After Booting you will see the screen below
Click image for larger version
image

(3) FOLLOW STEPS BELOW:

(3.1) CHECK PARTITIONS:

lsblk

 

(3.2) CREATE PARTITIONS:

fdisk /dev/sdX 

## replace sdX by your actual drive number (sda, or sdb, or sdc etc) on which
## you want to install Arch Linux

Type “n” for a new partition.
Type “p” for a primary partition and select the partition number.

The First sector is automatically selected and you just need to press Enter.

For Last sector, type the size you want to allocate for this partition
(like +10G for a 10 Gb disk size).

Press “a” and choose partition type “boot”.

Create one more partitions in similar way for Swap.
(a) Make it’s size double the of size of RAM
(b) Do NOT make it bootable

Press ‘w‘ to save the changes and exit.

To see boot flag is at sdX1, and no flag at sdX2

fdisk -l /dev/sdX 
## replace sdX by your actual drive number (sda, or sdb, or sdc etc) on which
## you want to install Arch Linux

 

(3.3) CREATE FILE SYSTEM:

mkfs.ext4 /dev/sdX1 
mkswap /dev/sdX2 
swapon /dev/sdX2 

## replace sdX by your actual drive number (sda, or sdb, or sdc etc) on which
## you want to install Arch Linux

 

(3.4) MOUNT FILE SYSTEM:

mount /dev/sdX1 /mnt 

## replace sdX1 by your actual drive number (sda1,or sdb1, or sdc1 etc) on which
## you want to install Arch Linux

 

(3.5) INSTALL ARCH LINUX:
NOTE: Each of following 2 commands Take long time to complete.
Please be patient.

pacstrap /mnt base base-devel 
pacstrap /mnt linux linux-firmware

 

(3.6) CONFIGURE fstab:

genfstab -U /mnt >> /mnt/etc/fstab

 

(3.7) CHANGE ROOT INTO NEW SYSTEM

arch-chroot /mnt

The command prompt will change

From: image

To: image

(To exit chroot, use command “exit”)

 

(3.8) SET TIME ZONE:
Give following command to list all regions and timezones:

ls /usr/share/zoneinfo

Set your zone by following command
(NOTE: Replace Canada and Eastern by your region & timezone)

ln -sf /usr/share/zoneinfo/Canada/Eastern /etc/localtime

 

(3.9) SET HARDWARE CLOCK:

hwclock --systohc --utc

 

(3.10) SET LOCALE:

(3.10.1) Install nano:

pacman -Syu nano

(3.10.2) Open file locale.gen for editing

nano /etc/locale.gen   

Scroll down and uncomment following line (i.e. delete # at the start of line)
#en_US.UTF-8 UTF-8
Save and close

(3.10.3) Issue following commands:

locale-gen  
echo LANG=en_US.UTF-8 > /etc/locale.conf  
export LANG=en_US.UTF-8  

 

(3.11) SET HOSTNAME & ROOT PASSWORD:

(3.11.1) Set hostname:

NOTE:
(i) Replace “HOSTNAME” by name of your choice without “”

echo "HOSTNAME" > /etc/hostname  
echo "HOSTNAME" >> /etc/hosts  

(3.11.2) Set Root password:

passwd

 

(3.12) INSTALL WIRED NETWORK eth0

pacman -S dhcpcd 
systemctl enable dhcpcd 

Check:

ping -c 3 google.com

 

(3.13) INSTALL BOOTLOADER (GRUB)

pacman -S grub os-prober 
grub-install /dev/sdX 

## Relace sdX by the drive number on which you have installed
## ArchLinux (sda, or sdb, or sdc, etc) 

grub-mkconfig -o /boot/grub/grub.cfg

 

(3.14) INSTALL DESKTOP GNOME:

pacman -S xorg xorg-server 
pacman -S gnome gnome-extra

Enable GDM

systemctl enable gdm.service 

## if above command results in "Unit gdm.service not found", 
## issue following two commands: 
## pacman -S gdm 
## systemctl enable gdm.service

 

(3.15) INSTALL SSH:

systemctl enable sshd 

## if above command gives output "Unit sshd.service not found"
## give following two commands
## pacman -S openssh 
## systemctl start sshd  (not in chroot, after booting to installed OS)

 

(3.16) ADD USER:

## in commands below, replace [username] by actual username, and without [  ] 

useradd -m -g users -G wheel,audio,power,storage,optical,video,lp,games -s /bin/bash [username]   

passwd [username]  

 

(3.17) ENABLE SUDO FOR NEW USER

EDITOR=nano visudo

Above command will launch file /etc/sudoers.tmp

Scroll down and un-comment following line (i.e. delete # at start of line)
# %wheel ALL=(ALL) ALL

Save & Close

 

(3.18) EXIT AND BOOT TO NEWLY INSTALLED OS

(3.18.1) Issue following commands

exit 

reboot

(3.18.2) At boot screen, select "Boot Existing OS"
(3.18.3) Remove installation CD

 

(3.19) INSTALL DUMP1090-FA

git clone https://github.com/abcd567a/dump1090-fa-arch.git

cd dump1090-fa-arch

makepkg -si

For detailed instructions about dump1090-fa installation:

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

 

 

[abcd@arch2020 ~]$ pacman -Qi dump1090-fa
Name            : dump1090-fa
Version         : 4.0.r1.g4cde98e-1
Description     : None
Architecture    : x86_64
URL             : None
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : rtl-sdr  lighttpd  bladerf
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : dump1090  dump1090-mutability  dump1090-mutability-git
                  dump1090-fa-git  dump1090-git  dump1090_mr-git
Replaces        : None
Installed Size  : 13.42 MiB
Packager        : Unknown Packager
Build Date      : Sun 11 Oct 2020 03:12:31 PM EDT
Install Date    : Sun 11 Oct 2020 03:13:16 PM EDT
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : None

1 Like

Need to resolve this issue.

In SkyView map in Arch Linux x86_64, the version of dump1090-fa is shown as unknown.
image

 

In file index.html it says:

<td style="text-align: right">
<a href="https://github.com/flightaware/dump1090" id="dump1090_version" target="_blank"></a>
</td>

In file script.js it says

$('#dump1090_version').text(Dump1090Version);

Dump1090Version = data.version;

The file http://10.0.0.35/dump1090-fa/data/receiver.json and file /run/dump1090-fa/receiver.json say version : unknown

image

 

image

 

Version was included in the package itself during it was built by following code

pkgver() {
  cd $srcdir/dump1090
  printf "%s" "$(git describe --tags | sed 's/-.*//')"
}

 

Query of installed package shows the version

[abcd@archlinux ~]$ pacman -Qi dump1090-fa
Name            : dump1090-fa
Version         : v4.0-1
Description     : None
Architecture    : x86_64
URL             : None
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : rtl-sdr  lighttpd  bladerf
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : dump1090  dump1090-mutability  dump1090-mutability-git  dump1090-fa-git  dump1090-git  dump1090_mr-git
Replaces        : None
Installed Size  : 14.55 MiB
Packager        : Unknown Packager
Build Date      : Sun 31 Jan 2021 06:32:37 AM EST
Install Date    : Sun 31 Jan 2021 06:34:47 AM EST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : None

[SOLVED] Issue “version unknown” on map

In file PKGBUILD, modified this:

build() {
  cd ${srcdir}/dump1090
  make all faup1090 
}

 

To this:

build() {
  cd ${srcdir}/dump1090
  make all faup1090 DUMP1090_VERSION=$(git describe --tags | sed 's/-.*//')       
}

 

Now all OK:
image

 

 

image

Including faup1090 in piaware package for Arch Linux / AlarmPi

@obj
As the source-code for faup1090 is included in code for dump1090-fa, when building package for dump1090-fa, I built the faup1090 along with it by following code:

build() {
  cd ${srcdir}/dump1090
  make all faup1090 DUMP1090_VERSION=$(git describe --tags | sed 's/-.*//')
}

 

Yesterday I built and installed Piaware on Arch Linux, but did NOT built and install dump1090-fa. Instead I tried to feed Piaware from dump1090-fa on another computer (RPi) through network (socat TCP-LISTEN:30005,fork TCP:10.0.0.23:30005 &). I found Piaware on Arch Linux is complaining faup1090 is not found.

In order to make Piaware data feeder stand-alone and not depend on dump1090-fa for faup1090, In the Piaware build script (file PKGBUILD), I added chunks of code shown in 2 red rectangles in screenshots below. This resulted in building and including faup1090 in the Piaware package itself.

Now Piaware works OK as stand-alone app, without installing dump1090-fa. :slightly_smiling_face:

 

 

Piaware fed from dump1090-fa on another computer (10.0.0.23 port 30005) through socat:

socat TCP-LISTEN:30005,fork TCP:10.0.0.23:30005 &

Well - yes - this is necessary, and it’s exactly what piaware_builder does.

1 Like

fa-mlat-client

@obj
I have built fa-mlat-client using source code at github.com/mutability/mlat-client, but multilatration does not work (Enabled, but not synchronized with any station)

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

image

 

The fa-mlat-client package building script

[abcd@archlinux mlat-client-git]$ cat PKGBUILD 

#!/hint/bash -e
# Maintainer: Adrien Smith <adrien at bouldersmiths dot com>
# Contributor: Martin Poljak <martin at poljak dot cz>
# Contributor: Dan Schaper <dschaper at ganymeade dot com>

pkgname=mlat-client-git
pkgver=0.2.11.r0.g5dc5bda
pkgrel=1
pkgdesc="Mode S multilateration client by Mutability"
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/mutability/mlat-client"
license=('GPL3')
depends=('python')
makedepends=('git')
provides=("${pkgname%-git}" "fa-${pkgname%-git}")
conflicts=("${pkgname%-git}" "fa-${pkgname%-git}")
changelog="$pkgname.changelog"
source=("${pkgname%-git}::git+$url.git")
md5sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${pkgname%-git}"
  ./setup.py build
}

package() {
  cd "${pkgname%-git}"
  ./setup.py install --prefix="${pkgdir}/usr"
  install -Dm755 -t "${pkgdir}/usr/lib/piaware/helpers/" fa-mlat-client    
  install -Dm755 -t "${pkgdir}/usr/bin/" mlat-client
  rm -f "${pkgdir}/usr/bin/fa-mlat-client"
}

 

 

Output of querry command

[abcd@archlinux ~]$ pacman -Qi fa-mlat-client  

Name            : mlat-client-git
Version         : 0.2.11.r0.g5dc5bda-1
Description     : Mode S multilateration client by Mutability
Architecture    : x86_64
URL             : https://github.com/mutability/mlat-client
Licenses        : GPL3
Groups          : None
Provides        : mlat-client  fa-mlat-client
Depends On      : python
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : mlat-client  fa-mlat-client
Replaces        : None
Installed Size  : 232.13 KiB
Packager        : Unknown Packager
Build Date      : Sat 06 Feb 2021 11:19:42 AM EST
Install Date    : Sat 06 Feb 2021 06:46:02 PM EST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None


 

EDIT-1:

Reinstalled mlat-client and piaware. Now working OK

image

 

EDIT-2:

As dump1090-fa was not running, Piaware kept on complaining as follows:

mlat-client(1163): Beast-format results connection with ::1:30104: [Errno 111] Connection refused

Silenced it by following command
socat TCP-LISTEN:30104,fork TCP-LISTEN:31104 &

Now it stopped the repeated complaints, and said:
mlat-client(1261): Beast-format results connection with 127.0.0.1:30104: connection established

EDIT-3:

Planning to add fa-mlat-client in the Piaware package itself (in similar way as I have added faup1090 in Piaware package).

Self-Contained Piaware Packaging Script

Builds following components in one package

  1. Piaware data feeder
  2. faup1090
  3. fa-mlat-client

The build script consists of following 3 files in same folder (change ownership of this folder and files in it to yourself)

sudo chown -R abcd /home/abcd/piaware-combo

  1. PKGBUILD
  2. piaware.install
  3. piaware.conf

To build the package, enter the folder containing the above 3 files, and give following command:

makepkg -si

1- PKGBUILD

#Contributor: abcd567
#Maintainer: abcd567

pkgname=piaware
pkgver=latest
pkgrel=1

pkgdesc="Flightaware ADS-B data feeder"

arch=('i686' 'i386' 'x86_64' 'armv6h' 'armv7h' 'armv8h' 'aarch64')
url="https://github.com/flightaware/piaware"
license=('BSD')

depends=('git' 'autoconf' 'tcl' 'tcllib' 'tclx' 'tcltls' 
         'python' 'tk' 'tcllauncher' 'net-tools')

source=('piaware::git+git://github.com/flightaware/piaware'
        'faup1090::git+git://github.com/flightaware/dump1090'
        'fa-mlat-client::git://github.com/mutability/mlat-client.git')

md5sums=('SKIP' 'SKIP' 'SKIP')
install=piaware.install

pkgver() {
  cd ${srcdir}/piaware
  git describe --tags | sed 's/-.*//'
}
package() {
## Build faup1090
  cd ${srcdir}/faup1090
  make faup1090
  install -Dm755 ${srcdir}/faup1090/faup1090 ${pkgdir}/usr/lib/piaware/helpers/faup1090

## Build fa-mlat-client
  cd ${srcdir}/fa-mlat-client
  ./setup.py install --prefix=${pkgdir}/usr
  install -Dm755 ${pkgdir}/usr/bin/fa-mlat-client  ${pkgdir}/usr/lib/piaware/helpers/fa-mlat-client
  rm -rf ${pkgdir}/usr/bin/

## Build piaware
  cd ${srcdir}/piaware
  make install DESTDIR=${pkgdir} SYSTEMD=/usr/lib/systemd/system

  install -dm755 ${pkgdir}/var/cache/piaware
  install -dm750 ${pkgdir}/etc/sudoers.d/
  install -Dm644 etc/piaware.sudoers ${pkgdir}/etc/sudoers.d/01piaware
  install -Dm640 ../../piaware.conf ${pkgdir}/etc/piaware.conf
  chmod -x ${pkgdir}/usr/lib/systemd/system/piaware.service
  install -Dm644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}

 

2 - piaware.install

post_install() {
        useradd --system piaware
        chown piaware /var/cache/piaware
        chown piaware /etc/piaware.conf
        systemctl enable piaware
        systemctl start piaware
}

pre_remove() {
        systemctl stop piaware
        systemctl disable piaware
        userdel piaware
}

post_upgrade() {
        post_install
}

 

3 - piaware.conf

# This file configures piaware and related software.
# You can edit it directly or use piaware-config from the command line
# to view and change settings.
#
# If /boot/piaware-config.txt also exists, then settings present in
# that file will override settings in this file.



Packages To Be Installed before building piaware package

(1) BUILD TOOLS to be installed before building any package

sudo pacman --needed -Sy fakeroot binutils git autoconf gcc make patch 

(2) Install Piaware dependencies available in Arch Linux Repository

sudo pacman --needed -Sy tcl python tk  

(3) Piaware depencies not available in repository. Build and install these as follows.

NOTE: Building these requires build tools [item (1) above] be installed first.

git clone https://aur.archlinux.org/tcllib
cd tcllib
makepkg -si
cd ../
git clone https://aur.archlinux.org/tclx
cd tclx
makepkg -si
cd ../
git clone https://aur.archlinux.org/tcltls
cd tcltls
makepkg -si
cd ../
git clone https://aur.archlinux.org/tcllauncher
cd tcllauncher
makepkg -si
cd ../

 

1 Like

Initially I have tried to use piaware_builder

git clone http://github.com/flightaware/piaware_builder 
cd piaware_builder 
sudo ./sensible-build.sh buster 
cd package-buster 
make

I got responce:
No Makefile found, aborting

This is unsurprising; it’s a Debian package builder.

Initially I have built piaware package for Arch Linux using piaware source code. I found it lacks faup1090 and fa-malat-client, whereas the .deb package built using piaware_builder source code has both these components.

I therefore tried piaware_builder source code to build piaware package for Arch Linux, but found it is designed for making .deb packages.

I solved this by modifying the script of PKGBUILD file to include building of all three components from their respective source codes in one go, and pack them in one package named piaware-verxxx.pkg.tar.zx.

When this package is installed, all 3 components get installed. When this package is uninstalled, all 3 get removed.

 

Build & Install Piaware on Arch Linux & AlarmPi:

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

 
 

Build & Install Dump1090-fa on Arch Linux & AlarmPi:

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

 

 

 

This is what I get on “My ADSB” page which I feed from Piaware SD Card image or RaspberryPi OS image

image

 

This is what I get on “My ADSB” page which I feed from Arch Linux Arm OS:
3 green buttons are missing

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

image

 

I have installed tcltls from AUR ( Arch User’s Repo) which builds it using source code from:
https://core.tcl.tk/tcltls/uv/tcltls-1.7.22.tar.gz

As Flightaware recommends tcltls-rebuild, I thought this may be the cause, so I build tcltls from source code at Flightaware using following PKGBUILD script, but this did not solve the problem of missing buttons.

Any ideas @obj / @eric1tran how to make the missing buttons appear on “My ADSB” page?

# Maintainer: abcd567
# Contributor: abcd567
pkgname=tcltls
pkgver=1.7.16
pkgrel=1
pkgdesc="OpenSSL extension to Tcl - Rebuilt by Flightaware"
arch=('x86_64' 'armv6h' 'armv7h' 'arm' 'aarch64')

url="https://github.com/flightaware/tcltls-rebuild"
license=('GPL')
provides=('tls')
replaces=('tls')
depends=('tcl' 'openssl' 'awk')

source=('tcltls-rebuild::git+git://github.com/flightaware/tcltls-rebuild.git')
md5sums=('SKIP')
build() {
  cd ${srcdir}/tcltls-rebuild
  ./prepare-build.sh buster
  cd package-buster
  ./configure --prefix=/usr --with-ssl-dir=/usr
  make
}

package() {
  cd ${srcdir}/tcltls-rebuild/package-buster
  make DESTDIR=${pkgdir} install
}

 

This is result of querry

[alarm@alarmpi ~]$ pacman -Qi tcltls 

Name            : tcltls
Version         : 1.7.16-1
Description     : OpenSSL extension to Tcl - Rebuilt by Flightaware
Architecture    : armv7h
URL             : https://github.com/flightaware/tcltls-rebuild
Licenses        : GPL
Groups          : None
Provides        : tls
Depends On      : tcl  openssl  awk
Optional Deps   : None
Required By     : piaware
Optional For    : None
Conflicts With  : None
Replaces        : tls
Installed Size  : 50.05 KiB
Packager        : Unknown Packager
Build Date      : Mon Feb 15 05:55:24 2021
Install Date    : Mon Feb 15 06:02:56 2021
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

It appears this would be more related to the FA server-side aspects instead of any build info/options on your alarmpi.
Screenclip from my “My Stats” page and mouse-over. This leads me to assume FA server-side info has pre-defined data they expect faup1090 and use to build out those divs (the buttons/mouse-over text etc). Your alarmpi falls outside all their server-side options.
image

Again… all speculation on my part but maybe @obj could confirm?
To test maybe you can find the info in the public repos for what data the local faup1090/fa-mlat-client code queries and sends to FA and manually force your alarmpi to send those.