Skip to content

Automatic installation for readsb

wiedehopf edited this page Feb 10, 2024 · 55 revisions

Compile / install script for https://github.com/wiedehopf/readsb

Features

  • installs wiedehopf's readsb (fork of readsb / dump1090-fa)

  • change gain and location using easy commands

  • automatically reconfigures fr24feed/rbfeeder so they work with this standalone decoder (if installed)

  • removes other decoders (dump1090-mutability / dump1090-fa .. local skyaware interface won't be available anymore, use /tar1090 which comes with this installation) (only one decoder can use the SDR)

  • not for piaware sd-card installs but you can try this: https://github.com/wiedehopf/adsb-wiki/wiki/dump1090-fa-to-readsb-binary-swap

Installation

To install readsb, run the following command to start the install script:

sudo bash -c "$(wget -O - https://github.com/wiedehopf/adsb-scripts/raw/master/readsb-install.sh)"
sudo reboot

Notes:

  • rtl-sdr v4 will require driver installation AFTER running this script, otherwise no reception debian/raspbian drivers don't work for the v4
  • A reboot is only necessary for systems that haven't run rtl-sdr stuff before, you can omit it when updating or if you previously used a different decoder.
  • Don't forget to set your location as described below!
  • Don't forget to set the gain as described below!

Update

Same script as installation:

sudo bash -c "$(wget -O - https://github.com/wiedehopf/adsb-scripts/raw/master/readsb-install.sh)"

Web Interface

If you get Connection refused, install lighttpd:

sudo apt install -y lighttpd

Then rerun this install or the tar1090 install.

Optionally add other interfaces:

Changing gain:

Manual Command:

sudo readsb-gain 43.9
OR
sudo /usr/local/bin/readsb-gain 43.9

Configure location

Use this command specifying latitude, then longitude:

sudo readsb-set-location 50.12344 10.23429
OR
sudo /usr/local/bin/readsb-set-location 50.12344 10.23429

Issues / Check the log:

sudo journalctl --no-pager -u readsb
  • If you have any issues, try a reboot an rerun the install script.
  • Otherwise you can open an issue here on github with the above log and the output of the install script included
  • If you would rather report the issue via discord, contact wiedehopf here: https://discord.gg/DxU4VG37JS

Change the configuration:

sudo nano /etc/default/readsb

make changes, save with Ctrl-O and enter, exit with Ctrl-X then restart the service:

sudo systemctl restart readsb

For available options see:

readsb --help

airspy-conf

If you have an airspy, just run the airspy-conf script after installing readsb, DON'T add extra connection in readsb the data is fed into readsb by airspy_adsb. https://github.com/wiedehopf/airspy-conf#airspy-conf

Uninstall

sudo systemctl disable --now readsb
sudo /usr/local/share/tar1090/uninstall.sh

Note that this script might have changed the fr24feed and rbfeeder configuration. Those configurations won't be restored by the uninstall, you'll have to reconfigure them yourself if you want to use the builtin decoder of either of them. I'd recommend against that, if readsb for some reason doesn't work for you or causes issues and that's the reason for the uninstall, try dump1090-fa: https://github.com/wiedehopf/adsb-scripts/wiki/Automatic-installation-for-dump1090-fa

bias tee

https://github.com/wiedehopf/adsb-wiki/wiki/RTL-Bias-Tee

Kernel driver is active, or device is claimed by second instance of librtlsdr.

Run these commands:

echo -e 'blacklist rtl2832\nblacklist dvb_usb_rtl28xxu\nblacklist rtl8192cu\nblacklist rtl8xxxu\n' | sudo tee /etc/modprobe.d/blacklist-rtl-sdr.conf
sudo reboot

If this doesn't fix your issue, something else is using the SDR. If you don't know what it is, start over with a fresh Raspbian image.

Debugging memory issues

wget -O /tmp/readsb-install.sh https://github.com/wiedehopf/adsb-scripts/raw/master/readsb-install.sh
sudo bash /tmp/readsb-install.sh sanitize

Remote data source (radarcape or similar): Configure net-only and a receiver with another IP address as a data source

Not for the airspy ... don't just run this unless your receiver is a different computer than the one you're installing readsb on.

sudo sed -i -e 's/RECEIVER_OPTIONS.*/RECEIVER_OPTIONS="--net-only --net-connector 192.168.2.7,30005,beast_in"/' /etc/default/readsb
sudo systemctl restart readsb

Change 192.168.2.7 to the correct IP address and 30005 to the correct port if the beast data are available on another port.

DON'T connect to 127.0.0.1:30005, that will create a data loop.