Converting Non-Configurable, Non-Controlable dump1090-rb Into Fully User-Configurable, Systemd-Controlled App
When RadarBox24’s feeder software rbfeeder
is installed, it installs a binary /usr/bin/dump1090-rb
. This binary is actually clone of binary of dump1090-fa
.
However unlike dump1090-fa, the RadarBox24 supplied dump1090-rb is stripped-off of systemd service file, start file, config file and map like skyaware.
All the config parameters are hard-coded in the rbfeeder itself which, on it’s start, issues start command to the dump1090-rb binary, passing to it all the hard-coded parameters.
The only control users have over dump1090-rb is the choice if they want to use external decoder or dump1090-rb. This is done by the user changing setting network_mode=
in rbfeeder’s config file. If the choose network_mode=false
, rbfeeder starts it’s supplied dump1090-rb. If user chooses network_mode=true
, the rbfeeder does NOT start dump1090-rb and waits for data from external decoder on port 30005.
This attitude of keeping dump1090-rb un-configurable by users is very annoying if someone wants to use manual setting of gain, or choose adapative-gain.
In order to make dump1090-rb user-configurable, and start it by systemd service at boot / reboot and manually by user, I have written following bash script
sudo bash -c "$(wget -O - https://github.com/abcd567a/temp/raw/main/make-dump1090-rb-configurable.sh)"
The above bash script does following:
(1) In file /etc/rbfeeder.ini changes setting:
From
network_mode=false
To
network_mode=true
(2) Creates following systemd service file:
/lib/systemd/system/dump1090-rb.service
This systemd service file automatically starts dump1090-rb at boot and reboot. It also provides following commands, enabling user to manually stop, restart, and check status.
sudo systemctl status dump1090-rb
sudo systemctl restart dump1090-rb
sudo systemctl stop dump1090-rb
(3) Creates following user-editable cofig file for dump1090-rb config parameters:
/etc/default/dump1090-rb
The default contents of this user-editable file are as follows:
--gain 49.6
--device 0
--net
--net-ri-port 30001
--net-ro-port 30002
--net-sbs-port 30003
--net-bi-port 30004,30104
--net-bo-port 30005
--quiet
--write-json /var/run/dump1090-rb
--mlat
--forward-mlat
--modeac
--fix
--gnss
Highlights:
(a) The rbfeeder ran dump1090-rb with --write-json /dev/shm
.
The user-editable config file uses --write-json /var/run/dump1090-rb
. This helps in installing graphs1090 and tar1090.
(b) User can change default gain valu 49.6 to whatever value he wants (between 0 and 60) .
(c) If using more than one dongle, the user can change device index/serial from default “–device 0” to “–device nnnn” where nnnn is the serial number to which he has serialized his dump1090 dongle.
(d) User can add immediately below last line, following two lines:
--lat xx.xxxx
--lon yy.yyyy
(Replace xx.xxxx and yy.yyyy by your actual latitude and longitude)
(e) User can switch from a fixed value of gain to automatic adaptive gain control by adding following two lines in the file /etc/default/dump1090-rb
--adaptive-range
--adaptive-burst
graph1090 for Gain.
Before 20.00 hrs, Gain was set at fixed value 60 (not plotted by graphs1090)
At 20.00 hrs added following two lines to file /etc/default/dump1090-rb
--adaptive-range
--adaptive-burst
Graph below shows that when gain was changed from fixed 60 to adaptive at about 20 hrs, the messages > -3 dBFS dropped significantly
Click on Screenshot to See Larger Size
Click on Screenshot to See Larger Size
INSTALLED TAR1090:
As the dump1090-rb lacks map (no html folder, only binay), I decided to install tar1090 to provide the missing map.
Attempt to install tar1090 by running bash script at github/wiedehopf failed. Had to do following work-around:
(1) First installed package lighttpd
(2) AFTER installing package lighttpd, downloaded the installation script from GitHub - wiedehopf/tar1090: Provides an improved webinterface for use with ADS-B decoders readsb / dump1090-fa.
(3) AFTER downloading install script, issued sed command to modify the script and make it suitable for re-configured version of dump1090-rb.
(4) AFTER modifying installation script by sed command, run the modified installation script to install tar1090.
Given below are commands for all above 4 steps. These commands to be issueed in the same order as given below.
sudo apt install lighttpd
wget -O install-tar1090.sh https://github.com/wiedehopf/tar1090/raw/master/install.sh
sudo sed -i 's/dump1090-fa/dump1090-rb/g' install-tar1090.sh
sudo bash install-tar1090.sh
tar1090 with “DARK” mode ON (Default Setting)
tar1090 with “DARK” mode OFF
INSTALLED GRAPHS1090:
Attempt to install graphs1090 by running bash script at github/wiedehopf failed. Had to do following work-around:
(1) First install package lighttpd
(2) AFTER installing lighttpd, run the bash command at GitHub - wiedehopf/graphs1090: Graphs for readsb / dump1090-fa / dump1090 (based on dump1090-tools by mutability) to install graphs1090
(3) AFTER installing graphs1090, run another command to make graphs1090 use data from dump1090-rb
Below are all the three commands listed above. These commands to be executed in the same order as given below.
sudo apt install lighttpd
sudo bash -c "$(curl -L -o - https://github.com/wiedehopf/graphs1090/raw/master/install.sh)"
sudo ln -sf /var/run/dump1090-rb /usr/share/graphs1090/data-symlink/data