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: Gary E. Miller
Subject: Re: New gpsd version with TCP reconnect
Date: Tue, 25 Oct 2022 15:59:14 -0700

Yo Nick!

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

And getting the NMEA remotely this way:

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

It starts up:

gpsd:INFO: launching (Version 3.24.1~dev, revision release-3.24-285-ga423bbb48)
gpsd:INFO: starting uid 0, gid 0
gpsd:INFO: Command line: gpsd -D 4 -n -N tcp://204.17.205.27:2948 

It locks on the NMEA:

[...]
gpsd:PROG: NMEA0183: GPGSV: part 5 of 5 nmea_gnssid 0 nmea_sigid 0 ubx_sigid 0
gpsd:PROG: NMEA0183: GPGSV: Satellite data OK (5 of 5).
gpsd:PROG: NMEA0183: GPGSV is just after a cycle ender. ({SATELLITE})
gpsd:INFO: CORE: PRN   3 az 173.0 el 38.0 ( 0.096034, -0.782137,  0.615661)
gpsd:INFO: CORE: PRN   4 az  39.0 el 78.0 ( 0.130843,  0.161578,  0.978148)
gpsd:INFO: CORE: PRN  16 az  98.0 el 49.0 ( 0.649674, -0.091306,  0.754710)
gpsd:INFO: CORE: PRN  26 az  59.0 el 36.0 ( 0.693463,  0.416675,  0.587785)
gpsd:INFO: CORE: Sats used (4):
gpsd:PROG: NMEA0183: GPZDA starts a reporting cycle. lasttag 22
[...]


I kill the remote, and gpsd times out, after varying intervals:

gpsd:PROG: CORE: pselect: timeout
gpsd:INFO: CORE: tcp://204.17.205.27:2948 is offline ( 2.832017869 sec since 
data)
gpsd:INFO: CORE: closing tcp://204.17.205.27:2948, fd 6
gpsd:PROG: CORE: no /etc/gpsd/device-hook present, skipped running DEACTIVATE 
hook. No such file or directory(2)
gpsd:PROG: CORE: pselect: timeout
gpsd:PROG: CORE: pselect: timeout

Then gpsd tris to reconnect, repeatedly:

gpsd:INFO: reconnection attempt on device 0, tcp://204.17.205.27:2948
gpsd:PROG: awaken(0) fd -2, path tcp://204.17.205.27:2948
gpsd:PROG: CORE: gpsd_activate(tcp://204.17.205.27:2948, 2) fd -2
gpsd:PROG: CORE: no /etc/gpsd/device-hook present, skipped running ACTIVATE 
hook. No such file or directory(2)
gpsd:PROG: CORE: gpsd_open(tcp://204.17.205.27:2948) fd -2
gpsd:PROG: CORE: opening TCP feed at 204.17.205.27, port 2948.
gpsd:PROG: CORE: TCP tcp://204.17.205.27:2948 IP  opened on fd 6
gpsd:PROG: CORE: activate fd 6 done
gpsd:WARN: PACKET: packet_get(6) errno: Connection refused(111)

But fails.

Reenable the connection to the socat, gpsd retries, and succeeds:

gpsd:PROG: CORE: pselect: timeout
gpsd:INFO: reconnection attempt on device 0, tcp://204.17.205.27:2948
gpsd:PROG: awaken(0) fd -2, path tcp://204.17.205.27:2948
gpsd:PROG: CORE: gpsd_activate(tcp://204.17.205.27:2948, 2) fd -2
gpsd:PROG: CORE: no /etc/gpsd/device-hook present, skipped running ACTIVATE 
hook. No such file or directory(2)
gpsd:PROG: CORE: gpsd_open(tcp://204.17.205.27:2948) fd -2
gpsd:PROG: CORE: opening TCP feed at 204.17.205.27, port 2948.
gpsd:PROG: CORE: TCP tcp://204.17.205.27:2948 IP  opened on fd 6
gpsd:PROG: CORE: activate fd 6 done
gpsd:PROG: CORE: switching to match packet type 19: 
{"class":"VERSION","release":"3.24.1~dev","rev":"release-3.24-285-ga423bbb48","proto_major":3,"proto_minor":15}

NMEA is detected, and things are back to normal:

gpsd:PROG: CORE: switch_driver(NMEA0183) called...
gpsd:PROG: CORE: selecting NMEA0183 driver...
gpsd:PROG: => Probing for Trimble Copernicus
gpsd:PROG: NMEA0183: GPGSV: part 1 of 5, last_gsv_talker '0'  last_gsv_sigid 0
gpsd:PROG: NMEA0183: GPGSV: part 1 of 5 nmea_gnssid 0 nmea_sigid 0 ubx_sigid 0
gpsd:PROG: NMEA0183: GPGSV: new part 1, last_gsv_talker '0', zeroing
gpsd:PROG: NMEA0183: GPGSV: Partial satellite data (1 of 5).

So I am unable to uplicate your issue.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpbkEXYdR3vu.pgp
Description: OpenPGP digital signature


reply via email to

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