gpsd-users
[Top][All Lists]
Advanced

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

Re: New gpsd version with TCP reconnect


From: Nick Taylor
Subject: Re: New gpsd version with TCP reconnect
Date: Mon, 31 Oct 2022 11:30:31 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

Yo Gary

My failure case occurs if I interrupt the feed using iptables...

On 25/10/2022 23:59, Gary E. Miller wrote
So I finally got a test running.  tcp:// reconnect is working fine for me.

I'm feeding nmea this way:

# socat EXEC:'gpspipe -r' TCP-LISTEN:2948,reuseaddr,fork
Yep I have the same

And getting the NMEA remotely this way:

# gpsd -D 4 -n -N  tcp://204.17.205.27:2948

I use similar to this

Test is as follows:

On the source server:

root@TSB-1650:~# socat EXEC:'gpspipe -r' TCP-LISTEN:2948,reuseaddr,fork&
[1] 14020
root@TSB-1650:~# iptables -I OUTPUT -d 192.168.2.52 -j DROP
root@TSB-1650:~# date
Mon Oct 31 11:04:01 UTC 2022
root@TSB-1650:~# 2022/10/31 11:21:32 socat[14469] E write(7, 0x7f695d98, 8192): Connection timed out
date
Mon Oct 31 11:22:39 UTC 2022
root@TSB-1650:~# iptables -D OUTPUT -d 192.168.2.52 -j DROP
root@TSB-1650:~#

So as you can see socat connection seems to time out after about 20 mins

Now dest gps log looks like this:



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","activated":"
2022-10-31T11:03:55.280Z","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","activated":"
2022-10-31T11:03:55.280Z","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","activated":"
2022-10-31T11:03:55.280Z","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","activated":"
2022-10-31T11:03:55.280Z","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","activated":"
2022-10-31T11:03:55.280Z","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","activated":"
2022-10-31T11:03:55.280Z","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","activated":"
2022-10-31T11:03:55.280Z","flags":1}]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}


Interrupt and restart gpsd and all back to normal

Hopefully you would see same symptoms in your setup?

Best

Nick




reply via email to

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