Skip to content

Building readsb from source

wiedehopf edited this page Jul 28, 2020 · 47 revisions

Install required packages:

sudo apt update
sudo apt install -y git build-essential debhelper libusb-1.0-0-dev
sudo apt install -y librtlsdr-dev librtlsdr0 pkg-config dh-systemd 
sudo apt install -y libncurses5-dev lighttpd

Install the rtl-sdr udev rules

wget -O /tmp/rtl-sdr.rules https://raw.githubusercontent.com/wiedehopf/adsb-scripts/master/osmocom-rtl-sdr.rules
sudo cp /tmp/rtl-sdr.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

Compile and install readsb:

cd /tmp
rm /tmp/readsb -rf
git clone --depth 1 https://github.com/Mictronics/readsb.git -b dev
cd readsb
sed -i -e 's/, libblade.*//' debian/control
rm -f ../readsb_*.deb
dpkg-buildpackage -b --build-profiles=rtlsdr --no-sign
sudo dpkg -i ../readsb_*.deb

If you want to use the --enable-biastee function, replace the line before the last one with this line:

dpkg-buildpackage -b --build-profiles=rtlsdr,biastee --no-sign

In your browser, use the IP address of your Pi and add /radar at the end to view the webinterface.

configuration:

sudo nano /etc/default/readsb
# make changes, save with Ctrl-O and enter, exit with Ctrl-X
sudo systemctl restart readsb

example configuration for net-only mode:

Change the RECEIVER_OPTIONS line to this:

RECEIVER_OPTIONS="--net-only --net-connector 192.168.2.7,30005,beast_in"

The IP address / port is where your beast data source is.

net-only: forward data from 127.0.0.1:30005 to 192.168.2.7:30004

RECEIVER_OPTIONS="--net-only --net-connector 127.0.0.1,30005,beast_in --net-connector 192.168.2.7,30004,beast_reduce_out"

wiedehopf's dev branch

Only use this if you really know what you're doing and need this branch for some reason.

Extra packages required:

sudo apt install zlib1g-dev zlib1g

Get the source, compile and install it:

cd /tmp
rm /tmp/readsb -rf
git clone --depth 1 https://github.com/wiedehopf/readsb.git -b dev
cd readsb
rm -f ../readsb_*.deb
dpkg-buildpackage -b --build-profiles=rtlsdr --no-sign
sudo dpkg -i ../readsb_*.deb

replacing the binary with my experimental version:

sudo apt install zlib1g-dev zlib1g
cd /tmp
rm /tmp/readsb -rf
git clone --depth 1 https://github.com/wiedehopf/readsb.git -b dev
cd readsb
make -j3 HISTORY=yes RTLSDR=yes
sudo rm /usr/bin/readsb
sudo cp readsb /usr/bin/readsb
sudo systemctl restart readsb

alpha alpha

sudo apt install -y zlib1g-dev zlib1g librtlsdr-dev librtlsdr0 git build-essential libusb-1.0-0-dev libncurses5-dev
cd /tmp
rm /tmp/readsb -rf
git clone --depth 1 https://github.com/wiedehopf/readsb.git --single-branch -b sid
cd readsb
make RTLSDR=yes
sudo mv /usr/bin/readsb /tmp/oldbin
sudo cp readsb /usr/bin/readsb
sudo systemctl restart readsb
Clone this wiki locally