Pushing data to another machine

Hi all,

At home, I’ve got an AirNav Radar box pushing data to FlightAware via PlanePlotter and also to Virtual Radar Server. This all works well.

I’ve also got a PiAware rig, which I carry around with me to tinker with on my hotel visits (I’m living out of hotels most weeks, so need something to keep me occupied lol).

Is there any way I can push the data from my “mobile” PiAware rig back to my machine at home so I can also plot that data on Virtual Radar Server? I can access the VRS web interface whilst away and it’d be neat to see all traffic from both setups on the one page.

Regards,

Mark

socat or nc are the usual tools for this; you would use them to push data from piaware’s port 30005 to your VRS at home.
You’d need to be able to connect to a port on your VRS remotely, but if you can get to the VRS web interface remotely it sounds like you have that mostly sorted out already.

Something like:



$ socat TCP:localhost:30005 TCP:vrshost:34567


and then set up a listening port 34567 on your VRS, beast binary format.

I don’t know if the average hotel wifi is going to play nice with that though…

Fantastic - thanks for the super quick reply :slight_smile:

I shall give this a try tonight.

Regards,

Mark

Just to let you know that worked a treat :smiley:

I’ve now got a merged feed, or I can switch between the two.

Thanks for the reply. The support on this forum is just amazing :stuck_out_tongue:

I have 2 RPi with their independent DVB-T and Cantenna.

Both have ONLY following software. NO DATA FEEDERS INSTALLED YET.

(1) Raspbian Jessie
(2) Dump1090-mutability v1.15~dev
(3) lighttpd
(4) sudo apt-get install socat

I want to feed output of raspi-1 (192.168.2.17) to raspi-2 (192.168.2.27), and see the aggregated display on gmap.html of raspi-2.

I tried following commands on raspi-2, but all attempts failed as shown below.
Why socat command does not work? What I did wrong??? I tried sudo socat also, but same results.



pi@raspi-2 ~ $ socat -u TCP:192.168.2.17:30005 TCP:127.0.0.1:30004 &
[1] 1030
pi@raspi-2 ~ $ 2015/11/07 16:31:20 socat[1030] E connect(5, AF=2 192.168.2.17:30005, 16): Connection refused




pi@raspi-2 ~ $ socat -u TCP:192.168.2.17:30005 TCP:192.168.2.27:30004 &
[1] 1031
pi@raspi-2 ~ $ 2015/11/07 16:31:57 socat[1031] E connect(5, AF=2 192.168.2.17:30005, 16): Connection refused




pi@raspi-2 ~ $ socat -u TCP:raspi-1:30005 TCP:raspi-2:30004 &
[1] 1035
pi@raspi-2 ~ $ 2015/11/07 16:32:45 socat[1035] E connect(5, AF=2 192.168.2.17:30005, 16): Connection refused


Have you told dump1090 to bind to the wildcard address? (The default is to bind to localhost only)

Thanks Oliver. It worked.
I first told dump1090 on raspi-1 (feeder) only to bind to all addresses, it did not work.
I then told dump1090 on both the raspi-1 (feeder) & raspi-2 (aggregator) to bind to all addresses, and it worked.



pi@raspi-2 ~ $ socat -u TCP:raspi-1:30005 TCP:raspi-2:30004 &
[1] 914
pi@raspi-2 ~ $



A new problem!
when I give command, a connection between two RPis is established, and the planes picked by (raspi-1 + raspi-2) are shown on gmap.html of raspi-2, and all went well :smiley:



 pi@raspi-2 ~ $ socat -u TCP:raspi-1:30005 TCP:raspi-2:30004 &
[1] 1217
pi@raspi-2 ~ $


Now I have tried to make the process automatic.
(1) In folder “/home/pi/” of raspi-2, placed a bash script “pi1-feeding-pi2-maint.sh” to start & maintain the socat:



#! /bin/sh
while true
   do
     sleep 30
     socat -u TCP:raspi-1:30005 TCP:raspi-2:30004
   done


(2) Made the bash file executeable by command:


sudo chmod 755 ./pi1-feeding-pi2-maint.sh

(3) Made the script automatic



sudo nano /etc/rc.local 
#Inserted the following line just before the last line (exit 0) of rc.local file:
/home/pi/pi1-feeding-pi2-maint.sh


(4) Rebooted both raspi-1 & raspi-2 .

CONNECTION DID NOT ESTABLISH :frowning: :cry:

When I tried to run the script manually, response negative :frowning: :cry:



pi@raspi-2 ~ $ sudo ./pi1-feeding-pi2-maint.sh
./pi1-feeding-pi2-maint.sh: 7: ./pi1-feeding-pi2-maint.sh: Syntax error: end of file unexpected (expecting "do")


Any ideas what went wrong??
.

does running the script directly ( sudo ./pi1-feeding-pi2-maint.sh ) run successfully (defined as not throwing up)?
If not, possible errant EOL , CR/LF or similar may be lurking.
Syntax is sooo picky. :confused:

Found the cause - The .sh file was created by copy-paste from web pages.
The character-set of web page seems not compatible to the SSH client.
Deleting the .sh file and making a new file with code typed instead of copy-paste, solved the problem.

How do I tell the latest version of dump-fa to bind to all interfaces?
The latest install scripts does not give me the option to choose to which interfaces dump1090-fa should bind.

Alternatively you could just run a VPN server on your home network and connect to that. Then your PiAware rig would act as if it was on your local network wherever you were :slight_smile:

I specifically want to know how to set dump1090-fa to bind to all interfaces, I’m getting connection refused from socat.

I have a quick question related to merging multiple remote feeders to on VRS. I normally use the socat to push two feeds from each feeder one for normal other for mlat.

  1. Is it possible two ports using socat for pusing it to remote VRS?
  2. Again possible to have two feeds from two different pi feeding to one port on VRS using some utility?

Can’t you just specify multiple sources in VRS?
And then define a combined feed which gobbles up all the sources?

I can but what ends up happening is opening multiple ports for each stream. To reduce two streams per RPi, I am thinking of combining feed+mlat using modesmixer before sending it to VRS so that should help with one extra feed per reciever. But still will have to keep one port per reciever.
Not that I have that many reciever, its a problem which does not need a solution I guess but I wanted to reduce the number of ports I have to open

I don’t really understand your exact current setup.

Where is the socat running, which port do you need to open?

I have RPI 1 and Rpi 2 which are at remote location.
For each RPI i am sending two feed to VRS one MLAT and one normal Feed in Beast mode.
I am running socat on each of the two RPI to send feed to my VRS which is at a different location and those are push feeds so I have to open ports on VRS.

I have no issues currently and things work perfectly but for four feeds coming I have to open 4 ports on VRS. I assume I can combine MLAT and FEED using modesmixer so I just have to send one feed per RPI, but that still leaves one port per RPI.

Issue: Possible to have just one port on VRS to get all feeds from different RPI Beast mode

I think VRS wants the MLAT data separately for some reason.

Apart from that i’m not sure if you could just push both MLAT and normal data streams into the same port.
Don’t know if VRS supports it but from a network standpoint it’s not a problem.

To quote VRS merged feed options: http://www.virtualradarserver.co.uk/Documentation/WebServer/MergedFeedOptions.aspx

MLAT

This tick box is only enabled when you select a receiver in the Receivers list. Ticking this box tells VRS that the selected receiver is an MLAT feed. The feed calculates positions for aircraft that do not transmit positions themselves. VRS will use these positions even if the feed is not the nominated feed for an aircraft.

So that means if an aircraft from a merged feed is also seen by another receiver but that receiver does not have position for that aircraft, no position is shown if the receiver without position picked up the aircraft first.

So i’d recommend just continuing to do it as you were.
Don’t see any drawback there are a lot of ports available.