@imjuan:
I don't think there is a way to modify IP for dump978, or if it is there, it is un-documented and unknown to us.
However I have found a workaround for it, though it is not as simple as changing IP in file rbfeeder.ini (if it was possible and known).
Brief description:
The rbfeeder by default tries to connect to 127.0.0.1:28380. This is the port on which RB24's dump978-rb outputs data if you install it on the RPi.
If instead of RB24's dump978-rb, you have installed Flightaware's dump978-fa on this RPi, it outputs data on 127.0.0.1:30979. This requires change rbfeeder's default port from 127.0.0.1:28380 to 127.0.0.1:30979. This is achieved by adding line "dump978_port=30979" in file rbfeeder.ini
Since Flightfeeder's output is NOT available on RPi's 127.0.0.1, this change of default port from 28380 to 30979 does not connect to Flightfeeder.
The method below does following two things:
(a) Creates a LISTENING port 28380 in RPi (simulating RB24's dump978-rb output port)
AND
(b) Establishes TCP connection between FlightFeeder's output port 30979 and RPi's listening port 28380.
This makes UAT978 data of Flightfeeder available in RPi at 127.0.0.1:28380
Please do following:
(1) Edit file rbfeedr.ini
sudo nano /etc/rbfeeder.ini
From above file:
(a) delete line dump978_port=30979 (this line was originally not there, you have added it)
AND
(b) delete # at start of line dump978_enabled=true (if you have not yet done it)
Save file (Ctrl+O) and close (Ctrl+x)
(2) Install socat
sudo apt install socat
(3) Create a blank file of any name, but with extension .sh
In this how-to, I will use name "ff2rb978.sh"
sudo nano /home/pi/ff2rb978.sh
(4) In the newly created file, copy-paste following code:
Note: replace XXX.XXX.XXX.XXX by local IP of your FlightFeeder (978 data source)
#!/bin/sh
while true
do
sleep 30
/usr/bin/socat TCP-LISTEN:28380,fork TCP:XXX.XXX.XXX.XXX:30979 &
done
Save file (Ctrl+O) and close (Ctrl+x)
(5) Make file "ff2rb978.sh" executable
sudo chmod +x /home/pi/ff2rb978.sh
(6) Make file "ff2rb978.sh" automatically start at boot by adding an entry in file rc.local
sudo nano /etc/rc.local
Scroll down. You will see the last two lines line like this
fi
exit 0
Just above "exit 0" and below "fi", add this line
/home/pi/ff2rb978.sh &
The last 3 lines of file will now be like this
fi
/home/pi/ff2rb978.sh &
exit 0
Save file (Ctrl+O) and close (Ctrlx)
(7) Reboot Pi
(8) Check Status of RB Feeder
sudo systemctl status rbfeeder
IF ALL WORKING OK, YOU WILL NOT SEE THIS LINE
Can't connect to 978 source (127.0.0.1:30979). Waiting 5 second.
OR
Can't connect to 978 source (127.0.0.1:28380). Waiting 5 second.
(9) Check if data is available at local port 28380
(Wait for UAT aircraft to appear)
nc localhost 28380
(10) You can also check if rbfeeder is connected to newly created port 28380 by following command:
sudo netstat -anp | grep -w 28380
Above command should output following:
tcp 0 0 0.0.0.0:28380 0.0.0.0:* LISTEN 1821/socat
tcp 0 0 127.0.0.1:28380 127.0.0.1:42834 ESTABLISHED 17842/socat
tcp 0 0 127.0.0.1:42834 127.0.0.1:28380 ESTABLISHED 525/rbfeeder
(11) You can also check if connection between FlightFeeder port 30979 and your RPi is established by following command:
sudo netstat -anp | grep -w 30979
If all OK, the above command will output following:
Note:
instead of YYY.YYY.YYY.YYY, you will see IP-of-PI
instead of XXX.XXX.XXX.XXX, you will see IP-of-FlightFeeder
tcp 0 0 YYY.YYY.YYY.YYY:54682 XXX.XXX.XXX.XXX:30979 ESTABLISHED 16729/socat