gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gpsd tcp NMEA feed


From: Nick Taylor
Subject: Re: gpsd tcp NMEA feed
Date: Mon, 26 Sep 2022 17:19:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

Hi again

Reran my test with newer client:
Linux TSB-168 5.4.106-itb3.04 #1 PREEMPT Tue Jul 26 13:39:10 BST 2022 armv7l GNU/Linux

Exact same result

Best

Nick


On 26/09/2022 15:58, Nick Taylor wrote:
Hi Frank

Sorry for the incomplete report...

On 26/09/2022 14:59, Frank Nicholas wrote:
Hello Nick,

Gary’s probably going to need more information:
1. Version of GPSD on both client & server?
Both are:
gpsd: 3.24.1~dev (revision release-3.24-266-g371949e15)

2. Where was GPSD obtained from:  Linux distro, tarball binary (from where?), or compiled from source?
Compiled from recent git head
3. Is systemd involved on the client or server?
Normally yes, but I am running gpsd in debug mode from command line
4. What OS & version are you running GPSD on?
We're still running debian stretch!!

Linux TSB-318 4.4.19-itb2.02 #1 PREEMPT Fri Feb 4 18:18:14 UTC 2022 armv7l GNU/Linux

I'm well aware that this is rather old - will rerun test with client on bullseye 5.4.106 (I assume that it's a client side issue so server can stay on the older kernel)

Best

Nick
On Sep 26, 2022, at 7:13 AM, Nick Taylor <nicktaylor@dataskill.uk> wrote:

Hey Gary

You may recall in the dim and distant past we hassled you for a change to make the tcp NMEA feed option more reliable and resilient... It has taken us a long long time to get approval to test this on our customer installations but we are now able to see how the option performs in the real world.

For some reason the feed works fine for a while and then gpsd stops receiving feed - even though we can verify feed using telnet. I have managed to setup a fail situation which may or may not be similar to what's happening in the field, however I think this is still a valid case where it would be nice if gpsd could reconnect to the feed.

My test setup is as follows:

Machine A running std gpsd with feed from hardware device

Create tcp feed from machine A as per your docs:
socat EXEC:'gpspipe -r' TCP-LISTEN:2948,reuseaddr,fork

Machine B run gpsd in debug mode:
gpsd -D5 -n -N tcp://192.168.2.53:2948

All good so farnow interrupt the feed from machine A as follows:
iptables -I OUTPUT -d 192.168.2.52 -j DROP; sleep 1200; iptables -D OUTPUT -d 192.168.2.52 -j DROP

Machine A we see this:
2022/09/26 09:55:07 socat[16311] E write(7, 0x7f674db0, 8192): Connection timed out

gpsd log on machine B loops as follows:
gpsd:PROG: CORE: pselect: timeout
gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true};

gpsd:PROG: awaken(0) fd 7, path tcp://192.168.2.53:2948
gpsd:PROG: device 0 (fd=7, path tcp://192.168.2.53:2948) already active. gpsd:CLIENT: => client(0) len 278: {"class":"DEVICES","devices":[{"class":"DEVICE","path":"tcp://192.168.2.53:2948","driver":"NMEA0183","a
ctivated":"2022-09-26T09:37:29.345Z","flags":1}]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}

gpsd:PROG: CORE: pselect: timeout
gpsd:PROG: gpsd_multipoll(7) DEVICE_UNCHANGED for 5
gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true};

gpsd:PROG: awaken(0) fd 7, path tcp://192.168.2.53:2948
gpsd:PROG: device 0 (fd=7, path tcp://192.168.2.53:2948) already active. gpsd:CLIENT: => client(0) len 278: {"class":"DEVICES","devices":[{"class":"DEVICE","path":"tcp://192.168.2.53:2948","driver":"NMEA0183","a
ctivated":"2022-09-26T09:37:29.345Z","flags":1}]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}

gpsd:PROG: CORE: pselect: timeout
gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true};

gpsd:PROG: awaken(0) fd 7, path tcp://192.168.2.53:2948
gpsd:PROG: device 0 (fd=7, path tcp://192.168.2.53:2948) already active. gpsd:CLIENT: => client(0) len 278: {"class":"DEVICES","devices":[{"class":"DEVICE","path":"tcp://192.168.2.53:2948","driver":"NMEA0183","a
ctivated":"2022-09-26T09:37:29.345Z","flags":1}]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}

Feed can be seen on machine B using telnet, but it seems gpsd doesn't notice the failed connection and the only way I found to recover is to restart gpsd

Your input would be much appreciated

Thanks and regards

Nick






reply via email to

[Prev in Thread] Current Thread [Next in Thread]