FlightAware Discussions

Two Independent 1090 Mhz ADS-B Receivers on One Pi (No UAT 978)

STEP-1: Prepare OS

1.1 - Download and write Raspbian Lite image to microSD card.

https://downloads.raspberrypi.org/raspbian_lite_latest

1.2 - Enable SSH
After image is written, and while the microSD Card is still in the Laptop/Desktop, open File Explorer (Windows) or Finder (Mac), and open the drive named “boot” . This will open the /boot folder of Raspbian. In this folder create a new text file and rename it ssh

1.3 - Slip microSD card into RPi and power-up.

.

STEP-2: Serialize the two Dongles:

Serialize dongles to following serial numbers:
Dongle #1: 00000101
Dongle #2: 00000102

How-to Serialize Dongles for ES1090 + UAT978

.

STEP-3: Package install of Piaware and dump1090-fa

wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.7.1_all.deb 
sudo dpkg -i piaware-repository_3.7.1_all.deb 
sudo apt-get update 

sudo apt-get install piaware 
sudo piaware-config uat-receiver-type none
sudo piaware-config allow-auto-updates yes
sudo piaware-config allow-manual-updates yes
sudo piaware-config  feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

sudo apt-get install dump1090-fa 

sudo reboot  

Edit file /etc/default/dump1090-fa and change device index from 0 to 00000101 as shown below:

RECEIVER_OPTIONS="--device-index 00000101 --gain -10 --ppm 0 --net-bo-port 30005"

.

STEP-4: Create files for second instance of dump1090-fa

4.1 - Create Service file for dump1090-fa2

sudo nano /lib/systemd/system/dump1090-fa2.service

Copy-paste following code and save file

# dump1090-fa2 service for systemd

[Unit]
Description=dump1090 ADS-B receiver (FlightAware customization)
Documentation=https://flightaware.com/adsb/piaware/
Wants=network.target
After=network.target

[Service]
User=dump1090
RuntimeDirectory=dump1090-fa2
RuntimeDirectoryMode=0755
ExecStart=/usr/share/dump1090-fa/start-dump1090-fa2 --write-json %t/dump1090-fa2 --quiet
SyslogIdentifier=dump1090-fa2
Type=simple
Restart=on-failure
RestartSec=30
RestartPreventExitStatus=64
Nice=-5

[Install]
WantedBy=default.target

.

4.2 - Create Startup file for dump1090-fa2

Create new file and make it executeable
sudo touch /usr/share/dump1090-fa/start-dump1090-fa2
sudo chmod +x /usr/share/dump1090-fa/start-dump1090-fa2

Open file in editor
sudo nano /usr/share/dump1090-fa/start-dump1090-fa2

Copy-paste following code and save file

#!/bin/sh

# Helper script that reads /etc/default/dump1090-fa2
# and either starts dump1090-fa2 with the configured
# arguments, or exits with status 64 to tell systemd
# not to auto-restart the service.

if [ -f /etc/default/dump1090-fa2 ]
then
    . /etc/default/dump1090-fa2
fi

if [ -f /var/cache/piaware2/location.env ]
then
    . /var/cache/piaware2/location.env
fi

if [ "x$ENABLED" != "xyes" ]
then
    echo "dump1090-fa2 not enabled in /etc/default/dump1090-fa2" >&2
    exit 64
fi

if [ -n "$PIAWARE_LAT" -a -n "$PIAWARE_LON" ]
then
    POSITION="--lat $PIAWARE_LAT --lon $PIAWARE_LON"
fi

exec /usr/bin/dump1090-fa \
     $RECEIVER_OPTIONS2 $DECODER_OPTIONS2 $NET_OPTIONS2 $JSON_OPTIONS2 $POSITION \
     "$@"
# exec failed, do not restart
exit 64

.

4.3 - Create config file for dump1090-fa2

sudo nano /etc/default/dump1090-fa2

Copy-pasted following code and saved file

# dump1090-fa2 configuration
# This is sourced by /usr/share/dump1090-fa/start-dump1090-fa2 as a
# shellscript fragment.

# If you are using a PiAware sdcard image, this config file is regenerated
# on boot based on the contents of piaware-config.txt; any changes made to this
# file will be lost.

# dump1090-fa2 won't automatically start unless ENABLED=yes
ENABLED=yes

RECEIVER_OPTIONS2="--device-index 00000102 --gain -10 --ppm 0 --net-bo-port 31005"
DECODER_OPTIONS2="--max-range 360"  
NET_OPTIONS2="--net --net-heartbeat 60 --net-ro-size 1000 --net-ro-interval 1 --net-ri-port 0 --net-ro-port 31002 --net-sbs-port 31003 --net-bi-port 31004,31104 --net-bo-port 31005"  
JSON_OPTIONS2="--json-location-accuracy 1"  

.

4.4 - Enable auto-start of dump1090-fa2 at boot

sudo systemctl enable dump1090-fa2

sudo systemctl restart dump1090-fa2

STEP-5: Create files for 2nd instance of Piaware

.
5.1 - Create Service file for piaware2

sudo nano /lib/systemd/system/piaware2.service

Copy-paste following code and save file

# piaware uploader service for systemd
# install in /etc/systemd/system

[Unit]
Description=FlightAware ADS-B uploader
Documentation=https://flightaware.com/adsb/piaware/
Wants=network-online.target
After=dump1090-fa2.service network-online.target time-sync.target

[Service]
User=piaware
RuntimeDirectory=piaware2
ExecStart=/usr/bin/piaware -p %t/piaware2/piaware.pid -plainlog -statusfile %t/piaware2/status.json -configfile /etc/piaware2.conf -cachedir /var/cache/piaware2  
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
Restart=on-failure
RestartSec=30
# exit code 4 means login failed
# exit code 6 means startup failed (bad args or missing MAC)
RestartPreventExitStatus=4 6

[Install]
WantedBy=default.target

.

5.2 - Create Config file for piaware2

sudo nano /etc/piaware2.conf

Copy-paste following code and save file
NOTE: Replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx by actual feeder-id of 2nd instance

# 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.
uat-receiver-type none   # updated by fa_piaware_config
allow-auto-updates yes   # updated by fa_piaware_config
allow-manual-updates yes   # updated by fa_piaware_config
feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
receiver-type other
receiver-port 31005
receiver-host 127.0.0.1
mlat-results-format beast,connect,localhost:31104

.
5.3 - Create folders for piaware2

sudo mkdir /var/cache/piaware2
sudo chown piaware /var/cache/piaware2
sudo chown piaware /etc/piaware2.conf

sudo systemctl enable piaware2
sudo systemctl start piaware2

.

STEP-6: Map and lighttpd integration for dump1090-fa2

.
6.1 - Create new file for lighttpd configuration for 2nd instance of dump1090-fa:

sudo nano /etc/lighttpd/conf-available/89-dump1090-fa2.conf

Copy-paste following code in the above file
Save file

# Allows access to the static files that provide the dump1090 map view,
# and also to the dynamically-generated json parts that contain aircraft
# data and are periodically written by the dump1090 daemon.

alias.url += (
  "/dump1090-fa2/data/" => "/run/dump1090-fa2/",
  "/dump1090-fa2/" => "/usr/share/dump1090-fa/html/"
)

# redirect the slash-less URL
url.redirect += (
  "^/dump1090-fa2$" => "/dump1090-fa2/"
)

# Listen on port 8181 and serve the map there, too.
$SERVER["socket"] == ":8181" {
  alias.url += (
    "/data/" => "/run/dump1090-fa2/",
    "/" => "/usr/share/dump1090-fa/html/"
  )
}


# Add CORS header

$HTTP["url"] =~ "^/dump1090-fa2/data/.*\.json$" {
  setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
}

.
6.2 - Enable lighttpd integration for 2nd instance

sudo lighty-enable-mod dump1090-fa2
sudo service lighttpd force-reload
.

STEP-7: Checks

.
7.1 - dump1090-fa

pi@raspberrypi:~ $ 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: active (running) since Mon 2019-06-24 05:45:31 EDT; 2h 13min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 498 (dump1090-fa)
   CGroup: /system.slice/dump1090-fa.service
           └─498 /usr/bin/dump1090-fa --device-index 0 --gain 42.1 --ppm 0 --net-bo-port 30005 --max-range 360 --net --net-heartbeat

Jun 24 05:45:31 raspberrypi systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Jun 24 05:45:32 raspberrypi dump1090-fa[498]: Mon Jun 24 05:45:32 2019 EDT  dump1090-fa 3.7.1 starting up.
Jun 24 05:45:33 raspberrypi dump1090-fa[498]: rtlsdr: using device #0: Generic RTL2832U OEM (Realtek, RTL2838UHIDIR, SN 0)
Jun 24 05:45:33 raspberrypi dump1090-fa[498]: Found Rafael Micro R820T tuner
Jun 24 05:45:34 raspberrypi dump1090-fa[498]: rtlsdr: tuner gain set to 42.1 dB

.
7.2 - dump1090-fa2

pi@raspberrypi:~ $ sudo systemctl status dump1090-fa2
● dump1090-fa2.service - dump1090 ADS-B receiver (FlightAware customization)
   Loaded: loaded (/lib/systemd/system/dump1090-fa2.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-24 05:45:31 EDT; 2h 16min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 481 (dump1090-fa)
   CGroup: /system.slice/dump1090-fa2.service
           └─481 /usr/bin/dump1090-fa --device-index 1 --gain -10 --ppm 0 --net-bo-port 31005 --max-range 360 --net --net-heartbeat

Jun 24 05:45:31 raspberrypi systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Jun 24 05:45:32 raspberrypi dump1090-fa2[481]: Mon Jun 24 05:45:32 2019 EDT  dump1090-fa 3.7.1 starting up.
Jun 24 05:45:33 raspberrypi dump1090-fa2[481]: rtlsdr: using device #1: Generic RTL2832U (Realtek, RTL2832UFA, SN 1)
Jun 24 05:45:33 raspberrypi dump1090-fa2[481]: Found Rafael Micro R820T tuner
Jun 24 05:45:33 raspberrypi dump1090-fa2[481]: rtlsdr: enabling tuner AGC

.

7.3 - piaware

raspberrypi:~ $ sudo systemctl status piaware
● piaware.service - FlightAware ADS-B uploader
   Loaded: loaded (/lib/systemd/system/piaware.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-24 05:45:31 EDT; 2h 22min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 499 (piaware)
   CGroup: /system.slice/piaware.service
           ├─499 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
           ├─795 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 43.xxx --lon -79.xxx
           └─813 /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005 --input-type dump1090 --results beast,connect,localhost:30104


Jun 24 07:51:08 raspberrypi piaware[499]: 21278 msgs recv'd from dump1090-fa (851 in last 5m); 21278 msgs sent to FlightAware
Jun 24 07:56:08 raspberrypi piaware[499]: 22153 msgs recv'd from dump1090-fa (875 in last 5m); 22153 msgs sent to FlightAware
Jun 24 08:00:49 raspberrypi piaware[499]: mlat-client(813): Receiver status: connected
Jun 24 08:00:49 raspberrypi piaware[499]: mlat-client(813): Server status:   synchronized with 139 nearby receivers
Jun 24 08:00:49 raspberrypi piaware[499]: mlat-client(813): Receiver:  141.4 msg/s received       43.4 msg/s processed (31%)
Jun 24 08:00:49 raspberrypi piaware[499]: mlat-client(813): Server:      0.1 kB/s from server    0.0kB/s TCP to server     0.5kB/s UDP to s
Jun 24 08:00:49 raspberrypi piaware[499]: mlat-client(813): Results:  54.4 positions/minute
Jun 24 08:00:49 raspberrypi piaware[499]: mlat-client(813): Aircraft: 17 of 38 Mode S, 18 of 21 ADS-B used
Jun 24 08:01:08 raspberrypi piaware[499]: 23154 msgs recv'd from dump1090-fa (1001 in last 5m); 23154 msgs sent to FlightAware
Jun 24 08:06:08 raspberrypi piaware[499]: 24259 msgs recv'd from dump1090-fa (1105 in last 5m); 24259 msgs sent to FlightAware

.
7.4 - piaware2

raspberrypi:~ $ sudo systemctl status piaware2
● piaware2.service - FlightAware ADS-B uploader
   Loaded: loaded (/lib/systemd/system/piaware2.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-24 05:45:31 EDT; 2h 24min ago
     Docs: https://flightaware.com/adsb/piaware/
 Main PID: 503 (piaware)
   CGroup: /system.slice/piaware2.service
           ├─503 /usr/bin/piaware -p /run/piaware2/piaware.pid -plainlog -statusfile /run/piaware2/status.json -configfile /etc/piaware2.co
           ├─808 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr 127.0.0.1 --net-bo-port 31005 --stdout --lat 43.xxx --lon -79.xxx
           └─821 /usr/lib/piaware/helpers/fa-mlat-client --input-connect 127.0.0.1:31005 --input-type auto --results beast,connect,localhost:31104

Jun 24 07:51:08 raspberrypi piaware[503]: 20533 msgs recv'd from dump1090-fa (904 in last 5m); 20533 msgs sent to FlightAware
Jun 24 07:56:08 raspberrypi piaware[503]: 21341 msgs recv'd from dump1090-fa (808 in last 5m); 21341 msgs sent to FlightAware
Jun 24 08:00:49 raspberrypi piaware[503]: mlat-client(821): Receiver status: connected
Jun 24 08:00:49 raspberrypi piaware[503]: mlat-client(821): Server status:   synchronized with 138 nearby receivers
Jun 24 08:00:49 raspberrypi piaware[503]: mlat-client(821): Receiver:  126.9 msg/s received       41.6 msg/s processed (33%)
Jun 24 08:00:49 raspberrypi piaware[503]: mlat-client(821): Server:      0.1 kB/s from server    0.0kB/s TCP to server     0.4kB/s UDP to s
Jun 24 08:00:49 raspberrypi piaware[503]: mlat-client(821): Results:  59.6 positions/minute
Jun 24 08:00:49 raspberrypi piaware[503]: mlat-client(821): Aircraft: 16 of 36 Mode S, 22 of 26 ADS-B used
Jun 24 08:01:08 raspberrypi piaware[503]: 22293 msgs recv'd from dump1090-fa (952 in last 5m); 22293 msgs sent to FlightAware
Jun 24 08:06:08 raspberrypi piaware[503]: 23423 msgs recv'd from dump1090-fa (1130 in last 5m); 23423 msgs sent to FlightAware

.
7.5 - Map of original instance
IP-of-Pi/dump1090-fa/

.
7.6 - Map of 2nd instance
IP-of-Pi/dump1090-fa2/

4 Likes

Looks good, nicely done!

1 Like

Is this for comparing dongles or so people can expand their coverage by having 2 antennas around their house or is this for a different purpose?

Adding 2nd instance of FlightRadar24 feeder

This assumes that you have already installed FR24 feeder, and now going to add it’s 2nd instance to use data from 2nd instance of dump1090-fa/2nd dongle.

.

STEP-1: Prepare config file "fr24feed2.ini"

sudo touch /etc/fr24feed2.ini 
sudo chmod a+rw /etc/fr24feed2.ini 
sudo nano /etc/fr24feed2.ini

.
Copy-paste following into /etc/fr24feed2.ini
NOTE: Replace xxxxxxxxxxxxxxxx by your actual feeder key

receiver="beast-tcp" 
fr24key="xxxxxxxxxxxxxxxx" 
host="127.0.0.1:31005" 
bs="no" 
raw="no" 
logmode="1" 
logpath="/var/log/fr24feed2" 
mpx="no" 
mlat="yes" 
mlat-without-gps="yes" 
use-http="yes" 
http-timeout="20"

.

STEP-2: Prepare service file "fr24feed2.service"

sudo nano /lib/systemd/system/fr24feed2.service

.
Copy-paste following into /lib/systemd/system/fr24feed2.service

[Unit] 
Description=Flightradar24 Feeder 
After=network-online.target 

[Service] 
Type=simple 
Restart=always 
LimitCORE=infinity 
RuntimeDirectory=fr24feed2 
RuntimeDirectoryMode=0755 
ExecStartPre=/bin/mkdir -p /var/log/fr24feed2 
ExecStartPre=/bin/chown fr24 /var/log/fr24feed2 
ExecStart=/usr/bin/fr24feed --config-file=/etc/fr24feed2.ini 
User=fr24 
PermissionsStartOnly=true 
StandardOutput=null 

[Install] 
WantedBy=multi-user.target

.

STEP-3: Enable service, and start fr24feed2

sudo systemctl enable fr24feed2 
sudo systemctl restart fr24feed2

.

STEP-4: Check status

pi@raspberrypi:~ $ sudo systemctl status fr24feed2

● fr24feed2.service - Flightradar24 Feeder 2
   Loaded: loaded (/lib/systemd/system/fr24feed2.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-24 10:37:03 EDT; 44s ago
  Process: 4329 ExecStartPre=/bin/chown fr24 /var/log/fr24feed2 (code=exited, status=0/SUCCESS)
  Process: 4323 ExecStartPre=/bin/mkdir -p /var/log/fr24feed2 (code=exited, status=0/SUCCESS)
 Main PID: 4332 (fr24feed)
   CGroup: /system.slice/fr24feed2.service
           └─4332 /usr/bin/fr24feed --config-file=/etc/fr24feed2.ini

Jun 24 10:37:03 raspberrypi systemd[1]: Starting Flightradar24 Feeder 2...
Jun 24 10:37:03 raspberrypi systemd[1]: Started Flightradar24 Feeder 2.

.
STEP-5: Check logs

pi@raspberrypi:~ $ cat /var/log/fr24feed2/fr24feed.log

2019-06-24 10:37:12 | [feed][n]CYYZ52@185.218.24.22:8099/UDP
2019-06-24 10:37:12 | [feed][n]connecting
2019-06-24 10:37:12 | info | Stopping ReceiverACSender threads for feed
2019-06-24 10:37:12 | info | Configured ReceiverACSender: 185.218.24.22:8099,185.218.24.23:8099,185.218.24.24:8099, feed: CYYZ52, send_interval: 5s, max age: 15s, send metadata: true, mode: 1, filtering: true
2019-06-24 10:37:12 | info | Network thread connecting to 185.218.24.22:8099 for feed CYYZ52
2019-06-24 10:37:12 | [feed][n]connected via UDP (fd 13)
2019-06-24 10:37:12 | [feed][i]Feed connected
2019-06-24 10:37:12 | [feed][n]working
2019-06-24 10:37:12 | [feed][i]sent 1,0 AC
2019-06-24 10:37:12 | [mlat][i]MLAT configuration received, service ENABLED
2019-06-24 10:37:12 | [mlat][i]Starting MLAT with preconfigured position: 43.58,-79.62,450.0
2019-06-24 10:37:12 | [mlat][i]MLAT bandwidth reduction active, level 1
2019-06-24 10:37:12 | [mlat][i]Configuring UDP connection udp://usa-2.fr24.com:19788
2019-06-24 10:37:17 | [feed][i]sent 35,0 AC
2019-06-24 10:37:22 | [mlat][i]Registering MLAT station
2019-06-24 10:37:22 | [mlat][i]Registering MLAT station: SUCCESS
2019-06-24 10:37:23 | [feed][i]sent 31,0 AC
2019-06-24 10:37:24 | [mlat][i]Received ADS-B time references AC:
2019-06-24 10:37:24 | [mlat][i] 71BE34
2019-06-24 10:37:24 | [mlat][i] A1ED5F
2019-06-24 10:37:24 | [mlat][i] A242D5
2019-06-24 10:37:24 | [mlat][i] A3CC82
2019-06-24 10:37:24 | [mlat][i] A438F1
2019-06-24 10:37:24 | [mlat][i] A65092
2019-06-24 10:37:24 | [mlat][i] A6F5D7
2019-06-24 10:37:24 | [mlat][i] A8D5DB
2019-06-24 10:37:24 | [mlat][i] AB4C76
2019-06-24 10:37:24 | [mlat][i] C05EFD
2019-06-24 10:37:24 | [mlat][i] C06361
2019-06-24 10:37:24 | [mlat][i] C06363
2019-06-24 10:37:24 | [mlat][i] C06878
2019-06-24 10:37:24 | [mlat][i] C06DD3
2019-06-24 10:37:24 | [mlat][i] C07F32
2019-06-24 10:37:24 | [mlat][i] C084BE
2019-06-24 10:37:24 | [mlat][i]Pinging the server
2019-06-24 10:37:24 | [mlat][i]Stats 26270/26270
2019-06-24 10:37:28 | [feed][i]sent 37,0 AC
2019-06-24 10:37:33 | [feed][i]sent 34,0 AC

This is an optional extra. It depends on user what for he wants to use it.

You could want to use two rtl-sdr dongles with different gain settings.
That can help to cover aircraft far away and very close at the same time.
Close to an airport for example.

Or you want to have an extra antenna focused in one direction.
Or you somehow have two antennas which cover half of the sky each.

Anyway i’ll just leave this here:
https://github.com/wiedehopf/combine1090#combine1090

If you configure the source ports appropriately you can use it to obtained a webinterface that shows the aircraft from both receivers.
If you want MLAT results from both you’ll have to change the settings for piaware2 to either listen on 31105, or you can just make the piaware feed the results into port 29004.

@abcd567
You might want to explain how to get the 2nd feeder-id.
Foolproof method in case it’s already screwed up:

sudo systemctl stop piaware2
sudo rm /var/cache/piaware2/feeder_id

Change piaware2.conf:

[...]
allow-manual-updates yes   # updated by fa_piaware_config
feeder-id
receiver-type other
[...]

Having a blank entry helps with potentially having a feeder-id configured in piaware.conf.
piaware.conf is read first even for the 2nd piaware, then piaware2.conf is read.
Having the blank entry makes sure no feeder-id is really configured even if the other config file is read first.

sudo systemctl start piaware2

piaware will now get a fresh feeder-id which can be claimed.
(https://flightaware.com/adsb/piaware/claim)

Hummmm :thinking:

Interesting. Thanks for the tips, source and explanation. I now see some advantages to this setup.

Is it a pi to install two antennas to receive?

To have 2 stations, the normal way is to have everything two:

In this unusual setup, one can still get 2 stations, but saves one RPi as below:

RPi Dongle Coax Antenna
Standard Setup 2 2 2 2
This Setup 1 2 2 2

.

When creating this config file:

CONFIG_FILE_piaware=/etc/piaware2.conf

Maybe add this line (no value):

feeder-id

This is to make sure the feeder-id from the first installation is not used if it is configured in /etc/piaware.conf
(/etc/piaware.conf is always read first, it’s hard-coded)

Now when someone wants to claim their 2nd receiver it will work instead of the already existing feeder-id being used for the 2nd receiver.

Claiming the station will work just as well with the empty feeder-id set in piaware2.conf.
The new assigned feeder-id is just saved in /var/cache.

I have tested installs with and without a blank feeder id line in /etc/piaware.conf and /etc/piaware2.conf.

Did not make any difference for claiming new feeder id.

I have just now finished running the script on a fresh buster image, and did not add any feeder id anywhere, and got two brand-new feeder ids after reboot:

pi@raspberrypi:~ $ cat /var/cache/piaware2/feeder_id
43b75ca0-a0f6-411b-bb9f-0720a7a65c47
pi@raspberrypi:~ $ cat /var/cache/piaware/feeder_id
f61ed614-1df0-4b0a-9476-d505007b8e53

I can claim any one or both of these. However since I already have feeder ids for both I will simply delete these brand-new ones from cache, then add the ones I have to file /etc/piaware.conf and /etc/piaware2.conf and restart both piaware & piaware2

Can this script also enable FR24 feeds?

Well, it only makes a difference if you already have a feeder-id configured in /etc/piaware.conf
(if it’s only in the cache it’s not a problem)

So assume before using your script, someone wanted to get back his id because he made a new install.
As such he set it via piaware-config (which puts it in /etc/piaware.conf).

Now he uses your script and wants to claim the 2nd station, which doesn’t work as it’s using the feeder-id from /etc/piaware.conf instead of automatically getting a new one.
This issue can be avoided by setting feeder-id to nothing in piaware2.conf.

On a related note: You don’t need to delete the feeder-id from the cache, if a feeder-id is configured in the configuration file it takes precedence and the cache is updated to the new id.

Welcome @ua549
Glad to see you in this forum after recent encounter in FR24 forum. :wink:

No, this script does nothing for fr24feed, but as it has created 2nd instance of dump1090-fa which outputs Beast data on port 31005, you can do it manually easily:

(1) First install fr24feed by their bash script given below.
Set receiver=“beast-tcp”, host=“127.0.0.1:30005”. (Caution: do NOT set receiver=“dvbt”)

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

.

(2) Next create 2nd instance of fr24feed manually as shown in this post:

Adding 2nd instance of FlightRadar24 feeder

.

Well the script is meant for a virgin OS image without any piaware or dump1090-fa installed on it. It is not meant to run on a microSD card which already has piaware & dump1090-fa installed.

The script first installs the piaware and dump1090-fa (package install) and after that creates & configures files for 2nd instance. Thus both the piaware and piaware2 have no feeder-id anywhere on the microSD card, neither in .conf nor in cache. When Pi is rebooted or piaware instances are restarted, they get brand-new feeder-id in cache. These newly acquired brand-new feeder-ids in cache can be either claimed, or deleted/replaced by already existing feeder ids

OK, I will try it when my RPi 4 arrives to replace a RPi 3 B that’s currently feeding FR24, FA, and serving 2 laser printers.

That said I’m a bit confused about dump1090-mutability and dump1090-fa. Do they co-exist or is only one installed? If so, which is better?

Do NOT try it on RPi4.
It wont work on RPi4 due to rtl driver issues which is still unresolved.
Wait untill this problem of Pi4 is resolved.

It works fine on RPi 2 & 3

Only one of them can use the dongle, so it really makes sense to have only one installed.

dump1090-fa is actively developed by mutability.
dump1090-mutability on the other hand is no longer actively developed.

The local map style is a matter of preference, but you can have the old style with dump1090-fa as well:
https://github.com/wiedehopf/dump1090-retro-html#dump1090-retro-html

Thanks! I’ll move to dump1090-fa when I update software.

@ua549

In this thread I have posted the method to create 2nd instance of dump1090-fa and 2nd instance of piaware.

Over an year ago, in FR24 forum, I have posted the method to create 2nd instance of dump1090-mutability.

With 2 instances of any version of the dump1090 (mutab or fa), if you also create 2 instances of fr24feed and 2 instances of piaware, you can have 2 independent stations on one Pi.