Skip to content

Raspbian Lite: ADS B receiver

wiedehopf edited this page Apr 13, 2024 · 109 revisions

Most of this guide also works on other Debian / Ubuntu systems:

1. Get Raspberry Pi OS Lite / Raspbian Lite and image to the sd-card

This guide also works with other Raspbian images, but there is really no need for a graphical interface.

Use the Raspberry Pi Imager to overwrite the sd-card with Raspbian Lite:

Sd-card is ready, get the pi up and running:

All logs you need should be available via journalctl and are stored in memory / lost on reboot. So to reduce disk writes to the sd-card it's advisable to remove rsyslog as it's not really needed:

sudo apt remove rsyslog -y

Using a different system like a laptop with Ubuntu or an pi24 image

  • The imaging part, booting the system and connecting via SSH is up to you in this case
  • Most stuff mentioned here should work similar
  • Feeding sites besides adsbexchange using a laptop is more complicated and can't be described here
  • graphs1090 and all the other utilities maintained by wiedehopf should work on all Debian based Linux systems
  • if you run a non Debian based Linux, some stuff probably won't work, the scripts for installing readsb and feeding adsbexchange should work on CentOS as well

2. Decoder to talk to the SDR (dump1090, readsb are ADS-B decoders)

2.1 Set location

  • For the local map and the graphs to have all functions it's important to set the location as described in whichever decoder you're using
  • After the automatic install of readsb you can use:
sudo readsb-set-location 50.12344 10.23429

Airspy users ONLY

After installing the decoder of your choice, run airspy-conf: https://github.com/wiedehopf/airspy-conf#airspy-conf

rtl-sdr v3 bias-t biastee

If you need to enable the bias-t on the rtl-sdr v3 SDR, try this: https://github.com/wiedehopf/adsb-wiki/wiki/RTL-Bias-Tee

3. Tar1090, webinterface with many more features than the dump1090-fa/SkyView interface:

https://github.com/wiedehopf/tar1090#tar1090

4. Feed sites of your choice using tar1090 / readsb global interface developed mostly by the author of this howto (recommended :) )

Should get you MLAT results on your local map if there are ModeS aircraft without ADS-B in your area and the coverage is sufficient.

5. Automatic gain optimization (optional, highly recommended)

If you don't want to optimize gain manually, install this and it will slowly get to the right setting: https://github.com/wiedehopf/adsb-scripts/wiki/Automatic-gain-optimization-for-readsb-and-dump1090-fa

6. Graphs1090: Get some proper statistics (optional)

https://github.com/wiedehopf/graphs1090#graphs1090

7. Other feed clients (optional)

When asked, specify a network Beast receiver IP 127.0.0.1 port 30005 (beast protocol). Specifying DVB-T will interfere with the decoder you already installed.

In case one of the feed clients (RB24, FR24) screws with your decoder, use the Automatic install script for the decoder again, it usually fixes your configuration for you.

The planefinder feed client usually doesn't interfere, same as always: don't install an extra dump1090, you already have a decoder.

8. Feed Flightaware (optional)

The steps below may look redundant, they are NOT. (there are issues with removing config files and them being not installed) Execute all of them!

wget -O /tmp/piaware-repo.deb https://flightaware.com/adsb/piaware/files/packages/pool/piaware/f/flightaware-apt-repository/flightaware-apt-repository_1.2_all.deb
sudo apt purge -y piaware-repository &>/dev/null
sudo rm -f /etc/apt/sources.list.d/piaware-*.list
sudo dpkg -i /tmp/piaware-repo.deb
sudo apt update
sudo apt install -y piaware

Once you are receiving aircraft on your local map for a couple of minutes, you can link it to your account if you're into that: https://flightaware.com/adsb/piaware/claim

See also: https://flightaware.com/adsb/piaware/install

If you're keen on keeping your stats, you'll have to use the feeder-id from the stats page you want to keep and configure piaware to use that id: https://discussions.flightaware.com/t/for-beginners-how-to-get-back-existing-station-number-in-a-fresh-install/30981/

Note that anything but armhf is not supported by flightaware. (Unsupported: aarch64, x86_64 (amd64) .....)

9. 978 / UAT (only used in the USA)

For a dual 1090 / 978 system add this stuff: https://github.com/wiedehopf/adsb-wiki/wiki/Dual-1090-978-setup

10. Feed FR24 (optional)

  • I'd recommend installing / updating fr24 like this without using their debian package:
  • (fr24feed package autoupdate has broken receivers on multiple occasions in the past, my install script only uses the binary from them and removes the autoupdater and scripting that is not necessary if you run a standalone decoder)
  • FR24 MLAT doesn't work on the raspberry pi, they recommend disabling it
sudo bash -c "$(wget -O - https://github.com/wiedehopf/adsb-scripts/raw/master/fr24-nopackage.sh)"

Note that anything but armhf is not supported by fr24. (Unsupported: aarch64, x86_64 (amd64) .....)

  • Configuration using this command (not necessary when updating):
sudo fr24feed --signup; sudo systemctl restart fr24feed
  • Choose settings as follows (if not mentioned, it's up to you to decide)
Would you like to use autoconfig $:
no

Step 1.3 - Would you like to participate in MLAT calculations? (yes/no)$:
no

Step 4.1 - Receiver selection:
Enter your receiver type (1-7)$:
4 (ModeS Beast ... yes really, no it doesn't matter what receiver you're actually running, this means a beast protocol connection to readsb, the decoder at the top of this guide)

Step 4.2 - Please select connection type:
Enter your connection type (1-2)$:
1 (Network ... yes really, it will connect to the decoder at the top of this guide using local loopback)

Step 4.3A - Please enter your receiver's IP address/hostname (127.0.0.1 is correct for everyone, means same computer)
127.0.0.1

Step 4.3B - Please enter your receiver's data port number
30005

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

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

Step 6 - Please select desired logfile mode:
0

  • If your tar1090 / dump1090-fa map is no longer working, you've done the configuration wrong, the easiest way to fix this is run one of the automatic scripts further up on this page to install readsb / dump1090-fa, they will fix up the configuration.

  • Check status / logs:

sudo fr24feed-status
sudo journalctl -u fr24feed --no-pager
  • Disabling / removing fr24feed:
sudo systemctl disable --now fr24feed

11. Other feed clients

If you're gonna install any other feed clients, NEVER select DVB-T / USB / SDR input. Your SDR is already being used by readsb, the decoder, it can't be used by some other software at the same time. Instead configure a 'network mode' or 'network input' and point them at 127.0.0.1:30005 (host 127.0.0.1 is the address for the current computer, 30005 is the port for the beast protocol, if the feed client needs AVR use port 30002 instead).

In case anything stops working, just rerun the install for the readsb decoder, i've designed the install script to fix common configuration errors with other feed clients.

Potential workaround losing network connectivity due to dhcpcd / wifi fix:

Static IP address

Static IP

Pihole websites not working, fix:

echo 'server.modules += ("mod_alias")' | sudo tee /etc/lighttpd/external.conf
sudo systemctl restart lighttpd

Disabling IPv6 (for IPv6 issues)

sudo tee /etc/sysctl.d/08-disable-ipv6.conf <<EOF
# disable IPv6
#
net.ipv6.conf.all.disable_ipv6 = 1
EOF
sudo reboot
Clone this wiki locally