Please read: https://flightaware.com/adsb/piaware/install
https://www.adsbexchange.com/how-to-feed/
Hardware requirements:
– USB RTL-SDR RTL2832U + R820T
– Antenna (stock or ADSB antenna)
Installation of piaware (it needs lighttpd for the skyview to work).
$ wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.7.1_all.deb
$ sudo dpkg -i piaware-repository_3.7.1_all.deb
Sample output:
$ wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.7.1_all.deb
Resolving flightaware.com (flightaware.com)... 70.42.6.250
Connecting to flightaware.com (flightaware.com)|70.42.6.250|:.. connected.
HTTP request sent, awaiting response... 200 OK
Length: 5336 (5.2K) [application/x-debian-package]
Saving to: ‘piaware-repository_3.7.1_all.deb’
piaware-reposit 100%[====>] 5.21K --.-KB/s in 0.1s
2019-06-16 12:14:56 (52.1 KB/s) - ‘piaware-repository_3.7.1_a
ll.deb’ saved [5336/5336]
Selecting previously unselected package piaware-repository.
(Reading database ... 139106 files and directories currently
installed.)
Preparing to unpack piaware-repository_3.7.1_all.deb ...
Unpacking piaware-repository (3.7.1) ...
Setting up piaware-repository (3.7.1) ...
Update the repo cache and install piaware:
$ sudo apt-get update
$ sudo apt-get install piaware
Sample output:
$ sudo apt-get install piaware
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
itcl3 tcl tcl-tls tcl8.6 tcllib tclx8.4
Suggested packages:
itcl3-doc dump1090-fa dump978-fa tcl-tclreadline
tcllib-critcl tclx8.4-doc
The following NEW packages will be installed:
itcl3 piaware tcl tcl-tls tcl8.6 tcllib tclx8.4
0 upgraded, 7 newly installed, 0 to remove and 1 not upgraded
.
Need to get 7,341 kB of archives.
After this operation, 29.0 MB of additional disk space will b
e used.
Do you want to continue? [Y/n] y
...
Setting up tcl8.6 (8.6.6+dfsg-1) ...
Processing triggers for systemd (232-25+deb9u11) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for rsyslog (8.24.0-1) ...
Setting up tcl (8.6.0+9) ...
Setting up tcllib (1.18-dfsg-3) ...
Setting up tclx8.4 (8.4.1-2) ...
Setting up piaware (3.7.1) ...
Created symlink /etc/systemd/system/default.target.wants/piaware.service → /lib/systemd/system/piaware.service.
Created symlink /etc/systemd/system/piaware.service.wants/generate-pirehose-cert.service → /lib/systemd/system/generate-pi
rehose-cert.service.
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for systemd (232-25+deb9u11) ...
Processing triggers for rsyslog (8.24.0-1) ...
Install dump1090-fa:
sudo apt-get install dump1090-fa
Sample output:
$ sudo apt-get install dump1090-fa
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
dump1090-fa
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded
.
Need to get 2,244 kB of archives.
After this operation, 14.2 MB of additional disk space will b
e used.
Get:1 http://flightaware.com/adsb/piaware/files/packages stre
tch/piaware armhf dump1090-fa armhf 3.7.1 [2,244 kB]
Get:1 http://flightaware.com/adsb/piaware/files/packages stre
tch/piaware armhf dump1090-fa armhf 3.7.1 [2,244 kB]
Fetched 105 kB in 5min 36s (310 B/s)
Selecting previously unselected package dump1090-fa.
(Reading database ... 141382 files and directories currentlyi
nstalled.)
Preparing to unpack .../dump1090-fa_3.7.1_armhf.deb ...
Unpacking dump1090-fa (3.7.1) ...
Setting up dump1090-fa (3.7.1) ...
Adding user `dump1090' to group `plugdev' ...
Adding user dump1090 to group plugdev
Done.
Enabling lighttpd integration..
Enabling dump1090-fa: ok
Run "service lighttpd force-reload" to enable changes
Enabling lighttpd integration (stat cache)..
Enabling dump1090-fa-statcache: ok
Install dump978 (Stretch only):
$ sudo apt-get install dump978-fa
Sample output:
$ sudo apt-get install dump978-fa
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
skyview978 soapysdr-module-rtlsdr
The following NEW packages will be installed:
dump978-fa skyview978 soapysdr-module-rtlsdr
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded
.
Need to get 1,994 kB/2,126 kB of archives.
After this operation, 13.5 MB of additional disk space will $
e used.
Do you want to continue? [Y/n] y
...
Setting up dump978-fa (3.7.1) ...
Adding user `dump978' to group `plugdev' ...
Adding user dump978 to group plugdev
Done.
Created symlink /etc/systemd/system/default.target.wants/dump
978-fa.service → /lib/systemd/system/dump978-fa.service.
Setting up skyview978 (3.7.1) ...
Enabling lighttpd integration..
Enabling skyview978: ok
Note: If piaware wont start, it may be because that IPv6 is disabled in your kernel.
Remove all ipv6 entires in
/etc/hosts
Read: https://discussions.flightaware.com/t/problem-with-piaware-3-1-0/19222/9
The BUG:
Jun 16 15:03:16 pi piaware[30196]: creating pidfile /run/piaware/piaware.pid
Jun 16 15:03:16 pi piaware[30196]: ****************************************************
Jun 16 15:03:16 pi piaware[30196]: piaware version 3.7.1 is running, process ID 30196
Jun 16 15:03:16 pi piaware[30196]: #####################################################
Jun 16 15:03:16 pi piaware[30196]: *** buffer overflow detected ***: /usr/bin/piaware terminated
Jun 16 15:03:16 pi systemd[1]: piaware.service: Main process exited, code=killed, status=6/ABRT
After removing IPv6 entries in /etc/hosts, piaware runs successfully.
Sample output:
user@Pi~$ sudo systemctl status piaware
● piaware.service - FlightAware ADS-B uploader
Loaded: loaded (/lib/systemd/system/piaware.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2019-06-16 15:06:50 PST; 6s ago
Docs: https://flightaware.com/adsb/piaware/
Main PID: 31098 (piaware)
CGroup: /system.slice/piaware.service
├─31098 /usr/bin/piaware -p /run/piaware/piaware.pid -plainlog -statusfile /run/piaware/status.json
└─31125 /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout
Jun 16 15:06:54 pi piaware[31098]: Connection with adept server at piaware.flightaware.com/1200 established
Jun 16 15:06:55 pi piaware[31098]: TLS handshake with adept server at piaware.flightaware.com/1200 completed
Jun 16 15:06:55 pi piaware[31098]: FlightAware server certificate validated
Jun 16 15:06:55 pi piaware[31098]: encrypted session established with FlightAware
Jun 16 15:06:55 pi sudo[31126]: piaware : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/netstat --program --tcp --wide --all --numeric
Jun 16 15:06:55 pi sudo[31126]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 16 15:06:55 pi sudo[31126]: pam_unix(sudo:session): session closed for user root
Jun 16 15:06:55 pi piaware[31098]: piaware received a message from dump1090-fa!
Jun 16 15:06:56 pi piaware[31098]: logged in to FlightAware as user guest
Jun 16 15:06:56 pi piaware[31098]: my feeder ID is zzxxx-xasa-xxxx-zxxxz-xxzzxzxczxczx
user@Pi~$ sudo piaware-status
PiAware master process (piaware) is running with pid 31098.
PiAware ADS-B client (faup1090) is running with pid 31125.
PiAware ADS-B UAT client (faup978) is not running.
PiAware mlat client (fa-mlat-client) is not running.
Local ADS-B receiver (dump1090-fa) is running with pid 22567.
dump1090-fa (pid 22567) is listening for connections on port 30005.
no program appears to be listening for connections on port 30978.
faup1090 is connected to the ADS-B receiver.
faup978 is NOT connected to the ADS-B UAT receiver.
piaware is connected to FlightAware.
got 'couldn't open socket: connection refused'
dump1090 is producing data on localhost:30005.
Your feeder ID is zzxxx-xasa-xxxx-zxxxz-xxzzxzxczxczx (from /var/cache/piaware/feeder_id)
Piaware is now uploading data to flightaware, login to flightaware and claim your piaware device.
Visit your piaware page:
https://flightaware.com/adsb/stats/user/
READ More:
https://flightaware.com/adsb/piaware/build/optional#wifi
https://flightaware.com/adsb/piaware/advanced_configuration
I want to try using nginx for the skyview instead of the default lighttpd server, here are my configuration files for my LAN.
Nginx configuration (/etc/nginx/sites-enabled/piaware-dump1090.conf):
server {
server_name servername;
root /usr/share/dump1090-fa/html/;
listen 8090;
index index.html;
access_log /dev/null; #it generates huge logs, so I disabled it
error_log /var/nginx/piaware.error.log; #useful for debugging errors
# Fixes frames not working
add_header X-Frame-Options "ALLOW";
# someone verify if this is the correct way
location ~ /dump1090-fa/data/.*\.json$ {
add_header Access-Control-Allow-Origin *;
}
location /dump1090-fa/data/ {
alias /run/dump1090-fa/;
}
location /dump1090-fa {
alias /usr/share/dump1090-fa/html/;
}
location /data/ {
alias /run/dump1090-fa/;
}
}
Access skyview1090 at http://localhost:8090
Nginx configuration (/etc/nginx/sites-enabled/piaware-skyview978.conf):
server {
server_name servername;
root /usr/share/skyview978/html/;
listen 8978;
index index.html;
access_log /dev/null;
error_log /var/nginx/piaware.error.log;
location ~ /skyview978/data/.*\.json$ {
add_header Access-Control-Allow-Origin *;
}
location /skyview978/data/ {
alias /run/skyview978/;
}
location /data/ {
alias /run/skyview978/;
}
}
Access skyview978 at http://localhost:8978
If you want to change the default flightaware dump1090-fa html see the flightaware discussion: https://discussions.flightaware.com/t/skyview-customize-data-presentation/35576/14
I also use this customized dump1090 html files: https://github.com/alkissack/Dump1090-OpenLayers3-html
To use it, first we need to clone the repo and place it somewhere in /var/wwww
$ git clone https://github.com/alkissack/Dump1090-OpenLayers3-html
$ sudo mv Dump1090-OpenLayers3-html/public_html /var/www/
If you have problem
We now need to edit our nginx configurations, replace the default root location in dump1090 and dump978:
For dump1090 replace instances of
/usr/share/dump1090-fa/html/
to
/var/www/public_html/
For dump978 replace instances
/usr/share/skyview978/html/
to
/var/www/public_html/
Reload nginx server:
$ sudo systemctl reload nginx
Clear your browser cache and load the page again.
Note: You need to configure the
config.js
for the Lat and Long of your receiver and other things, please read the github wiki for more info.
Feeding data to ADS-B EXCHANGE
from: https://www.adsbexchange.com/how-to-feed/
Requires: git and socat
$ sudo apt install git socat
$ git clone https://github.com/adsbxchange/adsb-exchange.git
$ cd adsb-exchange
$ chmod +x setup.sh
$ sudo ./setup.sh
It will ask for Lat and Long, Elevation, port and feedername.
Note: After completing the setup do not delete this folder.
Check if it is running:
$ ps -ef|grep adsb
root 7860 1 0 21:46 pts/2 00:00:00 sudo nohup /home/pi/doing/RTL-SDR/piaware-adsb/adsb-exchange/adsbexchange-mlat_maint.sh
root 7865 7860 0 21:46 pts/2 00:00:00 /bin/sh /home/pi/doing/RTL-SDR/piaware-adsb/adsb-exchange/adsbexchange-mlat_maint.sh
root 7904 1 0 21:46 pts/2 00:00:00 sudo nohup /home/pi/doing/RTL-SDR/piaware-adsb/adsb-exchange/adsbexchange-netcat_maint.sh
root 7912 7904 0 21:46 pts/2 00:00:00 /bin/sh /home/pi/doing/RTL-SDR/piaware-adsb/adsb-exchange/adsbexchange-netcat_maint.sh
root 8283 7865 1 21:46 pts/2 00:00:00 /usr/bin/python3.5 /usr/bin/mlat-client --input-type dump1090 --input-connect localhost:30005 --lat 14 --lon 120 --alt 25m --user myusername --server feed.adsbexchange.com:31090 --no-udp --results beast,connect,localhost:30104
root 8348 7912 0 21:46 pts/2 00:00:00 /usr/bin/socat -u TCP:localhost:30005 TCP:feed.adsbexchange.com:30005
pi 8560 8141 0 21:47 pts/3 00:00:00 grep --color=auto adsb
Finding your feeder via username:
http://www.adsbexchange.com/coverage-6/?new
TODO: Read back fed data from ADS B Exchange.
© R1BNC, licensed under CC BY-SA 4.0 |