The authour (@sergsero) of ModeSMixer2 has stopped maintaining ModeSMixer2, ModeSDeco2, AcarSDeco2 etc and has pulled down his site Xdeco.org since about two years. His last releases were for Debian 10 (Buster). These continued to work on Debian 11 Bullseye.
However when I tried to install ModeSMixer2 on Debian 12 Bookworm, it failed saying “failed to find libssl.so.1.1 and libcrypto.so.1.1”. The reason is that libssl-dev-1.1.1, which was installable in Buster and Bullseye, is no more available in Bookworm and only libssl-dev-3.0.9-1 is installable. Since @sergsero has abandoned his Xdeco project, Bookworm is sad demise of his work.
Since I was using ModeSMixer2 to mix feeds from all my receivers and push this mixed feed to variuos sites, I decided to assemble my own Mixer by combining following components:
(1) dump1090-mutability as mixing software, as well as display of mixed inputs on its map (IP/dump1090/gmap.html)
(2) First bash script to create SOCAT uni-directional pipes to pull data from various receivers to the input ports of dump1090-mutability.
(3)Second bash script to create SOCAT uni-directional pipes to push the mixed feed from dump1090-mutability output ports to various aggregator sites
(4) A third bash script to start the above two scripts.
(5) A systemd Service file to automatically run the start scrip at boot, creating SOCAT pull and push pipes. The dump1090-mutability has it’s own systemd service file and starts automatically at boot.
(1) Install dump1090-mutability
Run following commands to install dump1090-mutability:
sudo apt update
sudo apt install dump1090-mutability
The dump1090-mutability can be installed and run simultaneously with dump1090-fa on same RPi.
However installing dump1090-mutability on a RPi which is already running dump1090-fa causes Lighttpd to crash with an error message. As a result web browser fail to display skyaware, skyaware978, piaware-web and graphs1090. Restarting lighttpd, or rebooting does not fix this problem.
The FIX for this problem is that after installing dump1090-mutability, open following file
sudo nano /etc/lighttpd/conf-available/89-dump1090.conf
Scroll down to bottom where you will see following line.
server.stat-cache-engine = "disable"
Comment out this line by placing # at it’s start, so line becomes
#server.stat-cache-engine = "disable"
Save file, and REBOOT Pi
sudo reboot
(2) Configure dump1090-mutability
(2.1) Open dump1090-mutability’s config file for editing:
sudo nano /etc/default/dump1090-mutability
Make following changes:
(2.1.1) Make sure the item START_DUMP1090
is yes, like this:
START_DUMP1090="yes"
(2.1.2) Configure it to run in --net-only
mode by changing RECEIVER=""
to:
RECEIVER="none"
.
(2.1.3) To avoid port conflict with dump1090-fa, change dump1090-mutability’s port numbers as follows:
Change 30001 to 40001
Change 30002 to 40002
Change 30003 to 40003
Change 30004,30104 to 40004,40104
Change 30005 to 40005
Please see screenshot below which shows the config file after above noted port number changes were done.
(2.1.4) To enable connection to other Pi’s, empty NET_BIND_ADDRESS="127.0.0.1"
so that it became:
NET_BIND_ADDRESS=""
(2.1.5) For Range Rings to appear, add latitude & longitude values in LAT=""
and LON=""
, so that it becomes:
LAT="xx.xxxx"
LON="yy.yyyy"
(3) Create Scripts
(3.1) Install package socat
sudo apt install socat
(3.2) Create dedicated folder to hold all script files at one place
sudo mkdir /usr/share/mixer
(3.3) Creat script pull.sh
sudo touch /usr/share/mixer/pull.sh
sudo chmod +x /usr/share/mixer/pull.sh
sudo nano /usr/share/mixer/pull.sh
In the new blank file pull.sh
created above, copy-paste following code
NOTE:
(1) Full file contents are not displayed by forum. Please scroll down and and scrol right to see and copy full contents.
(2) After copy-paste, replace source IPs 10.0.0.21, 10.0.0.22, 10.0.0.23, and 10.0.0.50 by your receiver’s Local IP addresses
(3) Following lines starting with:
#CMD_1_3="TCP
#CMD_2_3="TCP
#CMD_3_3="TCP
#CMD_4_3="TCP
are for feeding Adsbexchange mlat-results to the mixer, but are disabled by placing a # at their start. If you have installed Adsbexchange feeder on any of your receivers, then remove # from start of the line pertaining to that receiver, to feed it’s Adsbexchange mlat-results to the mixer.
#!/bin/bash
OPTIONS="keepalive,keepidle=30,keepintvl=30,keepcnt=2,connect-timeout=30,retry=2,interval=15"
SOURCE1="10.0.0.21"
SOURCE2="10.0.0.22"
SOURCE3="10.0.0.23"
SOURCE4="10.0.0.50"
CMD_1_1="TCP:${SOURCE1}:30005,${OPTIONS} TCP:127.0.0.1:40004,${OPTIONS}"
CMD_1_2="TCP:${SOURCE1}:30105,${OPTIONS} TCP:127.0.0.1:40104,${OPTIONS}"
#CMD_1_3="TCP:${SOURCE1}:30157,${OPTIONS} TCP:127.0.0.1:40104,${OPTIONS}"
CMD_2_1="TCP:${SOURCE2}:30005,${OPTIONS} TCP:127.0.0.1:40004,${OPTIONS}"
CMD_2_2="TCP:${SOURCE2}:30105,${OPTIONS} TCP:127.0.0.1:40104,${OPTIONS}"
#CMD_2_3="TCP:${SOURCE2}:30157,${OPTIONS} TCP:127.0.0.1:40104,${OPTIONS}"
CMD_3_1="TCP:${SOURCE3}:30005,${OPTIONS} TCP:127.0.0.1:40004,${OPTIONS}"
CMD_3_2="TCP:${SOURCE3}:30105,${OPTIONS} TCP:127.0.0.1:40104,${OPTIONS}"
#CMD_3_3="TCP:${SOURCE3}:30157,${OPTIONS} TCP:127.0.0.1:40104,${OPTIONS}"
CMD_4_1="TCP:${SOURCE4}:30005,${OPTIONS} TCP:127.0.0.1:40004,${OPTIONS}"
CMD_4_2="TCP:${SOURCE4}:30105,${OPTIONS} TCP:127.0.0.1:40104,${OPTIONS}"
#CMD_4_3="TCP:${SOURCE4}:30157,${OPTIONS} TCP:127.0.0.1:40104,${OPTIONS}"
while true
do
echo "CONNECTING MIXER TO SOURCE:"
socat -dd -u ${CMD_1_1} | socat -dd -u ${CMD_1_2} | socat -dd -u ${CMD_1_3} | \
socat -dd -u ${CMD_2_1} | socat -dd -u ${CMD_2_2} | socat -dd -u ${CMD_2_3} | \
socat -dd -u ${CMD_3_1} | socat -dd -u ${CMD_3_2} | socat -dd -u ${CMD_3_3} | \
socat -dd -u ${CMD_4_1} | socat -dd -u ${CMD_4_2} | socat -dd -u ${CMD_4_3}
echo "LOST CONNECTION OF MIXER AND SOURCE:"
echo "RE-CONNECTING MIXER TO SOURCE:"
sleep 60
done
Save and Close file pull.sh
(3.4) Creat script push.sh
sudo touch /usr/share/mixer/push.sh
sudo chmod +x /usr/share/mixer/push.sh
sudo nano /usr/share/mixer/push.sh
In the new blank file pull.sh
created above, copy-paste following code
NOTE:
(1) Full file contents are not displayed by forum. Please scroll down and and scrol right to see and copy full contents.
(2) After copy-paste, replace target IPs and port numbers by your aggregator site’s IP addresses and port numbers.
#!/bin/bash
SOURCE_BEAST="127.0.0.1:40005"
SOURCE_MSG="127.0.0.1:40003"
TARGET_1="sky.bup.mx:xxxxx"
TARGET_2="data.adsbhub.org:xxxx"
TARGET_3="skyfeed.hpradar.com:xxxxx"
#TARGET_4=""
OPTIONS="keepalive,keepidle=30,keepintvl=30,keepcnt=2,connect-timeout=30,retry=2,interval=15"
CMD_1="TCP:${SOURCE_BEAST},${OPTIONS} TCP:${TARGET_1},${OPTIONS}"
CMD_2="TCP:${SOURCE_MSG},${OPTIONS} TCP:${TARGET_2},${OPTIONS}"
CMD_3="TCP:${SOURCE_BEAST},${OPTIONS} TCP:${TARGET_3},${OPTIONS}"
#CMD_4="TCP:${SOURCE_BEAST},${OPTIONS} TCP:${TARGET_4},${OPTIONS}"
while true
do
echo "CONNECTING:"
socat -dd -u ${CMD_1} | \
socat -dd -u ${CMD_2} | \
socat -dd -u ${CMD_3} | \
socat -dd -u ${CMD_4}
echo "LOST CONNECTION TO TARGETS:"
echo "RE-CONNECTING TO TARGETS:"
sleep 60
done
Save and Close file push.sh
(3.5) Creat script start.sh
sudo touch /usr/share/mixer/start.sh
sudo chmod +x /usr/share/mixer/start.sh
sudo nano /usr/share/mixer/start.sh
In the new blank file start.sh
created above, copy-paste following code
#!/bin/bash
/bin/bash /usr/share/mixer/pull.sh & /bin/bash /usr/share/mixer/push.sh
Save and Close file push.sh
(4) Create Systemd Service file for Mixer to start at boot. The dump1090-mutability has it’s own Systemd service file and starts automatically at boot.
(4.1) Create blank Systemd service file by following command
sudo nano /lib/systemd/system/mixer.service
(4.2) In above blank file, copy-paste following code
# adsb mixer service - by abcd567
[Unit]
Description=mixes adsb data from various sources and forwards to various targets
Wants=network.target
After=network.target
[Service]
User=mixer
RuntimeDirectory=mixer
RuntimeDirectoryMode=0755
ExecStart=/bin/bash /usr/share/mixer/start.sh
SyslogIdentifier=mixer
Type=simple
Restart=on-failure
RestartSec=30
RestartPreventExitStatus=64
#Nice=-5
[Install]
WantedBy=default.target
Save and Close file mixer.service
(4.3) Create user mixer
to run the service
sudo adduser --system --no-create-home mixer
(4.4) Enable mixer service by following command. After enabling, it will start automatically on boots.
sudo systemctl enable mixer.service
(4.5) Manually start mixer by following command, or reboot to start it automatically
sudo systemctl start mixer
(4.6) Check status
sudo systemctl status mixer
(4.7) Check Map of mixed feed in browser
IP/dump1090/gmap.html
Click on Screenshot to See Larger Size