gpsd-dev
[Top][All Lists]
Advanced

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

gpsd Reliable and resilient tcp feed


From: Nick Taylor
Subject: gpsd Reliable and resilient tcp feed
Date: Fri, 24 Sep 2021 15:57:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

Hi all

We would appreciate some help... It seems that the option for using NMEA tcp feed to gpsd isn't very tolerant to network feed disconnects...

In the real world, we have a truck mounted device. We are running Debian and using gpsd - currently 3.22 and are provided with a tcp feed from an adjacent device as clients wish to minimise antenna on the trucks.

These feeds come and go as truck is turned on and off, our unit is battery backed so often doesn't power cycle with the device providing the feed.

Upshot is that normal config of gpsd drops the tcp feed as soon as it disappears, we have done some work to provide a reconnect in this case but this has introduced other problems as the connect phase can hang and locks up gpsd (doesn't respond to clients eg gpspipe -r)

Attached please find our patch as it is so far, together with debug log showing where the tcp connect hangs...

Obviously there are a number of possible solutions for example:

- set timeout on the tcp connect

- use non blocking connect

- use async connect

Views/guidance from the gurus here would be much appreciated

TIA

Nick
(our developer is Dan who is now also subscribed)

# ./gpsd -D 5 -N tcp://192.168.2.54:10110
gpsd:WARN: This system has a 32-bit time_t.  This gpsd will fail at 2038-01-19T03:14:07Z.
gpsd:INFO: launching (Version 3.22)
gpsd:IO: opening IPv4 socket
gpsd:IO: opening IPv6 socket
gpsd:INFO: listening on port gpsd
gpsd:PROG: NTP: shmat(0,0,0) succeeded, segment 0
gpsd:PROG: NTP: shmat(32769,0,0) succeeded, segment 1
gpsd:PROG: NTP: shmat(65538,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(98307,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(131076,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(163845,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(196614,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(229383,0,0) succeeded, segment 7
gpsd:PROG: shmget(0x47505344, 24232, 0666) for SHM export succeeded
gpsd:PROG: shmat() for SHM export succeeded, segment 262152
gpsd:INFO: stashing device tcp://192.168.2.54:10110 at slot 0
gpsd:INFO: running with effective group ID 20
gpsd:INFO: running with effective user ID 65534
gpsd:INFO: startup at 2021-09-24T14:05:15.000Z (1632492315)
gpsd:CLIENT: => client(0): {"class":"VERSION","release":"3.22","rev":"3.22","proto_major":3,"proto_minor":14}\x0d\x0a gpsd:INFO: #### device[0]:tcp://192.168.2.54:10110 needed 0 fd -1 last_data_ts 1970-01-01 00:00:00 UTC gpsd:INFO: #### device[1]: needed 0 fd 0 last_data_ts 1970-01-01 00:00:00 UTC gpsd:INFO: #### device[2]: needed 0 fd 0 last_data_ts 1970-01-01 00:00:00 UTC gpsd:INFO: #### device[3]: needed 0 fd 0 last_data_ts 1970-01-01 00:00:00 UTC
gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"nmea":true};\x0a
gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook
gpsd:INFO: opening TCP feed at 192.168.2.54, port 10110.

Attachment: 0001-gpsd-tcp-retry.patch
Description: Text Data


reply via email to

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