Welcome, Guest. Please login or register.

December 05, 2021, 09:02:20 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.
Members
Stats
  • Total Posts: 61349
  • Total Topics: 13636
  • Online Today: 43
  • Online Ever: 164
  • (August 20, 2021, 01:02:40 AM)
Users Online

Latest Post

Latest File

Author Topic: Feed planeplotter from RPi/dump1090  (Read 3027 times)

0 Members and 1 Guest are viewing this topic.

Offline abcd567

  • Member
  • ***
  • Posts: 87
Feed planeplotter from RPi/dump1090
« on: December 20, 2019, 01:10:49 AM »
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.

Code: [Select]
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.
Code: [Select]
cd ~
git clone git://github.com/MalcolmRobb/dump1090.git ppup

3.2 -  Enter folder ppup
Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
//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

Code: [Select]
cd ~/ppup
sudo nano coaa.h

following will be displayed

Code: [Select]
// 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

Code: [Select]
//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
Code: [Select]
cd ~/ppup
make -f makeppup1090

3.5 - TEST

Code: [Select]
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.
Code: [Select]
sudo useradd --system ppup1090 


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

Code: [Select]
sudo nano /lib/systemd/system/ppup1090.service

4.3 - Copy-paste following code in this blank file

IF USING DUMP1090-FA
Code: [Select]
# 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
Code: [Select]
# 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

Code: [Select]
sudo systemctl enable ppup1090.service 

sudo systemctl restart ppup1090

.

4.5 - Check status after few minutes
Code: [Select]
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
Code: [Select]
sudo systemctl restart ppup1090   

sudo systemctl stop ppup1090   

sudo systemctl status ppup1090 

« Last Edit: December 21, 2019, 04:17:52 AM by abcd567 »