Feed dump1090 from a second RPI

Hardy2018

New Member
Hello all,

maybe a Guru have a answer for me.

My ADSB-RPI Setup:
Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster)

Software:
dump1090-Mutability EB_VERSION

Feeders:
FlightRadar-24
AirNav RadarBox24
FlightAware
PlaneFinder
AdsbExchange
PlanePlotter

I like to feed an additional RPI with a large Display (Display-RPI) & dump1090 from my ADSB-RPI.

Question:
how do i get the data from the ADSB-RPI via network in to the Display-RPI.

Dump1090 on the Display-RPI is set to "net-only" mode, but where and how i have to set the IP & Port address that the Display-RPI has to fetch the Data from.

From: ADSB-RPI 192.168.178.107:30005 output
to: DISPLAY-RPI 192.168.178.110:30004 input

Best regards
Hardy
 
You can do it with Modesmixer2....

Modesmixer2

Code:
./modesmixer2 --help
ModeSMixer2 v.20190413
Program options:
  -h [ --help ]             This help message
  --inConnect arg           Input connector. Format: host:port
  --inConnectId arg         Input connector with ID. Format: host:port:id
  --inServer arg            Input server. Format: port
  --inServerId arg          Input server with Id. Format: port:id
  --inServerUdp arg         Input udp server. Format: port
  --inSerial arg            Input serial. Format: port[:speed[:flow_control]]
                            FlowControl: none,software,hardware
  --outConnect arg          Output connector. Format: type:host:port
                            Types: beast,avr,avrmlat,msg,sbs30006,beastmlat,msg
                                  mlat
  --outConnectId arg        Output connector with Id.
                            Format: host:port[:name:lat:lon:TEXT:freq]
  --outConnectUdp arg       Output udp connector. Format: type:host:port
                            Types: beast,avr,avrmlat,msg,sbs30006
  --outServer arg           Output server. Format: type:port
                            Types: beast,avr,avrmlat,msg,sbs30006,sbs10001,fats
                                  v,beastmlat,msgmlat
  --globes arg              Enable Globe-S server. Format
                            port:tablename:stationid

etc etc

Regards.
 
You can do it with Modesmixer2....

Modesmixer2

Code:
./modesmixer2 --help
ModeSMixer2 v.20190413
Program options:
  -h [ --help ]             This help message
  --inConnect arg           Input connector. Format: host:port
  --inConnectId arg         Input connector with ID. Format: host:port:id
  --inServer arg            Input server. Format: port
  --inServerId arg          Input server with Id. Format: port:id
  --inServerUdp arg         Input udp server. Format: port
  --inSerial arg            Input serial. Format: port[:speed[:flow_control]]
                            FlowControl: none,software,hardware
  --outConnect arg          Output connector. Format: type:host:port
                            Types: beast,avr,avrmlat,msg,sbs30006,beastmlat,msg
                                  mlat
  --outConnectId arg        Output connector with Id.
                            Format: host:port[:name:lat:lon:TEXT:freq]
  --outConnectUdp arg       Output udp connector. Format: type:host:port
                            Types: beast,avr,avrmlat,msg,sbs30006
  --outServer arg           Output server. Format: type:port
                            Types: beast,avr,avrmlat,msg,sbs30006,sbs10001,fats
                                  v,beastmlat,msgmlat
  --globes arg              Enable Globe-S server. Format
                            port:tablename:stationid

etc etc

Regards.
Thanks for the hint, I'll try it.
Regards - Hardy
 
Look, I put your question to SAGE (AI), and he answers me this,,,, I don't know if it will be right or not. Because my English is very bad, but study it to see. hugs.....

To send data from your ADSB-RPI to your Display-RPI, you need to configure dump1090 on the ADSB-RPI to send data over the network to the Display-RPI. You can do this by configuring dump1090 to output data in Beast format over TCP, and then configuring dump1090 on the Display-RPI to receive data in Beast format over TCP.

Here's how you can configure dump1090 on your ADSB-RPI:

1. Open the dump1090 configuration file `/etc/default/dump1090-mutability` for editing using your favorite text editor.

2. Add the following line to the file to enable Beast output over TCP:

````
RECEIVER_OPTIONS="--net --net-only --net-beast --net-ro-size 1000 --net-ro-interval 1 --net-ri-port 30005"
```

This line tells dump1090 to output data in Beast format over TCP on port 30005.

3. Save the file and restart dump1090 using the following command:

````
sudo systemctl restart dump1090-mutability
```

This will restart dump1090 with the new configuration.

Next, you need to configure dump1090 on your Display-RPI to receive data in Beast format over TCP. Here's how:

1. Open the dump1090 configuration file `/etc/default/dump1090-fa` for editing using your favorite text editor.

2. Add the following line to the file to configure dump1090 to receive data in Beast format over TCP:

````
RECEIVER_OPTIONS="--net-only --net-ri-ip 192.168.178.107 --net-ri-port 30005 --net-bo-port 30004"
```

This line tells dump1090 to receive data in Beast format over TCP from the IP address of your ADSB-RPI (192.168.178.107) on port 30005, and to output data in Beast format over TCP on port 30004.

3. Save the file and restart dump1090 using the following command:

````
sudo systemctl restart dump1090-fa
```

This will restart dump1090 with the new configuration.

After completing these steps, dump1090 on your ADSB-RPI will send data in Beast format over TCP to dump1090 on your Display-RPI, which will receive the data and output it on port 30004. You can now use this data to display flight information on your large display connected to your Display-RPI.
 
(A) On ADSB-RPi
Issue following command to install modesmixer2 on your ADSB-RPi (the one which has Dongles, dump1090-mutability, Flightaware feeder, FR24 feeder etc)

Code:
sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/mm2/master/install-mm2.sh)"


After installation is completed, open modesmixer2's config file
Code:
sudo nano /usr/share/mm2/mm2.conf

You will see following 3 lines.
Code:
--inConnectId 127.0.0.1:30005:ADSB
--inConnectId 127.0.0.1:30105:MLAT
--web 8787

Add following 2 line (assuming 192.168.178.110 is IP of your Display-RPI)

--outConnect beast:192.168.178.110:30004
--outConnect beastmlat:192.168.178.110:30104


The file will become:
Code:
--inConnectId 127.0.0.1:30005:ADSB
--inConnectId 127.0.0.1:30105:MLAT
--web 8787
--outConnect beast:192.168.178.110:30004
--outConnect beastmlat:192.168.178.110:30104

Save file (Ctrl+O) and close (Ctrl+x)

Restart modesmixer2 by following command

Code:
sudo systemctl restart mm2


(B) On Display-RPi
You do 2 changes:
(1) run dump1090-mutability in --net-only mode,
(2) Remove 127.0.0.1 from NET_BIND_ADDRESS



Edit following file:
Code:
sudo nano /etc/default/dump1090-mutability

(1) In above file scroll down to here:
1684063232898.png


Change DEVICE="" to DEVICE="none". This will make dump1090-mutability to run in --net-only mode.
It will become like this:

1684063501156.png




(2) Scroll down here:
1684064737674.png


Remove 127.0.0.1, so the file becomes like this:
1684064797789.png


Save the file and Restart dump1090-mutability.

Code:
sudo systemctl restart dump1090-mutability


.
 
Last edited:
Look, I put your question to SAGE (AI), and he answers me this,,,, I don't know if it will be right or not. Because my English is very bad, but study it to see. hugs.....

To send data from your ADSB-RPI to your Display-RPI, you need to configure dump1090 on the ADSB-RPI to send data over the network to the Display-RPI. You can do this by configuring dump1090 to output data in Beast format over TCP, and then configuring dump1090 on the Display-RPI to receive data in Beast format over TCP.

Here's how you can configure dump1090 on your ADSB-RPI:

1. Open the dump1090 configuration file `/etc/default/dump1090-mutability` for editing using your favorite text editor.

2. Add the following line to the file to enable Beast output over TCP:

````
RECEIVER_OPTIONS="--net --net-only --net-beast --net-ro-size 1000 --net-ro-interval 1 --net-ri-port 30005"
```

This line tells dump1090 to output data in Beast format over TCP on port 30005.

3. Save the file and restart dump1090 using the following command:

````
sudo systemctl restart dump1090-mutability
```

This will restart dump1090 with the new configuration.

Next, you need to configure dump1090 on your Display-RPI to receive data in Beast format over TCP. Here's how:

1. Open the dump1090 configuration file `/etc/default/dump1090-fa` for editing using your favorite text editor.

2. Add the following line to the file to configure dump1090 to receive data in Beast format over TCP:

````
RECEIVER_OPTIONS="--net-only --net-ri-ip 192.168.178.107 --net-ri-port 30005 --net-bo-port 30004"
```

This line tells dump1090 to receive data in Beast format over TCP from the IP address of your ADSB-RPI (192.168.178.107) on port 30005, and to output data in Beast format over TCP on port 30004.

3. Save the file and restart dump1090 using the following command:

````
sudo systemctl restart dump1090-fa
```

This will restart dump1090 with the new configuration.

After completing these steps, dump1090 on your ADSB-RPI will send data in Beast format over TCP to dump1090 on your Display-RPI, which will receive the data and output it on port 30004. You can now use this data to display flight information on your large display connected to your Display-RPI.
Hello tokenpen,
Thanks for your support.
Unfortunately i use dump1090-Mutability EB_VERSION and not dump1090-fa.
Therefore i don't have the options you described.
Best regardy
Hardy
 
Hello all,

my "quick and dirty" approach (till now) is to use netcat to fetch the data from my ADSB-RPI (192.168.178.107) and re-direct it to the DISPLAY-RPI (127.0.0.1).

1684249692957.png


To start the nc sequences during boot in inserted it in the rc.local just before exit 0.

There is a 30 second pause to allow the RPI time to complete the launch sequence.

sudo nano /etc/rc.local

GNU nano 3.2 /etc/rc.local
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then

printf "My IP address is %s\n" "$_IP"
fi


sleep 30s
1684249627053.png

exit 0

Save by Ctrl-o
Exit by Ctrl-x
Reboot


The disadvantage is that if the ADSB-RPI loses contact with the router (reboot, IP refresh, etc.), the DISPLAY-RPI aborts the netcat redirect.

It is therefore necessary to restart the DISPLY-RPI each time.

Best regards
Hardy
 
Last edited:
(A) On ADSB-RPi
Issue following command to install modesmixer2 on your ADSB-RPi (the one which has Dongles, dump1090-mutability, Flightaware feeder, FR24 feeder etc)

Code:
sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/mm2/master/install-mm2.sh)"


After installation is completed, open modesmixer2's config file
Code:
sudo nano /usr/share/mm2/mm2.conf

You will see following 3 lines.
Code:
--inConnectId 127.0.0.1:30005:ADSB
--inConnectId 127.0.0.1:30105:MLAT
--web 8787

Add following 2 line (assuming 192.168.178.110 is IP of your Display-RPI)

--outConnect beast:192.168.178.110:30004
--outConnect beastmlat:192.168.178.110:30104


The file will become:
Code:
--inConnectId 127.0.0.1:30005:ADSB
--inConnectId 127.0.0.1:30105:MLAT
--web 8787
--outConnect beast:192.168.178.110:30004
--outConnect beastmlat:192.168.178.110:30104

Save file (Ctrl+O) and close (Ctrl+x)

Restart modesmixer2 by following command

Code:
sudo systemctl restart mm2


(B) On Display-RPi
You do 2 changes:
(1) run dump1090-mutability in --net-only mode,
(2) Remove 127.0.0.1 from NET_BIND_ADDRESS



Edit following file:
Code:
sudo nano /etc/default/dump1090-mutability

(1) In above file scroll down to here:
View attachment 3235

Change DEVICE="" to DEVICE="none". This will make dump1090-mutability to run in --net-only mode.
It will become like this:

View attachment 3236



(2) Scroll down here:
View attachment 3237

Remove 127.0.0.1, so the file becomes like this:
View attachment 3238

Save the file and Restart dump1090-mutability.

Code:
sudo systemctl restart dump1090-mutability


.
Hello ab cd,

Many thanks for the very detailed contribution to the solution of my "problem".
Your approach solves the NC drop problem that my "quick and dirty" solution has.

All works great now.

Best regards
Hardy
 
Last edited:
Hi Hardy
My "quick and dirty" solution is similar to yours, but with following 3 improvements:
(1) A while loop is added to overcome broken connection problem in case of reboot or shutdown of any of the two Pis..
(2) Use socat instead of netcat
(3) Use startup by cron instead of rc.local

All actions on Display-RPi.
Nothing to be done on ADSB-RPi.


STEP-1:
Change settings of dump1090-mutability on Display-RPi:

(a) run dump1090-mutability in --net-only mode by setting DEVICE="none"
(b) Remove 127.0.0.1 from NET_BIND_ADDRESS=""

STEP-2:
Install socat
Code:
sudo apt install socat


STEP-3:
Create a new blank file
Code:
pi@raspberrypi:~ $ sudo nano pull-from-adsb-pi.sh

Type following code in the above blank file (10.0.0.22 is IP of my ADSB-Pi, change it to IP of your ADSB-RPi)

View attachment 3251


Save and Close file

STEP-4:
Make above file executable
Code:
pi@raspberrypi:~ $ sudo chmod +x pull-from-adsb-pi.sh
STEP-5:
Add startup at boot as cron job
Code:
pi@raspberrypi:~ $ sudo crontab -e
It asked choice for editor. Chose 1 nano.

View attachment 3248

Then file opened. Scrolled down to bottom of file and added following line

Code:
@reboot /bin/bash /home/pi/pull-from-adsb-pi.sh

View attachment 3249

Save & Close file.


STEP-6:
REBOOT DISPLAY RPi



.
Hello ab cd,

I tried your "Quick and Dirty" solution.
It seems that only the first socat redirect is executed.
Apparently each socat redirect has to be executed in a separate process.
But I lack the Linux knowledge to realize that.

Best Regards
Hardy
 
USING SYSTEMD TO RUN, START, STOP, & MONITOR ADS-B & MLAT CONNECTIONS BETWEEN TWO RPis (UPDATED: May 21, 2023)

NOTE:
(1) BOTH PULL-ADSB & PULL-MLAT CONNECTIONS WILL AUTOMATICALLY START WHENEVER DISPLAY-RPi BOOTS.
(2) In case of a disconnected Netweork Cable or shutdown of Source (ADSB-RPi), the system keeps on attempting to re-connect at intervals of 60 seconds, till the network cable is re-plugged or the source RPi reboots. Plese see screenshot below.


Code:
sudo journalctl -u pull-adsb -e

1684706636548.png


To See Status:
Code:
sudo systemctl status pull-adsb
sudo systemctl status pull-mlat

To run BOTH connection:
Code:
sudo systemctl restart pull-adsb
sudo systemctl restart pull-mlat


To run only adsb connection:
Code:
sudo systemctl stop pull-mlat
sudo systemctl restart pull-adsb

To run only mlat connection:
Code:
sudo systemctl stop pull-adsb
sudo systemctl restart pull-mlat


HOW TO:

ALL STEPS BELOW ARE ON DISPLAY-RPi.
NOTHING TO BE DONE ON ADSB-RPI.

STEP-1:

Change settings of dump1090-mutability by editing following file:

Code:
sudo nano /etc/default/dump1090-mutability

In above file:
(a) Set DEVICE="none" (to run dump1090-mutability in --net-only mode)
(b) Remove 127.0.0.1 from NET_BIND_ADDRESS="127.0.0.1", so it will become NET_BIND_ADDRESS=""


STEP-2:

Install socat
Code:
sudo apt install socat

STEP-3:
Create folder and run files
Code:
sudo mkdir /usr/share/pull

sudo touch /usr/share/pull/pull-adsb.sh
sudo chmod +x /usr/share/pull/pull-adsb.sh

sudo touch /usr/share/pull/pull-mlat.sh
sudo chmod +x /usr/share/pull/pull-mlat.sh


STEP-4:

Open file pull-adsb.sh
Code:
sudo nano /usr/share/pull/pull-adsb.sh

Copy-paste following code in above file
In line SOURCE_IP="10.0.0.22", replace 10.0.0.22 by Local IP of your ADSB-RPi

Code:
#!/bin/bash

SOURCE_IP="10.0.0.22"

OPTIONS="keepalive,keepidle=30,keepintvl=30,keepcnt=2,connect-timeout=30,retry=2,interval=15"

while true
   do
      echo "CONNECTING: pull-adsb"
      socat -dd -u TCP:${SOURCE_IP}:30005,${OPTIONS} TCP:127.0.0.1:30004,${OPTIONS}
      echo "LOST CONNECTION: pull-adsb"
      sleep 60
   done



STEP-5:

open file pull-mlat.sh
Code:
sudo nano /usr/share/pull/pull-mlat.sh

Copy-paste following code in above file
In line SOURCE_IP="10.0.0.22", replace 10.0.0.22 by Local IP of your ADSB-RPi

Code:
#!/bin/bash

SOURCE_IP="10.0.0.22"

OPTIONS="keepalive,keepidle=30,keepintvl=30,keepcnt=2,connect-timeout=30,retry=2,interval=15"

while true
   do
      echo "CONNECTING: pull-mlat"
      socat -dd -u TCP:${SOURCE_IP}:30105,${OPTIONS} TCP:127.0.0.1:30104,${OPTIONS}
      echo "LOST CONNECTION: pull-mlat"
      sleep 60
   done



STEP-6:
Create systemd service file for pull-adsb
Code:
sudo nano /lib/systemd/system/pull-adsb.service

Copy-paste following code in above file

Code:
# pull-adsb service for systemd
[Unit]
Description=abcd567's pull-adsb
Wants=network.target
After=network.target

[Service]
User=pipe
RuntimeDirectory=pull-adsb
RuntimeDirectoryMode=0755
ExecStart=/bin/bash /usr/share/pull/pull-adsb.sh
SyslogIdentifier=pull-adsb
Type=simple
Restart=on-failure
RestartSec=30
RestartPreventExitStatus=64
Nice=-5

[Install]
WantedBy=default.target



STEP-7:
Create systemd service file for pull-mlat
Code:
sudo nano /lib/systemd/system/pull-mlat.service

Copy-paste following code in above file
Code:
# pull-mlat service for systemd
[Unit]
Description=abcd567's pull-mlat
Wants=network.target
After=network.target

[Service]
User=pipe
RuntimeDirectory=pull-mlat
RuntimeDirectoryMode=0755
ExecStart=/bin/bash /usr/share/pull/pull-mlat.sh
SyslogIdentifier=pull-mlat
Type=simple
Restart=on-failure
RestartSec=30
RestartPreventExitStatus=64
Nice=-5

[Install]
WantedBy=default.target



STEP-8:
Create user "pipe" to run the pull-adsb & pull-mlat services
Code:
sudo adduser --system --no-create-home pipe



STEP-9:
Enable and start systemd services

(a) pull-adsb systemd service
Code:
sudo systemctl enable pull-adsb
sudo systemctl start pull-adsb

(a) pull-mlat systemd service
Code:
sudo systemctl enable pull-mlat
sudo systemctl start pull-mlat


STEP-10:
Check status of pull-adsb and pull-mlat by following commands
Code:
sudo systemctl status pull-adsb
sudo systemctl status pull-mlat
 
Last edited:
USING SYSTEMD TO RUN, START, STOP, & MONITOR ADS-B & MLAT CONNECTIONS BETWEEN TWO RPis

NOTE: BOTH PULL-ADSB & PULL-MLAT CONNECTIONS WILL AUTOMATICALLY START WHENEVER RPi BOOTS.

To See Status:

Code:
sudo systemctl status pull-adsb
sudo systemctl status pull-mlat

To run BOTH connection:
Code:
sudo systemctl restart pull-adsb
sudo systemctl restart pull-mlat


To run only adsb connection:
Code:
sudo systemctl stop pull-mlat
sudo systemctl restart pull-adsb

To run only mlat connection:
Code:
sudo systemctl stop pull-adsb
sudo systemctl restart pull-mlat


HOW TO:

ALL STEPS BELOW ARE ON DISPLAY-RPi.
NOTHING TO BE DONE ON ADSB-RPI.

STEP-1:

Change settings of dump1090-mutability by editing following file:

Code:
sudo nano /etc/default/dump1090-mutability

In above file:
(a) Set DEVICE="none" (to run dump1090-mutability in --net-only mode)
(b) Remove 127.0.0.1 from NET_BIND_ADDRESS="127.0.0.1", so it will become NET_BIND_ADDRESS=""


STEP-2:

Install socat
Code:
sudo apt install socat


STEP-3:
Create systemd service file for pull-adsb
Code:
sudo nano /lib/systemd/system/pull-adsb.service

Copy-paste following code in above file

Code:
# pull-adsb service for systemd
[Unit]
Description=abcd567's adsb-socat-pipe for pulling adsb data from another Pi
Wants=network.target
After=network.target

[Service]
User=pipe
RuntimeDirectory=pull-adsb
RuntimeDirectoryMode=0755
ExecStart=/usr/bin/socat -u TCP:10.0.0.22:30005 TCP:localhost:30004
SyslogIdentifier=pull-adsb
Type=simple
Restart=always
RestartSec=60
RestartPreventExitStatus=64
Nice=-5

[Install]
WantedBy=default.target



STEP4:
Create systemd service file for pull-mlat
Code:
sudo nano /lib/systemd/system/pull-mlat.service

Copy-paste following code in above file
Code:
# pull-mlat service for systemd
[Unit]
Description=abcd567's mlat-socat-pipe for pulling mlat data from another Pi
Wants=network.target
After=network.target

[Service]
User=pipe
RuntimeDirectory=pull-mlat
RuntimeDirectoryMode=0755
ExecStart=/usr/bin/socat -u TCP:10.0.0.22:30105 TCP:localhost:30104
SyslogIdentifier=pull-mlat
Type=simple
Restart=always
RestartSec=60
RestartPreventExitStatus=64
Nice=-5

[Install]
WantedBy=default.target



STEP5:
Create user "pipe" to run the pull-adsb & pull-mlat services
Code:
sudo adduser --system --no-create-home pipe



STEP6:
Enable and start systemd services

(a) pull-adsb systemd service
Code:
sudo systemctl enable pull-adsb
sudo systemctl start pull-adsb

(a) pull-mlat systemd service
Code:
sudo systemctl enable pull-mlat
sudo systemctl start pull-mlat


STEP7:
Check status of pull-adsb and pull-mlat by following commands
Code:
sudo systemctl status pull-adsb
sudo systemctl status pull-mlat
Hello ab cd,

only a true enthusiast spends father's day solving problems and documenting them instead of "Bike, BBQ, Beer, Buddies and Rock & Roll".

Unfortunately i have to restart both services manually after a failure of the adsb-pi.
(Same problem on your sugestion from Wednesday at 11:39 PM).
(socat problem ?)

See Screenshots
1.jpg = 0:00 min After Boot and Start ADSB-Pi Lan Failure
2.jpg = 3:51min Restore ADSB-Pi Lan
3.jpg = 10:11min No data to dump1090 DISPLAY-PI
4.jpg = After manually Restarting services pull-adsb & pull-mlat

Thanks so much
Hardy
 

Attachments

  • 1.JPG
    1.JPG
    137.1 KB · Views: 3
  • 2.JPG
    2.JPG
    140.9 KB · Views: 2
  • 3.JPG
    3.JPG
    143.6 KB · Views: 2
  • 4.JPG
    4.JPG
    136.7 KB · Views: 3
Yes I faced same problem when tested late last night, and made some changes in service files (pull-adsb.service & pull-mlat.service). After these modifications, the problem is solved for me.

Couple of hours ago, I have updated the code to be used in files pull-adsb.service & pull-mlat.service (in STEP-3 & STEP-4)

To update you install, please open these files with following commands
Code:
sudo nano /lib/systemd/system/pull-adsb.service

sudo nano /lib/systemd/system/pull-mlat.service


Make following changes in each of these two service files:

Change these 2 lines:
Restart=on-failure
RestartSec=30

To these:
Restart=always
RestartSec=60

After making these changes, Save these files

After updating and Saving these files, please issue following commands to implement changes.
Code:
sudo systemctl daemon-reload

sudo systemctl restart pull-adsb

sudo systemctl restart pull-mlat

Enjoy! :)
Hello ab cd,

in your Step #3 & #4 the parameters are already set as you suggested.
Restart=always
RestartSec=60

Regards
Hardy
 
What you see now in my how-to post, and have quoted in your above post, is after I updated my how-to post to fix the issue couple of hours ago.

It seems you have copy-pated the contents in service file of your Display-RPi before I made modification, and that is why you are facing problem.

Please check your Display-RPi's service files (pull-adsb.service & pull-mlat.service) to make sure what is there.

After making the changes in my install, I several times tested it by shutting down the ADSB-RPi, and after waiting for about 10 minutes each time, restarted the ADSB-RPi, and connection was re-establish automatically every time.
The (pull-adsb.service & pull-mlat.service) files are as you specified.
See Screenshot 0.jpg
Screenshot 1a.jpg = Pull Lan cable on the ADSB-RPI
Screenshot 1b.jpg = Reconnect Lan cable on the ADSB-RPI
Screenshot 1c.jpg = Still no Data on the DISPLAY-RPI (no Recuperation)
Screenshot 1d.jpg = After Restart Data on the DISPLAY-RPI
Screenshot 1e.jpg = After breaking Lan and restoring it on the DISPLAY-RPI, only mlat recuperates !
 

Attachments

  • 1c.JPG
    1c.JPG
    194.4 KB · Views: 3
  • 1d.JPG
    1d.JPG
    244.5 KB · Views: 2
  • 1b.JPG
    1b.JPG
    193.4 KB · Views: 2
  • 1a.JPG
    1a.JPG
    240.5 KB · Views: 2
  • 0a.JPG
    0a.JPG
    84.8 KB · Views: 2
  • 1e.JPG
    1e.JPG
    187.7 KB · Views: 3
Last edited:
After reconnecting LAN cable to ADSB-RPI, could you SSH to the ADSB-RPI on the same IP which you have entered in file pull-adsb.service?

I suspect your router assigns a new ip address to ADSB-PI every time the ADSB-RPi reconnects to the router (i.e. after evey reboot and after every shutdown- restart operation). In this case you should configure a fixed IP address for ADSB-RPI either in router config or in ADSB-RPI config.


The pull-adsb.service & pull-mlat.service keep on attempting to reconnect after every 60 seconds, till the connection is established.

What is output of following command:

Code:
sudo journalctl -u pull-adsb -n 25
God morning,

my router is assigning always the same Ip-Adress to the RPIs.
Yes i can allways SSH the RPIs under the fixed IP.


Test-1 on DISPLAY-RPI (IP-34)
Screenshot-3a.jpg
Pull and Reconnect the Lan
Execute sudo journalctl -u pull-mlat -n 25
Execute sudo journalctl -u pull-adsb -n 25

Screenshot-3b.jpg
DISPLAY-RPI recuperates only on mlat
Manualy
Restart pull-adsb
Execute sudo journalctl -u pull-adsb -n 25
Execute sudo journalctl -u pull-mlat -n 25

Reboot DISPLAY-RPI


Test-2 on ADSB-RPI (IP-30)

Screenshot-3c.jpg
Pull and Reconnect the Lan
Execute sudo journalctl -u pull-adsb -n 25
Execute sudo journalctl -u pull-mlat -n 25

Screenshot - 3d.jpg
After some time only mlat recuperates
Execute sudo journalctl -u pull-adsb -n 25
Execute sudo journalctl -u pull-mlat -n 25

Screenshot - 3e.jpg
Manualy Restart pull-adsb
Execute sudo journalctl -u pull-adsb -n 25
Execute sudo journalctl -u pull-mlat -n 25

By the way, my socat version 1.7.3.2 on Nov 19 2017 13:56:10
 

Attachments

  • 3a.JPG
    3a.JPG
    152.3 KB · Views: 2
  • 3b.JPG
    3b.JPG
    335.5 KB · Views: 1
  • 3c.JPG
    3c.JPG
    188.3 KB · Views: 2
  • 3d.JPG
    3d.JPG
    222.3 KB · Views: 2
  • 3e.JPG
    3e.JPG
    264.4 KB · Views: 2
Last edited:
The reconnection attempt repeats every 60 sec. It is possible that when you replug the network wire, the router takes long time to make connection and first few attempts by socat during this period fail.

If aircraft dont appear on map immediately after reboot or replugging network wire, please wait for few more minutes. Most likely connection will be made after few failed attempts and aircraft will appear on the map after few minute's delay.
Hello ab cd,

I noticed the following:
The system only recovers in the event of LAN interruptions of less than 1 minute.

Attached are 2 short videos.
3 x Lan interruptions 30sec.
1 x Lan interruption 2min.
Lan cable disconnection on the ADSB-RPI
Videos from the DISPLAY-RPI

Video shows:
- stopwatch
- dump1090 messages/sec
- aircrafts on map
- socat PID (pipe)
- Ping to ADSB RPI

Timeline 3_x_30_sec_lan_off
00:00
Lan cable disconnected
00:30
Lan cable connected.
recovered
2:30 LAN cable disconnected
3:00
Lan cable connected.
recovered
5:00 Lan cable disconnected
5:30
Lan cable connected.
recovered.

Timeline 1_x_2_min_lan_off
0:00
Lan cable disconnected
2:00
Lan cable connected
No recovery (15min).

Download Link from Hardy2018 ([email protected]) 2 Videos
 
Hi Hardy
I re-checked yesterday, and found you were right, the socat and netcat connections once dead, do NOT reconnect automatically.

I have been busy since yesterday to try to find a solution for this problem, and after spending lot of hours and lot of Googling, could not find any solution, and am now convinced that there is no easy way to automatically restart socat or netcat broken connection. This leaves only option to manual restart socat connection.

Next I checked ModeSMixer2. I pulled network cable and noted its log. It kept on trying to reconnect, and after about 10 minutes when I plugged in the network cable, the connection was restored automatically and DISPLAY-RPi map started showing aircraft again.

So my conclusion is that the best solution is to use ModeSMixer2 as it automatically restores it's broken TCP connection when network restores.

The ModeSMixer2 can be installed on Display-RPi instead of ADSB-RPi if you like. In this case the config file would be like this:

Code:
sudo nano /usr/share/mm2/mm2.conf

Assuming 192.168.178.107 is IP of your ADSB-RPi:
Code:
--inConnectId 192.168.178.107:30005:ADSB
--inConnectId 192.168.178.107:30105:MLAT
--web 8787
--outConnect beast:127.0.0.1:30004
--outConnect beastmlat:127.0.0.1:30104
 
Last edited:
Hi Hardy
I re-checked yesterday, and found you were right, the socat and netcat connections once dead, do NOT reconnect automatically.

I have been busy since yesterday to try to find a solution for this problem, and after spending lot of hours and lot of Googling, could not find any solution, and am now convinced that there is no easy way to automatically restart socat or netcat broken connection. This leaves only option to manual restart socat connection.

Next I checked ModeSMixer2. I pulled network cable and noted its log. It kept on trying to reconnect, and after about 10 minutes when I plugged in the network cable, the connection was restored automatically and DISPLAY-RPi map started showing aircraft again.

So my conclusion is that the best solution is to use ModeSMixer2 as it automatically restores it's broken TCP connection when network restores.

View attachment 3280


View attachment 3279




The ModeSMixer2 can be installed on Display-RPi instead of ADSB-RPi if you like. In this case the config file would be like this:

Code:
sudo nano /usr/share/mm2/mm2.conf

Assuming 192.168.178.107 is IP of your ADSB-RPi:
Code:
--inConnectId 192.168.178.107:30005:ADSB
--inConnectId 192.168.178.107:30105:MLAT
--web 8787
--outConnect beast:127.0.0.1:30004
--outConnect beastmlat:127.0.0.1:30104
Hello ab cd,

too bad, but that's the "Dirty" side of "Quick & Dirty".
Thank you very much for your effort.
I had already tried the ModeSMixer variant, which pulls the data from the ADSB-RPI.
The advantage is that several DISPLAY-RPIs can be used independently.

Great job and have a nice Sunday.
Hardy
 
Last edited:
Hello ab cd,

too bad, but that's the "Dirty" side of "Quick & Dirty".
Thank you very much for your effort.
I had already tried the ModeSMixer variant, which pulls the data from the ADSB-RPI.
The advantage is that several DISPLAY-RPIs can be used independently.

Great job and have a nice Sunday.
Hardy

Hi Hardy

I finally succeeded in solving the problem of "no-restoration" in the How-To of Systemd method. I have now updated that post (Post #12). It works great.

If you want to try updated version, then first remove the old version by following commands:

(a) Remove old pull-adsb

Code:
sudo systemctl stop pull-adsb
sudo systemctl disable pull-adsb
sudo rm /lib/systemd/system/pull-adsb.service
sudo rm pull-adsb.sh

(b) Remove old pull-mlat
Code:
sudo systemctl stop pull-mlat
sudo systemctl disable pull-mlat
sudo rm /lib/systemd/system/pull-mlat.service
sudo rm pull-mlat.sh


Code:
sudo crontab -e

## Delete bothpull-adsb & pull-mlat lines starting with @reboot

Now proceed with ALL STEPS of Systemd How-to in Post #12
 
Last edited:
Hi Hardy

I finally succeeded in solving the problem of "no-restoration" in the How-To of Systemd method. I have now updated that post (Post #12). It works great.

If you want to try updated version, then first remove the old version by following commands:

(a) Remove old pull-adsb

Code:
sudo systemctl stop pull-adsb
sudo systemctl disable pull-adsb
sudo rm /lib/systemd/system/pull-adsb.service
sudo rm pull-adsb.sh

(b) Remove old pull-mlat
Code:
sudo systemctl stop pull-mlat
sudo systemctl disable pull-mlat
sudo rm /lib/systemd/system/pull-mlat.service
sudo rm pull-mlat.sh


Code:
sudo crontab -e

## Delete bothpull-adsb & pull-mlat lines starting with @reboot

Now proceed with ALL STEPS of Systemd How-to in Post #12

View attachment 3286
Hello ab cd,

You did magic this time!
Your new approach works like a charm.
The system reconnects regardless of which LAN side (ADSB-RPI or DISPLAY-RPI) was interrupted and regardless of the downtime.
Being able to monitor the program via journalctl is also great.

I hope I didn't take up too much of your time.

Greetings from the Westerwald (Germany)
Hardy
 
Back
Top