Let us say you have:
(1) Pi 1: All data feeders installed on it. You also have dump1090 installed on it with its dedicated dongle & antenna.
(2) Pi2: No data feeders installed on Pi2. You have only dump1090 installed on it with its dedicated dongle & antenna.
You want data from Pi2 to be diverted to Pi and combined with data of Pi, and combined date fed to planefinder and other sites, as well as displayed on map on Pi1
First install socat on
Pi-1, if not already installed
Now run this command on
Pi-1
Note: replace 192.168.0.21 by the local IP of your Pi-
2
Code:
socat -u TCP:192.168.0.21:30005 TCP:localhost:30004 &
The above command will create a data tunnel, enabling data flow from Pi2 to Pi1:
To test if the data tunnel is established and data is flowing from Pi-2 to Pi-1:
(1)
Break the tunnel by following command
(2) temporarily disconnect antenna from dongle of Pi-1, and check dump1090 map. Within a minute or two, all (or almost all) plane will disappear from the map.
(3) Now issue following command;
(Note: replace 192.168.0.21 by the local IP of your Pi-
2)
Code:
socat -u TCP:192.168.0.21:30005 TCP:localhost:30004 &
If data flow is established, planes will appear again on map, but of course from data of Pi-2.
NOTE:
This pipe will be disconnected on reboot of Pi. It may also get disconnected after running fo some time. You will therefore need to create a "startup & maintain" script and make it start at boot by an entry into file /etc/rc.local
AUTO START AT BOOT & MAINTAIN DATA TUNNEL
STEP-1
Code:
sudo touch /home/pi/pi2topi1.sh
sudo chmod +x /home/pi/pi2topi1.sh
sudo nano /home/pi/pi2topi1.sh
In the file opened, copy-paste following code
(Replace 192.168.0.21 by IP address of your Pi-2)
Code:
#!/bin/sh
while sleep 30
do
/usr/bin/socat -u TCP:192.168.0.21:30005 TCP:localhost:30004
done
STEP-2
In the file opened by above command, scrool down till you see last line (whic is only
exit 0).
Just
above exit 0, copy paste this line
STEP-3
Reboot Pi-1
To UNINSTALL:
Delete the following line in above file:
/home/pi/pi2topi1.sh