Raspberry Pi 2 Install

What’s the best way to install and configure a RPi 2…
I want to intall PiAware (FlightAware Client) + FlightRadar24 Client + RadarBox24 Client + PlaneFinder client
Can this be done??

I have been reading about new dump1090 and dump1090 mutability… which is bettter??
Do both decoder software’s work well with all the clients??

Any help will be apreciated

:smiley: :smiley: :smiley:

Hi.
IMHO dump1090-mutability is better.
I use in same time PiAware (FlightAware Client) and raspberry_pi2 client (feed.flightradar24.com/#raspberry_pi) for FlightRadar24 with dump1090-mutability.

UPD: I can’t find RadarBox24 Client for raspberry.
UPD2: I was successfully setup PlaneFinder client (client.planefinder.net/pfclient-pi-install.pdf). Setup and config spend only 2 minutes. Now I use clients for FlightAware, FlightRadar24 and RadarBox24 in same time on my Raspberry Pi2.

How to set radarbox24 on rpi?

Why do you say mutability is better?

How did you do you’re installation??
Can you share the steps you followed to install all the software?
Do you have the latest Piaware client? (Allow MLAT)…

Here’s a comparison of the versions of dump1090 and dump1090-mutability I have installed.

dump1090 options list:

root@volumio:~/dump1090# ./dump1090 --help
–device-index Select RTL device (default: 0).
–gain Set gain (default: max gain. Use -100 for auto-gain).
–enable-agc Enable the Automatic Gain Control (default: off).
–freq Set frequency (default: 1090 Mhz).
–ifile Read data from file (use ‘-’ for stdin).
–interactive Interactive mode refreshing data on screen.
–interactive-rows Max number of rows in interactive mode (default: 15).
–interactive-ttl Remove from list if idle for (default: 60).
–raw Show only messages hex values.
–net Enable networking.
–net-only Enable just networking, no RTL device or file used.
–net-ro-port TCP listening port for raw output (default: 30002).
–net-ri-port TCP listening port for raw input (default: 30001).
–net-http-port HTTP server port (default: 8080).
–net-sbs-port TCP listening port for BaseStation format output (default: 30003).
–no-fix Disable single-bits error correction using CRC.
–no-crc-check Disable messages with broken CRC (discouraged).
–aggressive More CPU for more messages (two bits fixes, …).
–stats With --ifile print stats at exit. No other output.
–onlyaddr Show only ICAO addresses (testing purposes).
–metric Use metric units (meters, km/h, …).
–snip Strip IQ file removing samples < level.
–debug Debug mode (verbose), see README for details.
–help Show this help.

dump1090-
Debug mode flags: d = Log frames decoded with errors
D = Log frames decoded with zero errors
c = Log frames with bad CRC
C = Log frames with good CRC
p = Log frames with bad preamble
n = Log network debugging info
j = Log frames to frames.js, loadable by debug.html.

dump1090-mutability options list:

root@volumio:~/dump1090# dump1090-mutability --help

dump1090 ModeS Receiver dump1090-mutability v1.14
–device-index Select RTL device (default: 0)
–gain Set gain (default: max gain. Use -10 for auto-gain)
–enable-agc Enable the Automatic Gain Control (default: off)
–freq Set frequency (default: 1090 Mhz)
–ifile Read data from file (use ‘-’ for stdin)
–interactive Interactive mode refreshing data on screen
–interactive-rows Max number of rows in interactive mode (default: 15)
–interactive-ttl Remove from list if idle for (default: 60)
–interactive-rtl1090 Display flight table in RTL1090 format
–raw Show only messages hex values
–net Enable networking
–modeac Enable decoding of SSR Modes 3/A & 3/C
–net-only Enable just networking, no RTL device or file used
–net-bind-address IP address to bind to (default: Any; Use 127.0.0.1 for private)
–net-http-port HTTP server port (default: 8080)
–net-ri-port TCP raw input listen port (default: 30001)
–net-ro-port TCP raw output listen port (default: 30002)
–net-sbs-port TCP BaseStation output listen port (default: 30003)
–net-bi-port TCP Beast input listen port (default: 30004)
–net-bo-port TCP Beast output listen port (default: 30005)
–net-fatsv-port FlightAware TSV output port (default: 10001)
–net-ro-size TCP output minimum size (default: 0)
–net-ro-interval TCP output memory flush rate in seconds (default: 0)
–net-heartbeat TCP heartbeat rate in seconds (default: 60 sec; 0 to disable)
–net-buffer TCP buffer size 64Kb * (2^n) (default: n=0, 64Kb)
–net-verbatim Do not apply CRC corrections to messages we forward; send unchanged
–lat Reference/receiver latitude for surface posn (opt)
–lon Reference/receiver longitude for surface posn (opt)
–max-range Absolute maximum range for position decoding (in nm, default: 300)
–fix Enable single-bits error correction using CRC
–no-fix Disable single-bits error correction using CRC
–no-crc-check Disable messages with broken CRC (discouraged)
–phase-enhance Enable phase enhancement
–aggressive More CPU for more messages (two bits fixes, …)
–mlat display raw messages in Beast ascii mode
–stats With --ifile print stats at exit. No other output
–stats-every Show and reset stats every seconds
–onlyaddr Show only ICAO addresses (testing purposes)
–metric Use metric units (meters, km/h, …)
–snip Strip IQ file removing samples < level
–debug Debug mode (verbose), see README for details
–quiet Disable output to stdout. Use for daemon applications
–ppm Set receiver error in parts per million (default 0)
–no-decode Don’t decode the message contents beyond the minimum necessary
–write-json Periodically write json output to (for serving by a separate webserver)
–write-json-every Write json output every t seconds (default 1)
–json-location-accuracy Accuracy of receiver location in json metadata: 0=no location, 1=approximate, 2=exact
–oversample Enable oversampling at 2.4MHz
–help Show this help

Debug mode flags: d = Log frames decoded with errors
D = Log frames decoded with zero errors
c = Log frames with bad CRC
C = Log frames with good CRC
p = Log frames with bad preamble
n = Log network debugging info
j = Log frames to frames.js, loadable by debug.html

As can bee seen, the dump1090-mutability is more powerfull one.

The additional options “–fix --aggressive --phase-enhance --oversample --modeac” provide more aircrafts for me.
UPD: --oversample option exclude the use of --modeac option. Thnx to dschaper for advice.

Yes.

root@volumio:~# piaware -v
2.1-2

I’ll write later.

Best regards,
Serge.

Oversample disables modeac on my setup, when I start the daemon I get a warning that no ModeA/C with be decoded and the modeac switch is ignored. And I’m not sure aggressive mode is that reliable, I think Oliver mentioned that it tends to generate false positives.

I was adds a "–oversample " in the script directly and did not see the response on screen. And I was checked in terminal session and message “Warning: --modeac is currently ignored when --oversample is used;” appear. Thanks a lot for the tip.

Best regards,
Serge

A little late to the party here, but my $.03 worth is it depends on what you want to do. If you just want to plug it in and send data to FA, then download their image and run with it. It is a good starting place. If you want to get deeper into the performance and intricacies of the RPi, mutability makes a better gateway. Think of it as the difference between an automatic and a stick. Have another SD card handy and use multiple images. And then there is a second RPi and dongle ($65 or so). Welcome to the slippery slope and enjoy. :slight_smile:

Well, time to start.

  1. Prepare Raspberry Pi2.
    1.1. Get image of raspbian here and unzip 2015-05-05-raspbian-wheezy.img image file.
    1.2. Write image file to your card, insert card in Raspberry Pi2, connect LAN cable and USB power cord.
    1.3. Wait about a half minutes while green LED stop blinking. Open PuTTY terminal.
    1.4. Connect with hostname raspberrypi, port 22, connection type SSH.
    1.5. Login with user pi and password raspberry :


login as: pi
pi@raspberrypi's password:
Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

NOTICE: the software on this Raspberry Pi has not been fully configured. Please run 'sudo raspi-config'

pi@raspberrypi ~ $


1.6. Make minimal configuration:


sudo raspi-config

→ expand filesystem → finish → reboot (you can run sudo raspi-config later to config other options).
1.7. Connect to raspberry Pi2 via SSH again.
1.8. Update and upgrade


sudo apt-get update && sudo apt-get upgrade

Now your Raspbian operation system is ready.

  1. Install dump1090-mutability.
    2.1. Set up the repository:

wget https://github.com/mutability/mutability-repo/releases/download/v0.1.0/mutability-repo_0.1.0_armhf.deb


sudo dpkg -i mutability-repo_0.1.0_armhf.deb

2.3. Install and upgrade dump1090-mutability:


sudo apt-get update && sudo apt-get install dump1090-mutability

2.4. Configure dump1090-mutability:


sudo dpkg-reconfigure dump1090-mutability

Remain all in default, but:
Start dump1090 automatically? <Yes>
RTL-SDR frequency correction, in PPM: <type your frequency correction value if you know it or remain 0> (If interesting - I write later how to calculate your RTL-SDR ppm correction value).
Enable oversampling at 2.4MHz? <Yes> **UPD: **(If you want to decode Mode A/C messages - type becаuse of –oversampling and –modeac options can’t work together).
Aggressively fix more errors? <No>. (To your decision, take a look to posts below).
Absolute maximum range of receiver, in nautical miles: <500> **UPD: *(very rare at this frequency are propagation over long distances, I was 400+ miles away, so IMHO it is best to type 500).
Latitude of receiver, in decimal degrees: <Type your location latitude>.
Llongtitude of receiver, in decimal degrees: <Type your location longtitude>.
Port for internal webserver (0 disables): <8090> (choose your own, I prefer 8090).
Interface address to bind to (blank for all interfaces): <> (blank, or you can’t see dump1090-mutability web GUI on another computer).
Directory to write JSON aircraft state to: <> (blank).
Extra arguments to pass to dump1090: <> UPD: (blank, or type *<–modeac>
if you want to decode Mode A/C messages, but in this case, the option “Oversampling at 2.4MHz” will not work).
2.5. Reboot your Raspberri Pi2:


sudo reboot

Now your Raspberry ready to decode ADBS message.

  1. Maid fly.
    3.1. Plug in your RTL-SDR adapter in USB, connect to Raspberry Pi2 via SSH terminal and run:

/usr/bin/dump1090-mutability

You will see something like this:


pi@raspberrypi ~ $ /usr/bin/dump1090-mutability
Mon Jul 27 14:44:41 2015 UTC  dump1090-mutability v1.14 starting up.
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000119 (currently selected)
Found Elonics E4000 tuner
Max available gain is: 42.00 dB
Setting gain to: 42.00 dB
Exact sample rate is: 2000000.052982 Hz
Gain reported by device: 42.00 dB


Congratulations! Your dump1090-mutability is on duty!

If you connect your antenna, you can see decoded adsb messages in terminal window.

3.2. Press Ctrl-C to close dump1090-mutability.
3.3. Start dump1090-mutability daemon with options configured in 2.4.:


sudo /etc/init.d/dump1090-mutability start

3.4. Check dump1090-mutability daemon is working:


ps ax | grep dump1090

You will see something like this:


pi@raspberrypi ~ $ ps ax | grep dump1090
 3433 ?        S<l    1:02 /usr/bin/dump1090-mutability --net --ppm <your ppm correction or 0> --fix --phase-enhance --aggressive --lat <your latitude> --lon <your longtitude> --max-range 1000 --net-http-port <your port> --net-ri-port 30001 --net-ro-port 30002 --net-bi-port 30004 --net-bo-port 30005 --net-sbs-port 30003 --net-fatsv-port 10001 --net-heartbeat 60 --net-ro-size 500 --net-ro-interval 1 --net-buffer 2 --stats-every 3600 --write-json-every 1 --json-location-accuracy 1 --quiet --modeac
 3438 pts/0    S+     0:00 grep --color=auto dump

  1. Check map view.
    4.2. Open in browser

http://raspberrypi:port

, where port is port for internal webserver from 2.4. (in my case _http://raspberrypi:8090/) and you will see map view with aircrafts (i hope).

Congratulations! You are ready to feed your data!

  1. Feed your data to Flightaware.
    5.1. Install piaware:

wget http://flightaware.com/adsb/piaware/files/piaware_2.1-2_armhf.deb


sudo dpkg -i piaware_2.1-2_armhf.deb


sudo apt-get install -fy


sudo piaware-config -autoUpdate 1 -manualUpdate 1

5.2. Configure piaware for your Flightaware account:


sudo piaware-config -user <your_flightaware_usernae> -password

For example for me: sudo piaware-config -user Serge77 -password
5.3. Enter your password when prompted.
5.4. Start piaware:


sudo /etc/init.d/piaware restart

5.5. Login to flightaware, go to “My ADS-B”, expand “Log” and you will see something like this:

[2015-07-27 20:15 MSK] autoUpdate in adept config is enabled, allowing update
[2015-07-27 20:15 MSK] manualUpdate in adept config is enabled, allowing update
[2015-07-27 20:15 MSK] multilateration support enabled (use piaware-config to disable)
[2015-07-27 20:15 MSK] ADS-B data program ‘dump1090-mutab’ is listening on port 30005, so far so good
[2015-07-27 20:15 MSK] Starting faup1090: /usr/bin/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005
[2015-07-27 20:15 MSK] Started faup1090 (pid 5467) to connect to dump1090-mutab
[2015-07-27 20:15 MSK] Receiver location changed, restarting faup1090
[2015-07-27 20:15 MSK] reconnecting to dump1090-mutab
[2015-07-27 20:15 MSK] ADS-B data program ‘dump1090-mutab’ is listening on port 30005, so far so good
[2015-07-27 20:15 MSK] Starting faup1090: /usr/bin/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --lat 55.778 --lon 37.457
[2015-07-27 20:15 MSK] Started faup1090 (pid 5469) to connect to dump1090-mutab
[2015-07-27 20:16 MSK] 3 msgs recv’d from dump1090-mutab; 3 msgs sent to FlightAware

  1. Feed your data to Flight24.
    6.1. Сonfigure the repository, importing keys:

gpg --keyserver pgp.mit.edu --recv-keys 40C430F5


gpg --armor --export 40C430F5 | sudo apt-key add -

6.2. Open file /etc/apt/sources.list


sudo nano /etc/apt/sources.list

6.2. And add following line


deb http://repo.feed.flightradar24.com flightradar24 raspberrypi-stable

to the end of file.
6.3. Update and install fr24 feeder:


sudo apt-get update && sudo apt-get install fr24feed

6.4. Sign up your fr24 feeder:


fr24feed --signup

Step 1.1 - Enter your email address (username@domain.tld)
$:

Step 1.2 - If you used to feed FR24 with ADS-B data before enter your sharing key.
If you don’t remember your sharing key, pelase use the retrival form:
feed.flightradar24.com/forgotten_key.php
$: (If you don’t remember your sharing key, press Ctrl-C to close sign up process. When you retrive your key, just start from 6.4. again).

Step 1.3 - Would you like to participate in MLAT calculations? (yes/no)
$: (I’m describe later why turn off mlat in this step UPD: Take a look at 8.1.)

Would you like to use autoconfig (yes/no)
$:

Step 4.1 - Receiver selection:

1 - DVBT Stick (USB)

2 - SBS1, SBS1er or SBS3 (USB/Network)
3 - ModeS Beast (USB/Network)
4 - AVR Compatible (DVBT over network, etc)
5 - microADSB (USB/Network)

Enter your receiver type (1-5)
$:<3>

Step 4.2 - Please select connection type:

1 - Network connection
2 - USB directly to this computer

Enter your connection type (1-2)
$:<1>

Step 4.3A - Please enter your receiver’s IP address/hostname
$:<127.0.0.1>

Step 4.3B - Please enter your receiver’s data port number
$:<30005> (as used in dump1090-mutability)

Step 5.1 - Would you like to enable RAW data feed on port 30334 (yes/no)
$:

Step 5.2 - Would you like to enable Basestation data feed on port 30003 (yes/no)
$:

Step 6A - Please select desired logfile mode:
0 - Disabled
1 - 48 hour, 24h rotation
2 - 72 hour, 24h rotation
Select logfile mode (0-2)
$:<2>

Step 6B - Please enter desired logfile path (/var/log):
$:

After this step error occured:
Submitting form data…ERROR
Unfortunately registering by airport-id is broken in this version, please enter latitude/longitude instead, sorry!
Would you like to try again?
Saving settings to /etc/fr24feed.ini…OK
Settings saved, please run “sudo service fr24feed restart” to use new configuration.Unfortunately registering by airport-id is broken in this version, please enter latitude/longitude instead, sorry!

Don’t panic, move on.

6.5. Restart fr24feed daemon:


sudo service fr24feed restart

6.6. Check fr24feed status:


sudo service fr24feed status

adn you will see:

pi@raspberrypi ~ $ sudo service fr24feed status
ok ] FR24 Feeder/Decoder Process: running.
ok ] FR24 Stats Timestamp:.
[FAIL] FR24 Link: unknown … failed!
[FAIL] Receiver: down … failed!
[FAIL] FR24 MLAT: not running … failed!

Don’t warry about fails, in some seconds fr24feed connect to piaware feed and status will look like this:

pi@raspberrypi ~ $ sudo service fr24feed status
ok ] FR24 Feeder/Decoder Process: running.
ok ] FR24 Stats Timestamp: 2015-07-28 10:53:01.
[FAIL] FR24 Link: connecting … failed!
ok ] Receiver: connected (861 MSGS/0 SYNC).
[FAIL] FR24 MLAT: not running … failed!

And, finally, fr24feed start communicate with fr24 server and status will look like this:

pi@raspberrypi ~ $ sudo service fr24feed status
ok ] FR24 Feeder/Decoder Process: running.
ok ] FR24 Stats Timestamp: 2015-07-28 10:54:01.
ok ] FR24 Link: connected [UDP].
ok ] FR24 Radar: T-UUEE37.
ok ] FR24 Tracked AC: 23.
ok ] Receiver: connected (6950 MSGS/0 SYNC).
[FAIL] FR24 MLAT: not running … failed!

Congratulation! Your data feeding to FR24 and to FlightAware in same time!

  1. Feed your data to Plane Finder.
    7.1. Take a look at client.planefinder.net/pfclient_ … _armhf.deb.
    7.2. Download Plane Finder client (here the 3.0.2080 is current version, change it if in 7.1. you see the another one):

wget http://client.planefinder.net/pfclient_3.0.2080_armhf.deb

7.3. Install Plane Finder client:


sudo dpkg -i pfclient_3.0.2080_armhf.deb

7.4. Open raspberrypi:30053 on your browser.

7.5. Enter your , and .

7.6. If you don’t have sharecode, press “Create a new sharecode” and you will receive email with sharecode.

7.7. If you have sharecode, press “I already have a sharecode!”, fill , and and press “Assign sharecode” and page “Receiver data format” will open.

7.8. Select “Beast”, fill IP address:127.0.0.1 , port:30005 and press “Complete configuration”.

7.9. Open raspberrypi:30053/map.html and (I hope) you’ll see arcrafts.

Final check:



pi@raspberrypi ~ $ ps ax | grep dump1090
 1949 ?        S<l   13:05 /usr/bin/dump1090-mutability --net --ppm 22 --fix --phase-enhance --lat 55.xx --lon 37.xx --max-range 1000 --net-http-port 8090 --net-ri-port 30001 --net-ro-port 30002 --net-bi-port 30004 --net-bo-port 30005 --net-sbs-port 30003 --net-fatsv-port 10001 --net-heartbeat 60 --net-ro-size 500 --net-ro-interval 1 --net-buffer 2 --stats-every 3600 --write-json-every 1 --json-location-accuracy 1 --quiet --modeac
 2603 pts/0    S+     0:00 grep --color=auto dump1090

pi@raspberrypi ~ $ ps ax | grep pfc
 2117 ?        Sl     0:06 /usr/bin/pfclient -d -i /var/run/pfclient.pid -z /etc/pfclient-config.json -y /var/log/pfclient $
 2591 pts/0    S+     0:00 grep --color=auto pfc

pi@raspberrypi ~ $ ps ax | grep fr24
 2171 ?        Sl     0:08 /usr/bin/fr24feed -- --monitor-file=/dev/shm/fr24feed.txt --write-pid=/var/run/fr24feed.pid --quiet --log-base=/var/log/fr24feed --log-rotate=2
 2593 pts/0    S+     0:00 grep --color=auto fr24

pi@raspberrypi ~ $ ps ax | grep piaware
 2148 ?        Sl     0:10 /usr/bin/piaware -p /var/run/piaware.pid
 2598 pts/0    S+     0:00 grep --color=auto piaware

Congratulation! Your data feeding to FR24, FlightAware and Plane Finder in same time!

UPD:

  1. MLAT on fr24feed together with piaware MLAT.
    8.1. Temporary removed.

Best regards,
Serge

Can you explain in more detail why you have the 2 following setting set to this?

Enable oversampling at 2.4MHz? (–oversampling and --modeac options can’t work together).
Aggressively fix more errors? .

Because I run oversampling and I have it set to “No” on errors.

Thanks I just want to make sure thing are setup the best way.

I know people a least months ago that run oversampling.

Thanks.

Oversampling disables Mode A/C decoding. (If you use both --oversample and --modeac you’ll get a log warning stating that --modeac is being ignored.)

Edit: I’m to understand that --aggressive isn’t the best way to run, that instead --fix and --phase-enhance are better, aggressive is prone to errors in the 2 bit error correction. I’m wondering about the 1000 nm range also?

Why do you care about mode A/C aircraft? If you do, go for no. But to you really care (at the expense of picking up fewer useable positions)? If you don’t care about A/C, enable oversample.

Aggressive will cause some bad data to be considered good. That means you could randomly report incorrect positions, or see the wrong alt, squawk.
As I understand it, the newer piaware has additional checks to help discard the bad data, but why try to give it more bad data to throw away?

Also, it might be worth it to build the latest Dump1090-mut from source. The new version (currently not available packaged) has additional features.

I think this is an example of why you shouldn’t use aggressive. If he is seeing aircraft that far away, he is working with bad data.

I wouldn’t waste your time past 300 miles.

I am running Dump1090-Mut V1.15

I ran Oversampling 2.4 on my one setup and i have the Aggressively fix more errors set to “NO”

I just want to make sure it’s setup the right way…

So your saying it’s better to do the 2.4 oversampling and have the Aggressively fix more errors set to “NO”?

As it’s been explained to me, the Android feeder runs with --fix (one bit error correction). So no to --agressive, but okay for --fix and --oversample.

FWIW this is how I run on a Pi 2 with lighttpd handling the web interface (I have a bad antenna location so I have the range cut down just to make sure I’m not feeding singletons outside of what I know is my range:


/usr/bin/dump1090-mutability --gain -10 --net --oversample --net-http-port 0 --net-ri-port 0 --fix --net-bi-port 30004 --net-bo-port 30005 --net-fatsv-port 10001 --net-ro-size 500 --net-ro-interval 1 --net-heartbeat 60 --net-buffer 2 --lat 33.xxxxx --lon -117.xxxx --max-range 250 --phase-enhance --mlat --stats-every 3600 --quiet --ppm 20 --write-json /run/dump1090 --write-json-every 1 --json-location-accuracy 2 --dcfilter --measure-noise


I was taken 400+ miles away on PC running modesdeco2 decoder program with no error correction and with --filter_count 4 option so modesdeco2 count minimum 4 correct messages before starting place track on map.

Messages can be received entirely correctly with no errors and still have bad positions (due to the transponder providing bad data). This is the type of error that --max-range helps suppress. If you specify a large max-range then you will see more of this type of errors.

–aggressive is IMO a poor tradeoff - the undetected error rate goes up a lot for few additional messages - but it’s your call.

I think I agree with you. Error rate was increase till 2015-07-21 - take a look at a sample of position and altitude errors in the database:
http://0tetz.com/ads-b/20150728/DB_errors_view.png

In the same time single errors not indicates on map, I think there is an algorithm that cutoff obvious errors:
http://0tetz.com/ads-b/20150728/VRS_view.png

UPD: I was remove --aggressive option and will watch what happens.
UPD2: Added FR24 feed setup in post above.
UPD3: Added PlaneFinder feed setup in post above.

Best regards,
Serge

It’s strange for me that you set gain -10dB. What kind of RTL-SDR stick in your setup?