One Pi, Two Dongles, Two Maps, Two Receivers

@obj

Is it possible to also run two INDEPENDENT instance of Piaware Data Feeder on same Pi?

.

Yes, though not out of the box. You can start two copies of piaware each with different -configfile and -cachedir command-line options, and then configure the two config files to point to different data sources. You’ll need to put together your own systemd service files to do that.

Thank you Oliver for your valuable guidance.
Will give it a try, possibly this weekend.
If successful, will end up in two totally independent stations on one RPi :slight_smile:
(1 RPi, 2 antennas, 2 dongles, 2 dump1090, 2 piaware data feeders)

1 Like

abcd567, were you able to make it work? Will you share a step by step guide similar to the one you published for dump1090-mutability? I’m a complete noob when it comes to linux, but I can follow detailed instructions.

No, I did not try to run two independent instances of piaware on same RPi.

Will sure post the step by step guide if I try to do it and succeed.

2nd piaware feed for UAT

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

Paste the following:


[Unit]
Description=FlightAware ADS-B uploader
Documentation=https://flightaware.com/adsb/piaware/
Wants=network-online.target
After=dump1090-fa.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

Check the following 2 files for a configured feeder-id:

sudo nano /etc/piaware.conf
sudo nano /boot/piaware-config.txt

If in either of the above files there is a line starting with feeder-id, remove the whole line and save the file.

Copy the configuration file and create some directories:

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

Start piaware2:
sudo systemctl start piaware2

Enable starting on boot with
sudo systemctl enable piaware2

Wait 5 minutes.
Claim the 2nd piaware: PiAware - Claim and Link a Brand New PiAware Ground Station - FlightAware

Change piaware2 to UAT only:

sudo nano /etc/piaware2.conf

Add these line and save:

uat-receiver-type sdr  
receiver-type none   

restart to apply the changed configuration:

sudo systemctl restart piaware2

If you want to check if the service is working you can filter the journal:

sudo journalctl -u piaware2 -f

This will give you a live display of what it’s doing. (handy in a 2nd window while testing)

2 Likes

:+1: :+1: :+1: Well done @wiedehopf. Thanks

Tested on Piaware SD Card img, 2nd instance of piaware is working good :slight_smile:

FIRST INSTANCE: https://flightaware.com/adsb/stats/user/abcd567#stats-5252

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

.

SIDE NOTE:

-configfile /etc/piaware2.conf -cachedir /var/cache/piaware2

Above piece of code reminds me of fr24feed-1.service & fr24feed-2.service files I created for running TWO instances of fr24feed :slight_smile:

ExecStartPre=/bin/mkdir -p /var/log/fr24-1
ExecStartPre=/bin/chown fr24 /var/log/fr24-1
ExecStart=/usr/bin/fr24feed  --config-file=/etc/fr24feed-1.ini  

.

ExecStartPre=/bin/mkdir -p /var/log/fr24-2
ExecStartPre=/bin/chown fr24 /var/log/fr24-2
ExecStart=/usr/bin/fr24feed  --config-file=/etc/fr24feed-2.ini  

.

Encouraging progress! If you think this is a stable solution, please publish a quick-start guide for users running 3.7.1 with 1090 & 978 on a single feed-id who want to migrate to two feed-id’s.

I’d like to give it a try this weekend if possible.

The guide is already published by @wiedehopf in this post above. I have created second instance of piaware using this guide.

The sequence of steps is a bit vague (I’m a Raspi novice) with the edits and “I suppose” comments.

I was able to follow your numbered steps in your 3.7.1 Quick-Start Guide to get 1090 & 978 working on 1 Raspi - thanks!

Try @wiedehopf’s guide, I feel you can follow it without any serious difficulty.

In case you cannot, then preferably @wiedehopf can edit his post to make his guide easier for novice.

Feel free to copy it.

Did you have a 2nd feeder-id laying around or did it just configure automatically?

Try it now.
A bit less vague but same stuff.

Also try learning how copying and editing via the console works.

Thanks - that helps, I’ll give it a try either tonight or tomorrow.

No it did not configure automatically. I added following line in file /etc/piaware2.conf using Uique Identifier of Stn #76000

feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

The station #76000 is lying arround for quiet some time with me. I got it by chance :slight_smile: when trying an experimental install.

Since this is a good looking number, I kept it alive by occassionally using it for my experimental installs.

Did you succeed in installing 2nd instance of piaware feeding “1090 messages only” to one station #, and “978 messages only” to another station #?

Trying it right now - 2nd feeder id is setup. I think I now need to disable the UAT feed from the 1st feeder id (this step was not mentioned in the Guide above).

Well UAT numbers are usually so low i didn’t care if the first station collected the UAT data as well.

You can do whatever you want with the stations / clients once they are running.

1 Like

They both seem to be reporting to FA and both local IP maps are working so I left the first feeder unchanged (1090 & 978 data).

@wiedehopf and @abcd567 - thanks again for the help!

1 Like

You can do it as given in 3.7.1 QuickStart Guide, item 9.2

You can use sudo piaware-config [argument] [value] for original instance of piaware, but this wont work for the second instance of piaware.

For making first (original) instance of piaware to be “1090 only”, follow commands in item 9.2 of QuickStart Guide.

For making 2nd instance of piaware to be “978 only”, you will have to do following:

sudo nano /etc/piaware2.conf
Then add lines (or edit if already existing)

uat-receiver-type sdr 
receiver-type none 

Save file, (Ctrl+o) and close (Ctrl+x).
Restart 2nd instance
sudo systemctl restart piaware2

Item 9 of QuickStart Guide