FlightAware Discussions

Difficulty getting firehose from piaware


#1

Running 3.6.3 on raspian stretch on RPi 3B+.
piaware-config shows that enable-firehose is set to yes.
I have successfully initiated the TLS connection to port 1501. (this requires a nontrivial handshake, so I was thinking things were good at this point)

I send the initiation line “live username pirehose password pirehose”.

At this point the remote end (ie piaware) closes the connection.
This is what one might expect the server to do if I got the credentials wrong, but I copied those credentials directly from the flightaware web pages, so I don’t know what to do better.

Has anyone successfully read firehose data from piaware, and if so, suggest what I might be doing wrong.


#2

I just checked on a FlightFeeder here (should be the same on a piaware, I just don’t have one immediately on hand) and it seems OK:

$ openssl s_client -connect ff-7252.local:1501
[...]
live username pirehose password pirehose
{"facility_hash":"01234567","alt":"3950","lon":"0.36354","gs":"199","type":"position","hexid":"44033E","air_ground":"A","gps_alt":"3825","ident":"#44033E","squawk":"2727","clock":"1543337779","id":"44033E-1543337779-piaware-1","heading":"126","lat":"52.04031","baro_alt":"3950","updateType":"A","facility_name":"Local ADS-B","pitr":"1543337779"}
{"facility_hash":"76543210","alt":"38008","lon":"-1.1445","type":"position","hexid":"400EFD","air_ground":"A","gs":"360","ident":"#400EFD","clock":"1543337780","id":"400EFD-1543337780-piaware-3","heading":"323","lat":"52.6327","baro_alt":"38008","updateType":"M","facility_name":"FlightAware MLAT","pitr":"1543337780"}
{"facility_hash":"76543210","alt":"16406","lon":"-0.393","type":"position","hexid":"A8B5FC","air_ground":"A","gs":"399","ident":"#A8B5FC","clock":"1543337781","id":"A8B5FC-1543337781-piaware-4","heading":"330","lat":"52.1163","baro_alt":"16406","updateType":"M","facility_name":"FlightAware MLAT","pitr":"1543337781"}

I’ll doublecheck that it’s OK on a piaware image too.


#3

Thank you! that’s a nice simple way to test, and it works for me just as your example. I had never used openssl from the command line so I didn’t realize how easy it was.

This eliminates credentials as a possible cause of my difficulty. I’ll continue with my debugging.

Thanks again.


#4

Well, I have the answer … at least to a certain level.

I downloaded the C# sample code provided by FlightAware, and it malfunctions in exactly the same way my code malfunctioned. (Not surprising, as we’re making the same calls.)

I figured the sample code must have worked at some time in the past, so I changed the .Net Framework version, and bingo, your code works. Did the same for my own code, and it suddenly began working.

.Net Framework 4.7.1 – malfunction
.Net Framework 4.6 – works!

Similarly, using .Net Core 2.1 malfunctions, but I haven’t tried earlier versions of .Net Core yet.

I don’t know the reason for sure. There were some changes in TLS handling in recent versions, which has to do with which versions of TLS are allowed. I presumed that this would default to the “right” way, but the documentation seems a bit complex on this point, as they decided to allow many ways to specify behavior for maximum compatibility with god-knows-what, so I’ll defer figuring out exactly what must be done to work with latest libraries. I did these tests on Windows 7, which probably matters, as the TLS defaults in the OS and the .Net libraries are entangled.

Meanwhile, I’m up & running.


#5

Shouldn’t in the title, the typo firehose be changed to pirehose?

Seems auto spelling corrector has silently changed pirehose to firehose, which was the closest match in its dictionary.


#6

No. The service is named “firehose”. The credentials for the firehose service on the piaware are “pirehose”.


#7

Thanks for clarifying.
Any reason why it is called “fire hose”?


#8

I don’t know the origin of the name. Firehose a relatively new service from FlightAware, which is available streaming from their central database (costs money), or from your piaware (free).


I don’t quite yet have an opinion about whether it is better or worse than their other products. I’m trying it in order to find out.


#9

From the expression “trying to drink from a firehose”…
(a full feed with no filters set is, uh, quite high volume)