APT-GET KNOWLEDGE

PiAware Refresh

I had the unfortunate pleasure of having to rebuild my Piaware project from scratch due to a failing SD card while trying to manage the PI via VS Code remote SSH plugin. While I did try to make a clone of the SdD card, unfortunatly the clone had the same critical write issues so I had to start fresh. Heres how I did it.

Fresh and Clean

Before doing any flashing, I started by grabbing key config details from my semi functional Piaware deployment. Files like /boot/piaware-config.txt and /etc/fr24feed.ini contain details on the current config that will reduce the time to stand everything back up such as network, key, receiver, and update configurations.

I got the latest image from Piaware at https://www.flightaware.com/adsb/piaware/build (PiAware 10.2). Using Balena Etcher, I flashed a brand new SD card. Make sure to add an empty file called SSH to the root directory so you can carry on with the configuration via SSH.

Pro tip: When you boot your fresh install or perform rebooting action, you can use the following bash oneliner to tell when the system is up and able to connect.

while true; do sleep 5; ping -c1 your.pi.ip > /dev/null && break; done

Once successfully logged in (using default credentials pi/flightaware, start with changing the password by running passwd. Then we want to ensure everything is up to date with sudo apt-get update && apt-get upgrade -y .

I followed the instructions on the buildsite and claimed my client at https://www.flightaware.com/adsb/piaware/claim. I then edited the site details with precise location, airport and ground elevation details from my previous deployment and rebooted the Pi.

I confirmed the SDR was gathering signals by running view1090-fa.

With PiAware running it was time to integrate the other feeding sources.

Adding ADSB Exchange

ADS-B Exchange provides scripts to make it extremely easy to being feeding data, found at https://www.adsbexchange.com/ways-to-join-the-exchange/existing-equipment/.

Some things Of note: for some reason I have issues with my PiAware and DNS. I fixed my problem by editing /etc/conf.resolv , adding cloudflare as the sole name server (1.1.1.1) and making the file immutable with sudo chattr +i /etc/resolv.conf . To edit the file I just remove the immutable attribute with sudo chattr -i /etc/resolv.conf.

curl -L -o /tmp/axfeed.sh https://www.adsbexchange.com/feed.sh
sudo bash /tmp/axfeed.sh

Walking through the feed setup prompted me to provide the standard name, lattitude and longitude of the antenna, and elevation.

The script ends with:

Thanks for choosing to share your data with ADS-B Exchange!

If you're curious, check your feed status after 5 min:

https://adsbexchange.com/myip/
https://map.adsbexchange.com/sync/

Question? Issues? Go here:
https://discord.gg/xKqyMzTXvg
https://adsbx.discourse.group/

Webinterface to show the data transmitted? Run this command:
sudo bash /usr/local/share/adsbexchange/git/install-or-update-interface.sh

I then elected to install the feeder statistics script. This provides a feed map and statistics from the feed ID previously setup.

curl -L -o /tmp/axstats.sh https://www.adsbexchange.com/stats.sh 
sudo bash /tmp/axstats.sh

Adding Flightradar24

With 2/3 feeds setup, I moved onto the final destination, Flightradar24. Using their documentation at https://www.flightradar24.com/share-your-data, I ran their install script wget -qO- https://fr24.com/install.sh | sudo bash -s. Flightradar requires some details, of which I was able to reuse my previous account to populate the email and sharekey items.

Per their instrucitons, I disabled MLAT since I am sharing with other networks alongside Flightradar24.

I chose 'yes' when prompted to auto config dump1090, and refreshed Flightradar24 with:

sudo systemctl enable fr24feed
sudo systemctl restart fr24feed

I confirmed the status by navigating to http://your.pi.ip:8754. Learning from my previous mistakes, I promptly shut down the Pi and proceeded to make a backup of the new and fully updated PiAware feeder.

Reminder of how to check the feed status for each service:
PiAware
sudo systemctl status piaware -l
piaware-status
Flightradar24
sudo fr24feed-status
ADS-B Exchange (no cmd line util)
https://www.adsbexchange.com/myip/

Reference:
https://www.flightaware.com/adsb/piaware/build/
https://www.adsbexchange.com/ways-to-join-the-exchange/existing-equipment/
https://www.flightradar24.com/share-your-data

#General