Feeding piaware from radarcape or beast

Continuing this the radarcape support forum thought it might be better here.

I have downloaded and compiled the mlat-client and i have downloaded and installed piaware 2.1-5

I’m going to assume that piaware will be looking for some form of dump1090 port wise to connect too.

Do i need to actually run the mlat-client or do i just run piaware?

not enough information. Which version of what programs?

Have you looked at flightaware.com/adsb/radarcape/ ?

(background: this started on the Beast/Radarcape list, I’ll repeat some things for completeness)

You don’t need to build/run mlat-client unless you want to feed separately to a (non-FA) mlat-server.

If you built piaware using piaware_builder (or used a prebuilt package) then that should include a built version of fa-mlat-client which is what piaware uses for mlat. piaware will start it up automatically as needed.

piaware expects Beast-format data on localhost port 30005. It doesn’t care whether that’s from dump1090 or something else. You can run a socat tunnel out to the radarcape, something like this should do the trick (untested…)



$ socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:radarcapehost:10003


Currently the radarcape will have to be in 12MHz mode for mlat to work (if it’s in GPS mode, normal feeding should work but mlat won’t)

understood, i had just came to the conclusion i was barking up the wrong tree with the mlat-client thing, and i was just thinking along the lines using the ports to get from one device to another (saved me some research there). its a shame about not being able to use the GPS though.

@jonhawkes2030 i knew there wasn’t a lot of information, but didn’t really know what to put in the thread as it was started elsewhere and i butted in on that thread, but i knew obj (thanks by the way) would pick up on the thread. Also the existing client on the radarcape (doesn’t mlat) and suffers if you put a lot data through it (stops reporting a lot of the data). i know i have used it.

edit: the socat command is good by the way.
edit: i’ve since disabled mlat but the faup1090 doesn’t like it mlat(1013): Beast-format results connection with localhost:30104: [Errno 111] Connection refused

Is there anyway to shorten the timeout seen below, i know what’s causing it some watchdog on the radarcape is making it restart. However waiting for Piaware to time out out for an hour is less than ideal

03/20/2016 09:59:03 1251085 msgs recv’d from socat (234 in last 5m); 1250097 msgs sent to FlightAware
03/20/2016 10:04:03 1254300 msgs recv’d from socat (3215 in last 5m); 1253312 msgs sent to FlightAware
03/20/2016 10:09:03 1257466 msgs recv’d from socat (3166 in last 5m); 1256478 msgs sent to FlightAware
03/20/2016 10:14:03 1260631 msgs recv’d from socat (3165 in last 5m); 1259643 msgs sent to FlightAware
03/20/2016 10:19:03 1263804 msgs recv’d from socat (3173 in last 5m); 1262816 msgs sent to FlightAware
03/20/2016 10:24:03 1267124 msgs recv’d from socat (3320 in last 5m); 1266136 msgs sent to FlightAware
03/20/2016 10:29:03 1270468 msgs recv’d from socat (3344 in last 5m); 1269480 msgs sent to FlightAware
03/20/2016 10:34:03 1273592 msgs recv’d from socat (3124 in last 5m); 1272604 msgs sent to FlightAware
03/20/2016 10:38:02 lost connection to socat via faup1090
03/20/2016 10:38:02 reconnecting to socat
03/20/2016 10:38:02 ADS-B data program ‘socat’ is listening on port 30005, so far so good
03/20/2016 10:38:02 Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 51.309 --lon -0.706
03/20/2016 10:38:02 Started faup1090 (pid 31145) to connect to socat
03/20/2016 10:38:06 lost connection to socat via faup1090
03/20/2016 10:38:06 will reconnect to socat in 30 seconds
03/20/2016 10:38:36 ADS-B data program ‘socat’ is listening on port 30005, so far so good
03/20/2016 10:38:36 Starting faup1090: /usr/lib/piaware/helpers/faup1090 --net-bo-ipaddr localhost --net-bo-port 30005 --stdout --lat 51.309 --lon -0.706
03/20/2016 10:38:36 Started faup1090 (pid 31162) to connect to socat
03/20/2016 10:39:03 1276547 msgs recv’d from socat (2955 in last 5m); 1275559 msgs sent to FlightAware

Socat still appears to be working as i am not restarting it (set it up as a service in systemd).

*edit: i might be lieing there’s something going on with socat, i think this is just the faup1090 reconnecting to socat but i’m not sure.

â ADSB_Socat.service - ADSB_Socat
Loaded: loaded (/lib/systemd/system/ADSB_Socat.service; enabled)
Active: active (running) since Thu 2016-03-17 21:03:30 UTC; 2 days ago
Main PID: 345 (ADSB_Socat.sh)
CGroup: /system.slice/ADSB_Socat.service
ââ 345 /bin/sh /home/pi/ADSB_Socat.sh
ââ 353 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ 717 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ 1430 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ 1915 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ 7296 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ10142 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ10707 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ13483 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ21746 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ23755 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ25261 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ25806 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003
ââ31164 socat -U TCP-LISTEN:30005,reuseaddr,fork TCP-CONNECT:192.168.111.27:10003

Mar 17 21:03:30 Pi2 systemd[1]: Starting ADSB_Socat…
Mar 17 21:03:30 Pi2 systemd[1]: Started ADSB_Socat.
Mar 17 21:03:32 Pi2 ADSB_Socat.sh[345]: 2016/03/17 21:03:32 socat[550] E connect(5, AF=2 192.168.111.27:10003, 16): Network is unreachable
Mar 17 21:04:03 Pi2 ADSB_Socat.sh[345]: 2016/03/17 21:04:03 socat[632] E connect(5, AF=2 192.168.111.27:10003, 16): Network is unreachable

I need to look into this a little more.*

You could try passing the -T option to socat perhaps, so the children die off if the connection stalls (if the radarcape is rebooting without closing the TCP connection down cleanly, the connection can stay alive on the Pi side forever as it never writes to it so never notices it is dead)

The radarcape should be sending a status message once a second so you can set that timeout quite aggressively low.

that makes sense i shall give it a go

The -T works a treat, i still have downtime but its in the region of a couple of minutes rather than an hour.

i used -T 60 dont think i needed to be super aggressive

thank you, now i need to work out why the radarcape is rebooting so often.

going to give this a bump because…of the beasts-spliter program as looks like i should be able to get mlat working through it.
Tried following this post https://discussions.flightaware.com/ads-b-flight-tracking-f21/mode-s-beast-to-dump1090-t37135-50.html

i’ve got it installed and it appears to be working and seeing the radarcape by using the command

beast-splitter --net 192.168.111.27:10003 --listen 30005:R --connect localhost:30104:R

However the client FA client and beast-splitter complain about not being able to connect to 127.0.01:30104

localhost:30104: connection to 127.0.0.1:30104 failed: Connection refused

i suspect because i dont have any dump1090 running. I’ve reverted to the socat option for the moment as it works now, i am just curious.

Try just
beast-splitter --net 192.168.111.27:10003 --listen 30005:R
That should be enough to feed Piaware on the local device.

that was fast, i’ll leave it alone for today, not got anymore time to play and its currently working. So i shall break it again tomorrow.

I got my beast-splitter working last week so have the info fresh in my head.

that appears to be working.

I’m guessing then that port 30104 is part of the dump1090 that the FA software normally uses as i still don’t get mlats results as i don’t think faup1090 does mlat or i am using the wrong port from the radarcape.

In the standard piaware setup, dump1090 accepts mlat results on port 30104 for display and fa-mlat-client will try to connect there.
The beast-splitter config above uses that port to feed the beast data to a --net-only dump1090 instance, again just for display.

so I’m seeing the mlat port error, but from what you said in your post it is just trying to connect locally to display the mlat results. As i don’t have a dump1090 running there isn’t anything to connect to.

06/24/2016 17:05:34 mlat(14227): Beast-format results connection with localhost:30104: [Errno 111] Connection refused
06/24/2016 17:06:04 mlat(14227): Beast-format results connection with localhost:30104: [Errno 111] Connection refused
06/24/2016 17:06:34 mlat(14227): Beast-format results connection with localhost:30104: [Errno 111] Connection refused
06/24/2016 17:06:57 mlat(14227): Receiver status: connected
06/24/2016 17:06:57 mlat(14227): Server status: not synchronized with any nearby receivers
06/24/2016 17:06:57 mlat(14227): Receiver: 1701.1 msg/s received 30.9kB/s from receiver
06/24/2016 17:06:57 mlat(14227): Server: 0.0 kB/s from server 0.1kB/s TCP to server 2.2kB/s UDP to server
06/24/2016 17:06:57 mlat(14227): Aircraft: 42 of 88 Mode S, 36 of 138 ADS-B used
06/24/2016 17:07:04 mlat(14227): Beast-format results connection with localhost:30104: [Errno 111] Connection refused
06/24/2016 17:07:34 mlat(14227): Beast-format results connection with localhost:30104: [Errno 111] Connection refused
06/24/2016 17:08:04 mlat(14227): Beast-format results connection with localhost:30104: [Errno 111] Connection refused
06/24/2016 17:08:34 mlat(14227): Beast-format results connection with localhost:30104: [Errno 111] Connection refused
06/24/2016 17:08:41 1521429 msgs recv’d from beast-splitte (3994 in last 5m); 1521338 msgs sent to FlightAware

So my next question is, will this effect anything or just generate an error message locally?

Just disable piaware sending results to port 30104.

There is an option in piaware to do that.
From github.com/flightaware/piaware
something like
sudo piaware-config -mlatResults 0

good find did not think to look at the actual piaware git bit because i had that running already.

done it, and the log look convincing.

thank you.