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

I have built piaware package for Alarmpi OS as follows:

  • piaware - source code from Github/Flightaware
  • faup1090 - source code at Github/Flightaware
  • fa-mlat-client - source code at Github/mutability
  • tcltls-rebuild - source code at Github/Flightaware
  • dump1090-fa - source code at Github/Flightaware

I feel that the package built from Github/Flightaware/piaware_builder has something extra over the package I built. I tried to build piaware package for Alarmpi using piaware_builder, but it failed due to missing Makefile. I am sure if I could build the piaware package using piaware_builder, the missing buttons issue will go away.

I dont have depth of programming required to find the cause. It will be great if @obj can shed some light.

I don’t TCL but I would suspect the data sent to FA for their server-side matching/rendering comes from info collected during login which appears to be here:
https://github.com/flightaware/piaware/blob/master/programs/piaware/login.tcl

Again, there’s no clear/obvious tie for what FA server-side code is looking for or comparing to but looks like you could hardcode some data in that file instead of letting it query your alarmpi and get the buttons back :wink:
And back to not doing TCL… you may have to recompile?

1 Like

Missing buttons happen with both AlarmPi (Stn 76000) and Arch Linux amd64 (Stn 114692)

With Stn 76000 (RPi Model 4), I normally use Raspbian 64-bit OS. I have written Alarmpi 32-bit OS on one spare microSD card, and Alarmpi 64-bit OS on anothe spare microSD card. For trial and testing, I swap the Raspbian microSD card with AlarmPi microSD card, andd after tests, slip out the AlarmPi microSD card and slip in the Raspbian miroSD card.

I have now fired up Arch Linux arm64 and here is the log which shows handshake/login with Flightaware adept servers is OK.

 

[abcd@archlinux ~]$ journalctl -b -u piaware 

-- Journal begins at Mon 2021-02-08 13:04:53 EST, ends at Tue 2021-02-16 00:52:35 EST. --
Feb 16 00:22:29 archlinux systemd[1]: Started FlightAware ADS-B uploader.
Feb 16 00:22:43 archlinux piaware[362]: creating pidfile /run/piaware/piaware.pid
Feb 16 00:22:43 archlinux piaware[362]: ****************************************************
Feb 16 00:22:43 archlinux piaware[362]: piaware version 4.0 is running, process ID 362
Feb 16 00:22:43 archlinux piaware[362]: your system info is: Linux archlinux 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 GNU/Linux
Feb 16 00:22:45 archlinux piaware[362]: Connecting to FlightAware adept server at piaware.flightaware.com/1200
Feb 16 00:22:45 archlinux piaware[362]: Connection with adept server at piaware.flightaware.com/1200 established
Feb 16 00:22:45 archlinux piaware[362]: TLS handshake with adept server at piaware.flightaware.com/1200 completed
Feb 16 00:22:45 archlinux piaware[362]: FlightAware server certificate validated
Feb 16 00:22:45 archlinux piaware[362]: encrypted session established with FlightAware
Feb 16 00:22:46 archlinux sudo[519]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Feb 16 00:22:47 archlinux piaware[362]: ADS-B data program 'dump1090-fa' is listening on port 30005, so far so good
Feb 16 00:22:47 archlinux piaware[362]: Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 4>
Feb 16 00:22:47 archlinux piaware[362]: Started faup1090 (pid 550) to connect to dump1090-fa
Feb 16 00:22:47 archlinux piaware[362]: UAT support disabled by local configuration setting: uat-receiver-type
Feb 16 00:22:52 archlinux piaware[362]: Lost connection to adept server at piaware.flightaware.com/1200: server closed connection
Feb 16 00:22:52 archlinux piaware[362]: reconnecting in 5 seconds...
Feb 16 00:22:57 archlinux piaware[362]: Connecting to FlightAware adept server at piaware.flightaware.com/1200
Feb 16 00:22:57 archlinux piaware[362]: Connection with adept server at piaware.flightaware.com/1200 established
Feb 16 00:22:57 archlinux piaware[362]: TLS handshake with adept server at piaware.flightaware.com/1200 completed
Feb 16 00:22:57 archlinux piaware[362]: FlightAware server certificate validated
Feb 16 00:22:57 archlinux piaware[362]: encrypted session established with FlightAware
Feb 16 00:22:57 archlinux piaware[362]: adept reported location: 43.xxxxx, -79.xxxxx, xxxft AMSL
Feb 16 00:22:57 archlinux piaware[362]: logged in to FlightAware as user abcd567
Feb 16 00:22:57 archlinux piaware[362]: my feeder ID is b600xxxx-xxxx-xxxx-xxxx-xxxxxxxx52c1
Feb 16 00:22:57 archlinux piaware[362]: site statistics URL: https://flightaware.com/adsb/stats/user/abcd567#stats-114692
Feb 16 00:22:57 archlinux piaware[362]: multilateration data requested
Feb 16 00:22:57 archlinux sudo[707]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Feb 16 00:22:57 archlinux sudo[707]:  piaware : PWD=/ ; USER=root ; COMMAND=/bin/netstat --program --tcp --wide --all --numeric
Feb 16 00:22:57 archlinux piaware[362]: Starting multilateration client: /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --input-ty>
Feb 16 00:22:57 archlinux sudo[707]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=962)
Feb 16 00:22:57 archlinux sudo[707]: pam_unix(sudo:session): session closed for user root
Feb 16 00:22:58 archlinux piaware[362]: mlat-client(716): fa-mlat-client 0.2.11 starting up
Feb 16 00:22:58 archlinux piaware[362]: mlat-client(716): Using UDP transport to 2600:c13:1002:4::232 port 11708
Feb 16 00:22:58 archlinux piaware[362]: mlat-client(716): Listening for Beast-format results connection on port 30105
Feb 16 00:22:58 archlinux piaware[362]: mlat-client(716): Listening for Extended Basestation-format results connection on port 30106
Feb 16 00:22:58 archlinux piaware[362]: mlat-client(716): Route MTU changed to 1500
Feb 16 00:22:58 archlinux piaware[362]: mlat-client(716): Input connected to localhost:30005
Feb 16 00:22:58 archlinux piaware[362]: mlat-client(716): Input format changed to BEAST, 12MHz clock
Feb 16 00:22:59 archlinux piaware[362]: mlat-client(716): Beast-format results connection with ::1:30104: connection established
Feb 16 00:23:18 archlinux piaware[362]: 0 msgs recv'd from dump1090-fa; 0 msgs sent to FlightAware
Feb 16 00:23:45 archlinux piaware[362]: piaware received a message from dump1090-fa!
Feb 16 00:27:16 archlinux piaware[362]: mlat-client(716): Disconnecting from localhost:30005: No data (not even keepalives) received for 150 seconds
Feb 16 00:27:16 archlinux piaware[362]: mlat-client(716): Input connected to localhost:30005
Feb 16 00:27:16 archlinux piaware[362]: mlat-client(716): Input format changed to BEAST, 12MHz clock
Feb 16 00:28:18 archlinux piaware[362]: 3 msgs recv'd from dump1090-fa (3 in last 5m); 3 msgs sent to FlightAware
Feb 16 00:30:29 archlinux piaware[362]: mlat-client(716): Disconnecting from localhost:30005: No data (not even keepalives) received for 150 seconds
Feb 16 00:30:29 archlinux piaware[362]: mlat-client(716): Input connected to localhost:30005
Feb 16 00:30:29 archlinux piaware[362]: mlat-client(716): Input format changed to BEAST, 12MHz clock
Feb 16 00:33:18 archlinux piaware[362]: 3 msgs recv'd from dump1090-fa (0 in last 5m); 3 msgs sent to FlightAware
Feb 16 00:33:28 archlinux piaware[362]: mlat-client(716): Disconnecting from localhost:30005: No data (not even keepalives) received for 150 seconds
Feb 16 00:33:28 archlinux piaware[362]: mlat-client(716): Input connected to localhost:30005
Feb 16 00:33:28 archlinux piaware[362]: mlat-client(716): Input format changed to BEAST, 12MHz clock
Feb 16 00:35:58 archlinux piaware[362]: mlat-client(716): Disconnecting from localhost:30005: No data (not even keepalives) received for 150 seconds
Feb 16 00:35:58 archlinux piaware[362]: mlat-client(716): Input connected to localhost:30005
Feb 16 00:35:58 archlinux piaware[362]: mlat-client(716): Input format changed to BEAST, 12MHz clock
Feb 16 00:37:58 archlinux piaware[362]: mlat-client(716): Receiver status: connected
Feb 16 00:37:58 archlinux piaware[362]: mlat-client(716): Server status:   not synchronized with any nearby receivers
Feb 16 00:37:58 archlinux piaware[362]: mlat-client(716): Receiver:    0.0 msg/s received        0.0 msg/s processed (83%)
Feb 16 00:37:58 archlinux piaware[362]: mlat-client(716): Server:      0.0 kB/s from server    0.0kB/s TCP to server     0.0kB/s UDP to server
Feb 16 00:37:58 archlinux piaware[362]: mlat-client(716): Aircraft: 0 of 0 Mode S, 0 of 0 ADS-B used
Feb 16 00:38:18 archlinux piaware[362]: 3 msgs recv'd from dump1090-fa (0 in last 5m); 3 msgs sent to FlightAware
Feb 16 00:38:29 archlinux piaware[362]: mlat-client(716): Disconnecting from localhost:30005: No data (not even keepalives) received for 150 seconds
Feb 16 00:38:29 archlinux piaware[362]: mlat-client(716): Input connected to localhost:30005
Feb 16 00:38:29 archlinux piaware[362]: mlat-client(716): Input format changed to BEAST, 12MHz clock
Feb 16 00:40:59 archlinux piaware[362]: mlat-client(716): Disconnecting from localhost:30005: No data (not even keepalives) received for 150 seconds
Feb 16 00:40:59 archlinux piaware[362]: mlat-client(716): Input connected to localhost:30005
Feb 16 00:40:59 archlinux piaware[362]: mlat-client(716): Input format changed to BEAST, 12MHz clock
Feb 16 00:43:18 archlinux piaware[362]: 3 msgs recv'd from dump1090-fa (0 in last 5m); 3 msgs sent to FlightAware
Feb 16 00:44:38 archlinux piaware[362]: piaware has successfully sent several msgs to FlightAware!
Feb 16 00:48:18 archlinux piaware[362]: 23 msgs recv'd from dump1090-fa (20 in last 5m); 23 msgs sent to FlightAware
Feb 16 00:52:58 archlinux piaware[362]: mlat-client(716): Receiver status: connected
Feb 16 00:52:58 archlinux piaware[362]: mlat-client(716): Server status:   not synchronized with any nearby receivers
Feb 16 00:52:58 archlinux piaware[362]: mlat-client(716): Receiver:    0.4 msg/s received        0.3 msg/s processed (64%)
Feb 16 00:52:58 archlinux piaware[362]: mlat-client(716): Server:      0.0 kB/s from server    0.0kB/s TCP to server     0.0kB/s UDP to server
Feb 16 00:52:58 archlinux piaware[362]: mlat-client(716): Aircraft: 0 of 0 Mode S, 1 of 1 ADS-B used
Feb 16 00:53:18 archlinux piaware[362]: 39 msgs recv'd from dump1090-fa (16 in last 5m); 39 msgs sent to FlightAware
Feb 16 00:58:18 archlinux piaware[362]: 55 msgs recv'd from dump1090-fa (16 in last 5m); 55 msgs sent to FlightAware

EDIT:

Noted this line in above logs:

Feb 16 00:22:57 archlinux sudo[707]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.

Checked:

[abcd@archlinux ~]$ pacman -Q systemd-homed
error: package 'systemd-homed' was not found

EDIT-2:

[abcd@archlinux ~]$ pacman -Qs pam
local/pam 1.5.1-1
    PAM (Pluggable Authentication Modules) library
local/pambase 20200721.1-2
    Base PAM configuration for services
local/shadow 4.8.1-4
    Password and account management tool suite with support for shadow files and PAM

Was getting this error in Piaware logs:
Feb 16 00:22:57 archlinux sudo[707]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.

Did this:
sudo systemctl enable systemd-homed.service
sudo systemctl start systemd-homed.service

Now getting this in Piaware logs:
Feb 16 01:27:57 archlinux sudo[21707]: pam_systemd_home(sudo:account): Not a user managed by systemd-homed: No home for user piaware known

 

Checked “My ADSB” page for Stn 114692. The 3 buttons still missing :slightly_frowning_face:

 

The health buttons are suppressed if the feeder image type is not recognized, as we don’t know what you’re running and whether the health status makes sense or not.

1 Like

Thanks Oliver for solving the riddle I was breaking my head with.
I thought there was something wrong/missing with my installation which was causing this. :slightly_smiling_face:

@obj : I cannot make out why this is happening. Is there something wrong or deficient in my installation? (Arch Lnux amd64 on Oracle VM / Win10 PC)

Feb 20 18:30:04 archlinux piaware[311]: mlat-client(425): Server status: not synchronized with any nearby receivers

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

FULL LOG

[abcd@archlinux ~]$ journalctl -e -u piaware

Feb 20 18:14:10 archlinux piaware[311]: ADS-B data program 'dump1090-fa' is listening on port 30005, so far so good
Feb 20 18:14:10 archlinux piaware[311]: Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 43.>
Feb 20 18:14:10 archlinux piaware[311]: Started faup1090 (pid 1045) to connect to dump1090-fa
Feb 20 18:14:10 archlinux piaware[311]: mlat-client(425): Beast-format results connection with 127.0.0.1:30104: connection established
Feb 20 18:15:04 archlinux piaware[311]: mlat-client(425): Receiver status: connected
Feb 20 18:15:04 archlinux piaware[311]: mlat-client(425): Server status:   not synchronized with any nearby receivers
Feb 20 18:15:04 archlinux piaware[311]: mlat-client(425): Receiver:    7.4 msg/s received        3.6 msg/s processed (49%)
Feb 20 18:15:04 archlinux piaware[311]: mlat-client(425): Server:      0.0 kB/s from server    0.0kB/s TCP to server     0.0kB/s UDP to server
Feb 20 18:15:04 archlinux piaware[311]: mlat-client(425): Aircraft: 8 of 10 Mode S, 9 of 12 ADS-B used
Feb 20 18:15:33 archlinux piaware[311]: 1552 msgs recv'd from dump1090-fa (132 in last 5m); 1552 msgs sent to FlightAware
Feb 20 18:20:33 archlinux piaware[311]: 1944 msgs recv'd from dump1090-fa (392 in last 5m); 1944 msgs sent to FlightAware
Feb 20 18:25:33 archlinux piaware[311]: 2282 msgs recv'd from dump1090-fa (338 in last 5m); 2282 msgs sent to FlightAware
Feb 20 18:30:04 archlinux piaware[311]: mlat-client(425): Receiver status: connected
Feb 20 18:30:04 archlinux piaware[311]: mlat-client(425): Server status:   not synchronized with any nearby receivers
Feb 20 18:30:04 archlinux piaware[311]: mlat-client(425): Receiver:   48.6 msg/s received       23.9 msg/s processed (49%)
Feb 20 18:30:04 archlinux piaware[311]: mlat-client(425): Server:      0.0 kB/s from server    0.0kB/s TCP to server     0.3kB/s UDP to server
Feb 20 18:30:04 archlinux piaware[311]: mlat-client(425): Aircraft: 7 of 9 Mode S, 11 of 15 ADS-B used
Feb 20 18:30:33 archlinux piaware[311]: 2617 msgs recv'd from dump1090-fa (335 in last 5m); 2617 msgs sent to FlightAware

 

EDIT:

Found the reason. It is due to dongle pass-through from PC to VM

Did this to find out:

[abcd@archlinux ~]$ sudo nano /etc/default/dump1090-fa 
## Added --net-only in NET_OPTIONS
## Restarted dump1090-fa
[abcd@archlinux ~]$ sudo systemctl restart dump1090-fa 

## Pulled data from RPi 
[abcd@archlinux ~]$ socat -u tcp:10.0.0.22:30005 tcp:127.0.0.1:30004 &

## Checked log, found this line
Feb 20 19:00:05 archlinux piaware[311]: mlat-client(425): Server status: synchronized with 196 nearby receivers

 

LOGS

[abcd@archlinux ~]$ journalctl -e -u piaware

Feb 20 18:51:03 archlinux piaware[311]: ADS-B data program 'dump1090-fa' is listening on port 30005, so far so good
Feb 20 18:51:03 archlinux piaware[311]: Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 43.>
Feb 20 18:51:03 archlinux piaware[311]: Started faup1090 (pid 1155) to connect to dump1090-fa
Feb 20 18:51:31 archlinux piaware[311]: mlat-client(425): Input connected to localhost:30005
Feb 20 18:51:31 archlinux piaware[311]: mlat-client(425): Input format changed to BEAST, 12MHz clock
Feb 20 18:51:31 archlinux piaware[311]: mlat-client(425): Beast-format results connection with ::1:30104: connection established
Feb 20 18:55:33 archlinux piaware[311]: 4850 msgs recv'd from dump1090-fa (650 in last 5m); 4850 msgs sent to FlightAware
Feb 20 19:00:05 archlinux piaware[311]: mlat-client(425): Receiver status: connected
Feb 20 19:00:05 archlinux piaware[311]: mlat-client(425): Server status:   synchronized with 196 nearby receivers
Feb 20 19:00:05 archlinux piaware[311]: mlat-client(425): Receiver:   78.5 msg/s received       35.8 msg/s processed (46%)
Feb 20 19:00:05 archlinux piaware[311]: mlat-client(425): Server:      0.0 kB/s from server    0.0kB/s TCP to server     0.4kB/s UDP to server
Feb 20 19:00:05 archlinux piaware[311]: mlat-client(425): Aircraft: 6 of 11 Mode S, 13 of 16 ADS-B used
Feb 20 19:00:33 archlinux piaware[311]: 5501 msgs recv'd from dump1090-fa (651 in last 5m); 5501 msgs sent to FlightAware

Would not surprise me. Some VMs drop so much sample data that the mlat server can’t even begin the synchronization process.

To match up messages from two receivers, the mlat server looks for a pair of ADS-B position messages where both messages were received on both receivers with identical contents and approximately the same time interval between messages. Normally, this time interval will be very similar, with at most a few microseconds difference due to differences in receiver location and clock frequency. But if the VM is regularly dropping lots of data, this affects the interval dramatically and pushes it outside the time window that the server considers a match. And you get a “no synchronized receivers” status.

In contrast if you have a clock that’s only a little unstable (or only intermittently dropping samples), the interval will be close enough most of the time for synchronization to be attempted, and then the mlat server notices the clock instability and gives you a “clock unstable” status.

2 Likes

@obj
@eric1tran

The dump1090-fa version 7.1 fails to build on Arch Linux Arm on RPI Model 4.

make: cc: No such file or directory
make: *** [Makefile:203: dump1090.o] Error 127

FULL DETAIL

[pi@alarmpi ~]$ uname -a
Linux alarmpi 5.15.18-6-rpi-ARCH #1 SMP Sun Feb 6 20:56:40 UTC 2022 armv7l GNU/Linux

[pi@alarmpi ~]$ cat /etc/os-release
NAME="Arch Linux ARM"
PRETTY_NAME="Arch Linux ARM"
ID=archarm
ID_LIKE=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinuxarm.org/"
DOCUMENTATION_URL="https://archlinuxarm.org/wiki"
SUPPORT_URL="https://archlinuxarm.org/forum"
BUG_REPORT_URL="https://github.com/archlinuxarm/PKGBUILDs/issues"
LOGO=archlinux-logo

 

[pi@alarmpi ~]$ sudo pacman -Sy --needed git binutils make fakeroot pkgconf

[pi@alarmpi ~]$ git clone https://github.com/flightaware/dump1090
[pi@alarmpi ~]$ cd dump1090
[pi@alarmpi dump1090]$ make
Building with:
  Version string:  unknown
  Architecture:    armv7l
  DSP mix:         arm
  RTLSDR support:  yes
  BladeRF support: yes
  HackRF support:  no
  LimeSDR support: no
cc  -I. -DMODES_DUMP1090_VERSION=\"unknown\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DSTARCH_MIX_ARM -O3 -g -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -W -I/usr/include/ -I/usr/include/libusb-1.0 -I/usr/include/  -c dump1090.c -o dump1090.o
make: cc: No such file or directory
make: *** [Makefile:203: dump1090.o] Error 127
[pi@alarmpi dump1090]$

 

 

You don’t have a compiler installed (or you need to set CC to point to the correct compiler)

 

Thank you Oliver. Installing package gcc solved the problem :slightly_smiling_face:

 

[pi@alarmpi ~]$ sudo pacman -Sy gcc

[pi@alarmpi ~]$ cd dump1090

[pi@alarmpi dump1090]$ VERS=$(git describe --tags | sed 's/-.*//')              

[pi@alarmpi dump1090]$ make DUMP1090_VERSION=${VERS}

Building with:
  Version string:  v7.1
  Architecture:    armv7l
  DSP mix:         arm
  RTLSDR support:  yes
  BladeRF support: yes
  HackRF support:  no
  LimeSDR support: no
cc  -I. -DMODES_DUMP1090_VERSION=\"v7.1\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DSTARCH_MIX_ARM -O3 -g -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -W -I/usr/include/ -I/usr/include/libusb-1.0 -I/usr/include/  -c dump1090.c -o dump1090.o
... ... ...
... ... ...
  -c -DSTARCH_MIX_ARM dsp/generated/benchmark.c -o dsp/generated/benchmark.o
cc -g -o starch-benchmark cpu.o dsp/helpers/tables.o cpu_features/src/filesystem.o cpu_features/src/stack_line_reader.o cpu_features/src/string_view.o cpu_features/src/hwcaps.o cpu_features/src/cpuinfo_arm.o dsp/generated/flavor.armv7a_neon_vfpv4.o dsp/generated/flavor.generic.o dsp/generated/dispatcher.o dsp/generated/benchmark.o  -lpthread -lm -lrt

 

[pi@alarmpi dump1090]$ ./dump1090
Wed Feb  9 10:43:12 2022 UTC  dump1090-fa v7.1 starting up.
rtlsdr: using device #0: Generic RTL2832U OEM (Realtek, RTL2838UHIDIR, SN 00001090)
Found Rafael Micro R820T/2 tuner
rtlsdr: tuner gain set to 49.6 dB (gain step 28)
Allocating 4 zero-copy buffers
*5dc01b6c84b3e7;
CRC: 000000
RSSI: -1.9 dBFS
Score: 17 (DF11_ACQ_UNKNOWN)
Time: 38475.75us
DF:11 AA:C01B6C IID:0 CA:5
 All Call Reply (reliable)
  ICAO Address:  C01B6C (Mode S / ADS-B)
  Air/Ground:    airborne

*5dc01b6c84b3e7;
CRC: 000000
RSSI: -1.9 dBFS
Score: 23 (DF11_ACQ_KNOWN)
Time: 132547.58us
DF:11 AA:C01B6C IID:0 CA:5
 All Call Reply (reliable)
  ICAO Address:  C01B6C (Mode S / ADS-B)
  Air/Ground:    airborne

*5dc01b6c84b3e2;
CRC: 000005
RSSI: -1.9 dBFS
Score: 20 (DF11_IID_KNOWN)
Time: 477050.33us
DF:11 AA:C01B6C IID:5 CA:5
 All Call Reply
  ICAO Address:  C01B6C (Mode S / ADS-B)
  Air/Ground:    airborne

Dump1090-fa ver 7.1 and Piaware ver 7.1 successfully built and installed on 32-bit (armv7) & 64-bit (aarch64) Alarmpi (Arch Linux Arm for Pi) on RPI Model 4

Howto build & Install on Arch Linux AMD64 / x86_64 & Arch Linux Arm (armv7 & aarch64) for RPi:

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

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

 

[pi@alarmpi ~]$ 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 Wed 2022-02-09 11:31:33 UTC; 2min 4s ago
       Docs: https://flightaware.com/adsb/piaware/
   Main PID: 352 (dump1090-fa)
      Tasks: 3 (limit: 1563)
        CPU: 30.512s
     CGroup: /system.slice/dump1090-fa.service
             `-352 /usr/bin/dump1090-fa --quiet --device-type rtlsdr --gain 60 --adaptive-range --fix --lat 43.5xxx --lon -79.6xxx --max-range >

Feb 09 11:32:04 alarmpi dump1090-fa[352]: adaptive: available dynamic range (20.8dB) < required dynamic range (30.0dB), continuing downwards sc>
Feb 09 11:32:04 alarmpi dump1090-fa[352]: adaptive: changing gain from 48.0dB (step 27) to 44.5dB (step 26) because: probing dynamic range gain>
Feb 09 11:32:04 alarmpi dump1090-fa[352]: rtlsdr: tuner gain set to 44.5 dB (gain step 26)
Feb 09 11:32:14 alarmpi dump1090-fa[352]: adaptive: available dynamic range (22.0dB) < required dynamic range (30.0dB), continuing downwards sc>
Feb 09 11:32:14 alarmpi dump1090-fa[352]: adaptive: changing gain from 44.5dB (step 26) to 43.9dB (step 25) because: probing dynamic range gain>
Feb 09 11:32:14 alarmpi dump1090-fa[352]: rtlsdr: tuner gain set to 43.9 dB (gain step 25)
Feb 09 11:32:24 alarmpi dump1090-fa[352]: adaptive: available dynamic range (26.8dB) < required dynamic range (30.0dB), continuing downwards sc>
Feb 09 11:32:24 alarmpi dump1090-fa[352]: adaptive: changing gain from 43.9dB (step 25) to 43.4dB (step 24) because: probing dynamic range gain>
Feb 09 11:32:24 alarmpi dump1090-fa[352]: rtlsdr: tuner gain set to 43.4 dB (gain step 24)
Feb 09 11:32:34 alarmpi dump1090-fa[352]: adaptive: available dynamic range (35.6dB) >= required dynamic range (30.0dB), stopping downwards sca>
[pi@alarmpi ~]$

 

 

[pi@alarmpi ~]$ 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 Wed 2022-02-09 11:33:32 UTC; 4min 46s ago
       Docs: https://flightaware.com/adsb/piaware/
   Main PID: 505 (piaware)
      Tasks: 4 (limit: 1563)
        CPU: 3.941s
     CGroup: /system.slice/piaware.service
             |-505 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
             |-518 /usr/bin/python3 /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --input-type dump1090 --results bea>
             `-521 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 43.5xx --lon -79.6xx

Feb 09 11:33:36 alarmpi piaware[505]: mlat-client(518): Using UDP transport to 2620:13d:c000:11::197 port 15291
Feb 09 11:33:36 alarmpi piaware[505]: mlat-client(518): Listening for Beast-format results connection on port 30105
Feb 09 11:33:36 alarmpi piaware[505]: mlat-client(518): Listening for Extended Basestation-format results connection on port 30106
Feb 09 11:33:36 alarmpi piaware[505]: mlat-client(518): Route MTU changed to 1500
Feb 09 11:33:36 alarmpi piaware[505]: mlat-client(518): Input connected to localhost:30005
Feb 09 11:33:36 alarmpi piaware[505]: mlat-client(518): Input format changed to BEAST, 12MHz clock
Feb 09 11:33:37 alarmpi piaware[505]: mlat-client(518): Beast-format results connection with ::1:30104: connection established
Feb 09 11:33:37 alarmpi piaware[505]: piaware received a message from dump1090-fa!
Feb 09 11:33:38 alarmpi piaware[505]: piaware has successfully sent several msgs to FlightAware!
Feb 09 11:34:08 alarmpi piaware[505]: 61 msgs recv'd from dump1090-fa; 61 msgs sent to FlightAware
[pi@alarmpi ~]$

Archlinux-adsb

Automated scripts for installation of following on Arch Linux AMD64, 2021 / 2022

  • Flightaware - dump1090-fa
  • Flightaware - piaware
  • Flightradar24 - fr24feed
  • Planefinder - pfclient

Alarmpi-adsb

Automated scripts for installation of following on Arch Linux Armv7 and Aarch64 on RPi

  • Flightaware - dump1090-fa
  • Flightaware - piaware
  • Flightradar24 - fr24feed
  • Planefinder - pfclient

readsb-archlinux

Automated scripts for installation of readsb on Arch Linux AMD64 and Arch Linux ARM for RPI

Uses source-code from @wiedehopf’s site:
https://github.com/wiedehopf/readsb
 

Piaware ver 9.0.1, Built on Arch Linux amd64

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

got EOF from multilateration client
fa-mlat-client exited with EXIT 1

[abcd@archlinux-2023-11 ~]$ sudo journalctl -u piaware -n 15

Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805): Traceback (most recent call last):
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):   File "/usr/lib/piaware/helpers/fa-mlat-client", line 33, in <module>
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):     sys.exit(load_entry_point('MlatClient==0.2.13', 'console_scripts', 'fa-mlat-client')())
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):   File "/usr/lib/piaware/helpers/fa-mlat-client", line 22, in importlib_load_entry_point
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):     for entry_point in distribution(dist_name).entry_points
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):                        ^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):   File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):     return Distribution.from_name(distribution_name)
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):   File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805):     raise PackageNotFoundError(name)
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: mlat-client(31805): importlib.metadata.PackageNotFoundError: No package metadata was found for MlatClient
Nov 23 23:11:37 archlinux-2023-11 piaware[29229]: got EOF from multilateration client
Nov 23 23:11:38 archlinux-2023-11 piaware[29229]: fa-mlat-client exited with EXIT 1
Nov 23 23:19:00 archlinux-2023-11 piaware[29229]: 1318 msgs recv'd from dump1090-fa (519 in last 5m); 1318 msgs sent to FlightAware
Nov 23 23:24:00 archlinux-2023-11 piaware[29229]: 1724 msgs recv'd from dump1090-fa (406 in last 5m); 1724 msgs sent to FlightAware
Nov 23 23:29:00 archlinux-2023-11 piaware[29229]: 1955 msgs recv'd from dump1090-fa (231 in last 5m); 1955 msgs sent to FlightAware

 

EDIT:

Built by following commands

piaware:

git clone https://github.com/abcd567a/archlinux-piaware && bash archlinux-piaware/build-piaware.sh  

 

dump1090-fa:

git clone https://github.com/abcd567a/archlinux-dump1090-fa && bash archlinux-dump1090-fa/build-dump1090-fa.sh  

File PKGBUILD

source=('piaware::git+https://github.com/flightaware/piaware'
        'faup1090::git+https://github.com/flightaware/dump1090'
        'fa-mlat-client::git+https://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
  git fetch --all
  git reset --hard origin/master
  make faup1090
  install -Dm755 ${srcdir}/faup1090/faup1090 ${pkgdir}/usr/lib/piaware/helpers/faup1090

## Build fa-mlat-client
  cd ${srcdir}/fa-mlat-client
  git fetch --all
  git reset --hard origin/master
  ./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
  git fetch --all
  git reset --hard origin/master
  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
}

File build-piaware.sh

#!/bin/bash
BUILD_FOLDER=${PWD}
sudo pacman --needed -Sy fakeroot binutils git pkgconf autoconf make gcc glibc patch which
sudo pacman --needed -Sy tcl python python-setuptools python-pip tk net-tools

cd ${BUILD_FOLDER}
git clone https://aur.archlinux.org/tcllib
cd tcllib
makepkg -si

cd ${BUILD_FOLDER}
git clone https://aur.archlinux.org/tclx
cd tclx
makepkg -si

cd ${BUILD_FOLDER}
git clone https://aur.archlinux.org/tcltls
cd tcltls
makepkg -si

cd ${BUILD_FOLDER}
git clone https://aur.archlinux.org/tcllauncher
cd tcllauncher
makepkg -si

cd ${BUILD_FOLDER}/archlinux-piaware
makepkg -si 


You probably want to read Python package guidelines - ArchWiki as a starting point. directly invoking setup.py is probably not the way to go. Using python-build / python-installer should be OK with mlat-client, it has PEP517 metadata (and piaware_builder uses python-build itself: https://github.com/flightaware/piaware_builder/blob/0d9a4cefef9f0f27a53148cc43ba86fa834ff7cd/bookworm/rules#L86)

1 Like

Thanks Oliver for your valuable guidance.
I will read the Arch Wiki for python package, and try to use python-build / python-installer instead of ./setup.py install.

While ./setup.py install was running, I got the following warning:

 

Click on Screenshot to See Larger Size

 

2 Likes

Thanks @obj.
With your guidance :+1:, could successfully build mlat-client, :slightly_smiling_face:

In file build-piaware.sh added following

sudo pacman -Sy python-build  python-installer  

File PKGBUILD, modified

 ## Build fa-mlat-client
  cd ${srcdir}/fa-mlat-client
  git fetch --all
  git reset --hard origin/master
  
  ## ./setup.py install --prefix=${pkgdir}/usr
  python -m build --wheel --no-isolation
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm755 ${pkgdir}/usr/bin/fa-mlat-client  ${pkgdir}/usr/lib/piaware/helpers/fa-mlat-client
  rm -rf ${pkgdir}/usr/bin/

 

Got following Screenshot:
With setup.py install, the green line did NOT show up, but with python -m build and python -m installer, it showed up.

image

 

Click on Screenshot to See Larger Size

 

 

2 Likes

Installing Flightradar24 Feeder on Arch Linux Arm on RPi (Alarm)

Alarm OS = Arch Linux arm for RPi

Created the script below, to install FlightRadar24 on Alarmpi OS installed on RPi model 4

 

As the FlightRadar24’s arm binary is packaged for debian only (.deb package), to install it on Arch Linux, I have created a bash script which does following:

(1) Downloads the fr24feed .deb package
(2) extracts contents by command bsdtar -xvpf. It gives following 3 files
control.tar.gz data.tar.gz debian-binary
(3) further extracts file data.tar.gz by command bsdtar -xvpf . This gave the fr24feed binary and all other files required to install it as a systemd service.
(4) Uses install -Dm644 and install -Dm755 commands to install the extracted binary and other files to appropriate locations.
(5) Creates user fr24 to run fr24feed.service, and enables fr24feed.service

 

Script install-fr24feed.sh :

#!/bin/bash

set -e
trap 'echo "[ERROR] Error in line $LINENO when executing: $BASH_COMMAND"' ERR

echo  -e "\e[33mEnter the current version of fr24feed (For example 1.0.44-0 ) \e[39m"
read VERSION 
echo ""
echo  -e "\e[33mEnter the Architecture ( armhf OR arm64 ) \e[39m"
read ARCH
echo ""
BUILD_DIR=/usr/share/fr24-builder
mkdir ${BUILD_DIR}
wget -O ${BUILD_DIR}/fr24feed_${VERSION}_${ARCH}.deb http://repo-feed.flightradar24.com/rpi_binaries/fr24feed_${VERSION}_${ARCH}.deb 

EXT_DIR=${BUILD_DIR}/extracted
mkdir ${EXT_DIR}
bsdtar -xvpf ${BUILD_DIR}/fr24feed_${VERSION}_${ARCH}.deb -C ${BUILD_DIR}/extracted

PKG_DIR=${BUILD_DIR}/pkg
mkdir ${PKG_DIR}
bsdtar -xvpf ${EXT_DIR}/data.tar.gz -C ${PKG_DIR}

install -Dm755  ${PKG_DIR}/usr/bin/fr24feed  /usr/bin/fr24feed
install -Dm755  ${PKG_DIR}/usr/bin/fr24feed-status  /usr/bin/fr24feed-status
install -Dm644  ${PKG_DIR}/etc/fr24feed.ini /etc/fr24feed.ini
install -Dm644  ${PKG_DIR}/etc/systemd/system/fr24feed.service  /lib/systemd/system/fr24feed.service
sed -i '/install_dump1090.sh/d' /lib/systemd/system/fr24feed.service
install -Dm755  ${PKG_DIR}/usr/lib/fr24/create_missing_directories.sh /usr/lib/fr24/create_missing_directories.sh  
install -Dm755  ${PKG_DIR}/usr/lib/fr24/unregister_kernel_modules.sh /usr/lib/fr24/unregister_kernel_modules.sh

if [[ -d /lib/lsb ]];
then
echo -e "\e[32mDirectory /lib/lsb existing, not creating again... \e[39m"
else
mkdir /lib/lsb
fi
wget -O /lib/lsb/init-functions https://github.com/abcd567a/Archlinux-adsb/raw/master/status/lsb/init-functions

if [[ ! `id -u fr24` ]]; then
echo "Creating user fr24 to run fr24feed"
useradd --system fr24
else
echo "User fr24 already exists. Not creating it again"
fi

systemctl enable fr24feed

echo ""
echo "INSTALL:ATION COMPLETED"
echo "PLEASE COMPLETE SIGNUP"
echo ""
fr24feed --signup

 

 

 

 

 

 

Piaware installed on Alarm Pi by following bash script:

bash -c "$(wget -O - https://github.com/abcd567a/archlinux-piaware/raw/master/piaware-builder.sh)"  

 

 

 

dump1090-fa installed on Alarm Pi by following bash script:

bash -c "$(wget -O - https://github.com/abcd567a/archlinux-dump1090-fa/raw/master/dump1090-fa-builder.sh)"  

 

 

 

 

archlinux-piaware

archlinux-dump1090-fa

archlinux-fr24feed

archlinux-rbfeeder

archlinux-aiscatcher

archlinux-mlat-client

The above mlat-client package installs following two items:

(1) fa-mlat-client: for piaware, in folder /usr/lib/piaware/helpers/
creates this folder on installation if it is does not exist (i.e. if piaware is not yet installed)

(2) mlat-client: for Radarbox24 rbfeeder, in existing folder /usr/bin/

 

image