Welcome to Radarspotting. Please login or sign up.

May 02, 2024, 11:14:39 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

Feed planeplotter from RPi/dump1090

Started by abcd567, December 20, 2019, 01:10:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

abcd567

This post describes method to install planeplotter uploader on RPi.

This software obtains data from dump1090, and uploads it to planeplotter site only. It is NOT like Windows full-scale Planeplotter software.

This method is applicable to all the following installs:


  • Piaware SD Card image (which has integral dump1090-fa)

  • Pi24 image (which has integral dump1090-mutability)

  • Raspbian image with dump1090-fa package install

  • Raspbian image with dump1090-mutability package install

CREDITS:
David Taylor
http://www.satsignal.eu/raspberry-pi/dump1090.html

STEP-BY-STEP METHOD


1 - Obtain Planeplotter Configuration/user key
Go to http://www.coaa.co.uk/rpi-request.htm and enter your details, and your co-ordinates. You will then be e-mailed your own personal copy of a file called coaa.h.


2 - Install packages necessary to build and necessary to fulfil dependencies.


sudo apt-get update
sudo apt-get install git cmake librtlsdr-dev
sudo apt-get install libusb-1.0-0-dev pkg-config



3 - Build the Planeplotter uploader ppup1090 from source code of dump1090 (Malcolm Robb)

3.1 - Clone/download the dump1090 source code from Github.

cd ~
git clone git://github.com/MalcolmRobb/dump1090.git ppup


3.2 -  Enter folder ppup

cd ppup


3.3 - Add Planeplotter Configuration/user key
In directory ppup, you will find dummy file coaa.h. Replace it with the coaa.h you have received by email (see step 1). Use any one of following 2 options.

Option-1:
Use FileZilla or WinSCP or similar program to copy file `coaa.h` from your Desktop/Laptop to RPi in folder ppup.

The file coaa.h cannot be directly copied to folder ppup due to permissions problem. To overcome this problem, copy it to folder /home/pi which has permission for copying files using SCP or FTP.

Once you have a copy of file coaa.h in folder home/pi, SSH to Pi, and issue following command to copy it to folder ppup:


cd ~/
sudo cp coaa.h  ppup/



Option-2:
Open file coaa.h received by email using MS Word or Wordpad
It's content will be like this:


//coaa.h configuration file for ab cd 2018-07-11 05:58:29
#define USER_REGNO xxxxxxx
#define USER_AUTHCODE xxxxxxxxxx
#define USER_LATITUDE xx.xxx
#define USER_LONGITUDE xx.xxx


open file coaa.h in RPi's folder ppup for editing


cd ~/ppup
sudo nano coaa.h


following will be displayed


// coaa.h configuration file for Plane Plotter Uploader
//
// You MUST apply via the COAA website for your own personal version of this fi$
// Do not disclose the contents of this file to anyone thereafter as it uniquely
// identifies you to the PlanePlotter system
//



Press (Ctrl+k) to delete all these lines and make this file empty.
Copy-Paste all lines from the file `coaa.h` which you received by email) in the file coaa.h in RPi.
After pasting, it will become like this


//coaa.h configuration file for ab cd 2018-07-11 05:58:29
#define USER_REGNO xxxxxx
#define USER_AUTHCODE xxxxxxxxx
#define USER_LATITUDE xx.xxx
#define USER_LONGITUDE xx.xxx



Save (Ctrl+o) and close (Ctrl+x)

3.4 - Compile the ppup1090 (plane plotter uploader) from source code

cd ~/ppup
make -f makeppup1090


3.5 - TEST


cd ~/ppup
./ppup1090


4 - Make ppup1090 to auto-start at boot by systemd

4.1 - Create system user ppup1090 which will start the service automatically at boot.

sudo useradd --system ppup1090 



4.2 - Create a blank file ppup1090.service in folder /lib/systemd/system/ppup1090.service


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


4.3 - Copy-paste following code in this blank file

IF USING DUMP1090-FA

# planeplotter uploader service for systemd

[Unit]
Description=PlanePlotter Raspberry Pi uploader
Wants=network-online.target
After=dump1090-fa.service network-online.target time-sync.target
PartOf=dump1090-fa.service

[Service]
User=ppup1090
RuntimeDirectory=ppup
ExecStart=/home/pi/ppup/ppup1090 --quiet
Type=simple
Restart=on-failure
RestartSec=30
# exit code 4 means login failed
# exit code 6 means startup failed
RestartPreventExitStatus=4 6

[Install]
WantedBy=default.target


Save (Ctrl+o) and close (Ctrl+x)


IF USING DUMP1090-MUTABILITY

# planeplotter uploader service for systemd

[Unit]
Description=PlanePlotter Raspberry Pi uploader
Wants=network-online.target
After=dump1090-mutability.service network-online.target time-sync.target
PartOf=dump1090-mutability.service

[Service]
User=ppup1090
RuntimeDirectory=ppup
ExecStart=/home/pi/ppup/ppup1090 --quiet
Type=simple
Restart=on-failure
RestartSec=30
# exit code 4 means login failed
# exit code 6 means startup failed
RestartPreventExitStatus=4 6

[Install]
WantedBy=default.target


Save (Ctrl+o) and close (Ctrl+x)

.

4.4 - Enable service by following command


sudo systemctl enable ppup1090.service 

sudo systemctl restart ppup1090


.

4.5 - Check status after few minutes

pi@raspberrypi:~ $ sudo systemctl status ppup1090
● ppup1090.service - PlanePlotter Raspberry Pi uploader
   Loaded: loaded (/lib/systemd/system/ppup1090.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-03-17 04:36:59 EDT; 5min ago
Main PID: 860 (ppup1090)
   CGroup: /system.slice/ppup1090.service
           └─860 /home/pi/ppup/ppup1090 --quiet

Mar 17 04:36:59 raspberrypi systemd[1]: Started PlanePlotter Raspberry Pi uploader.




4.6 - Commands to control & monitor

sudo systemctl restart ppup1090   

sudo systemctl stop ppup1090   

sudo systemctl status ppup1090 



rikgale

#1
I have just followed the first few parts of this process. Section 3.1 needs to be updated to

3.1 - Clone/download the dump1090 source code from Github.
cd ~
git clone https://github.com/MalcolmRobb/dump1090.git ppup

NOTE: I am unable to get ppup to compile under the latest version of Raspberry Pi OS (BOOKWORM), but worked fine on an old BUSTER version of Raspberry Pi OS

Auto updated daily ZIP files on GitHub