FlightAware Discussions

Re-imaging Made Easy

When anyone re-images microSD card with latest image, the re-imaging itself (using balena-etcher or win32diskimager) is not difficult, but people face difficulty in configuring it. Another discouraging factor is to reinstall and configure feeders of other sites. However if you follow instructions below, re-imaging is not as difficult as it seems

NOTE: It is strongly recommended to use a SPARE microSD card to make a fresh install. This way your existing install will be preserved and you can fall back on it if fresh install fails or you decide to quit before finishing the fresh install.

STEP-1: Retrive & Save Feeder Keys

Before you write fresh image, retrieve feeder keys from existing image, copy-paste and save these in Notepad on your desktop/laptop.

1.1 - Piaware feeder-id

Following command will print feeder-id

cat /var/cache/piaware/feeder_id
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx

1.2 - Plane finder share-code

Give following command

cat /etc/pfclient-config.json

It will output following long line. Your Planefinder sharecode is the last item zzzzzzzzz in this long line

{"tcp_address":"127.0.0.1","tcp_port":"30005","select_timeout":"10","data_upload_interval":"10","connection_type":"1","aircraft_timeout":"30","data_format":"1","latitude":"xx.xxxx","longitude":"yy.yyyy","sharecode":"zzzzzzzzzzzz"}

1.3 - Flightradar24 key:

Give following command

cat /etc/fr24feed.ini  

Following line in output of above command has your fr24 key:

fr24key="xxxxxxxxxxxxxxxx"

1.4 - Radarbox24 key:

Give following command:

cat /etc/rbfeeder.ini  

Following line in output of above command has you RB24 key

key=xxxxxxxxxxxxxxxxxxxxxx

 

STEP-2: Write image to microSD Card

OPTION-1: How to Install and Configure Piaware 4.0 SD card image - Quickstart Guide

OPTION-2: [Package Install] How to Install and Configure Piaware on Raspberry Pi OS Image / RPi

 

STEP-3 : Install & Configure Feeders

3.1 - Planefinder

3.1.1 - Create new blank file /etc/pfclient-config.json by following command:

sudo nano /etc/pfclient-config.json

3.1.2 - In new blank file, copy-paste following code
(Replace xx.xxxx by your latitude, yy.yyyy by your longitude, and zzzzzzzzzzzzz by your Planefinder key)

{
"tcp_address":"127.0.0.1",
"tcp_port":"30005",
"select_timeout":"10",
"data_upload_interval":"10",
"connection_type":"1",
"aircraft_timeout":"30",
"data_format":"1",
"latitude":"xx.xxxx",
"longitude":"yy.yyyy",
"sharecode":"zzzzzzzzzzzzzzz"
}

 

3.1.3 - Save file (Ctrl+O) and close file (Ctrl+x)

 

3.1.4 - Now install Planefinder feeder by following commands

wget http://client.planefinder.net/pfclient_4.1.1_armhf.deb  

sudo dpkg -i pfclient_4.1.1_armhf.deb  

At the end of installation, the installer will ask if you want to install new version of config file or keep the current version (i.e. the config file you have created). The default choice is to keep copy created by you. Press Enter key to accept default (keep current version).
On pressing Enter Key, the installer will announce that installation is completed.

pfclient-config.json

 

3.1.5 - Go to following address in your browser to see the map

IP-of-Pi:30053

3.2 - Flightradar24

3.2.1 - Create new blank file /etc/fr24feed.ini by following command:

sudo nano /etc/fr24feed.ini

3.2.2 - In new blank file, copy-paste following code
(Replace xxxxxxxxxxxxxx by your fr24 key)

receiver="beast-tcp" 
fr24key="xxxxxxxxxxxxxxxx" 
host="127.0.0.1:30005" 
bs="no" 
raw="no" 
logmode="1" 
logpath="/var/log/fr24feed" 
mlat="yes" 
mlat-without-gps="yes"

 

3.2.3 - Save file (Ctrl+O) and Close (Ctrl+X)

 

3.2.4 - Next install FR24 feeder by following command

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

As you have already created the config file, the installer will by default keep it, and show following output

image

 

When installation is finished, the installer will start the configuration. As you already have created configuration file in step (1), don’t proceed, instead break the process by pressing (Ctrl+C).

image

3.2.5 - Now restart fr24feed

sudo systemctl restart fr24feed 

3.2.6 - Wait for 5 minutes, then check status

fr24feed-status

It will show status similar to tthis

[ ok ] FR24 Feeder/Decoder Process: running.
[ ok ] FR24 Stats Timestamp: 2020-12-30 19:41:08.
[ ok ] FR24 Link: connected [UDP].
[ ok ] FR24 Radar: T-CYYZ52.
[ ok ] FR24 Tracked AC: 29.
[ ok ] Receiver: connected (64993 MSGS/0 SYNC).
[ ok ] FR24 MLAT: ok [UDP].
[ ok ] FR24 MLAT AC seen: 26.

3.3 - Radarbox24:

3.3.1 - Create new blank file /etcrbfeeder.ini by following command:

sudo nano /etc/rbfeeder.ini

 

3.3.2 - In new blank file, copy-paste following code
NOTE: In code below, replace:

  1. kkkkkkkkkkkkkkkkkkkkkkkkkkk by your RB24 key
  2. xx.xxxx by your Latitude
  3. yy.yyyy by your Longitude
  4. zzz by your Altitude above Sea in meters

 

[client]
network_mode=true
log_file=/var/log/rbfeeder.log
key=kkkkkkkkkkkkkkkkkkkkkkkkkkk

lat=xx.xxxx
lon=yy.yyyy
alt=zzz


[network]
mode=beast
external_port=30005
external_host=127.0.0.1

[mlat]
autostart_mlat=true
#mlat_cmd=/usr/bin/python3.7 /usr/bin/mlat-client

[dump978]
#dump978_enabled=true

 

3.3.3 - Save file (Ctrl+O) and Close (Ctrl+X)

 

3.3.4 - Next install RB24 feeder by following command

sudo bash -c "$(wget -O - http://apt.rb24.com/inst_rbfeeder.sh)"

As you have already created the config file, the installer will show following output. Press Enter Key to accept the default (i.e. keep the file you have created)

rbfeeder.ini-1

Next it will ask if you want to install dump978-rb (requires extra dongle). To say NO, type n and press Enter Key.

rbfeeder.ini-2

The installer will now announce rbfeeder has been installed.

 

3.3.5 - Next install mlat-client by following command

sudo apt-get install mlat-client   

 

3.3.6 - Reboot Pi and check status

sudo reboot   

sudo systemctl status rbfeeder   

 

3.3.7 - Check your stations status Map (replace xxxxxx by your 6-digit station number)

https://www.radarbox.com/stations/EXTRPIxxxxxx

image

 

 

3.4 - Graphs by @wiedehopf

3.4.1 - Install graphs

sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/graphs1090/master/install.sh)"   

 

3.4.2 - To update data

sudo /usr/share/graphs1090/graphs1090.sh 24h  

 

3.4.3 - To Make all graphs full width
By default some graphs occupy full width of page (1 graph per row), while some other occupy half width (i.e. 2 graphs in one row). To make all graphs full width, do this

sudo nano /etc/default/graphs1090  

Scroll down and change:
all_large=no
to
all_large=yes

Then run:
sudo /usr/share/graphs1090/boot.sh

Go to IP-of-Pi/graphs1090/ and reload browser (Ctrl+F5)

 

4 Likes

Thank you very much. Great tutorial.

Would it be an idea to add Opensky network as well?

@abcd567 Thanks for this.
I will be doing this soon when I re-build my pi with an SSD drive. I just did the process 3.4.3 to make graphs full-width and nothing happens. Any ideas?

I have installed graphs over a year ago, and on that version changing all_large=no to all_large=yes works ok. May be in later version of graphs the width function has been disabled.

@wiedehopf will be able to answer this.

 

P.S.
May be you forgot to save the file after making changes. Please check the file what is there now, all_large=yes or all_large=no?

My mistake, I was ssh’d into my other ADS-B pi when I edited graphs1090 but was checking the graphs for the other pi :grin:.

2 Likes