AW: Set time from gpsd

Walter Harms wharms at bfs.de
Thu Apr 23 08:32:10 UTC 2020


Sorry i did not notice nobody answered:

according to my notebook:

ntp.conf

server 127.127.28.0 minpoll 4
fudge  127.127.28.0 time1 0.183 refid NMEA
server 127.127.28.1 minpoll 4 prefer
fudge  127.127.28.1 refid PPS

ntpq -p
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
xSHM(0)          .NMEA.           0 l   11   16  377    0.000  144.714   3.026
SHM(1)          .PPS.            0 l    -   16    0    0.000    0.000   0.000

the gpsd can be a bitch:
 gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock

/dev/ttyUSB0 is actually a *bad* there is no guarantee that the gps-mouse is there.

hint: some systems save the time before they shutdown (raspbian thx) that confused the gps-driver
inside the ntpd. 

attention: 
i used the "real" ntpd here
these notes are a bit older: your millage may vary.
I do not thing that the bb-ntpd has support for all the different interfaces.
you may like to try this note:

GPSDATE=$( gpspipe -w | head -10 | grep TPV | sed -r 's/.*"time":"([^"]*)".*/\1/' | head -1 )
echo $GPSDATE
date -s "$GPSDATE"
/usr/sbin/ntpd

hope that helps,

re,
 wh

________________________________________
Von: busybox <busybox-bounces at busybox.net> im Auftrag von Tom Isaacson <tom.isaacson at teknique.com>
Gesendet: Donnerstag, 23. April 2020 09:54
An: busybox at busybox.net
Betreff: Re: Set time from gpsd

Nobody has done this?


On Fri, Apr 3, 2020 at 5:28 PM Tom Isaacson <tom.isaacson at teknique.com<mailto:tom.isaacson at teknique.com>> wrote:
How can we setup ntpd to get time from gpsd? We've got gpsd running and writing the time to shared memory but running ntpd with:
$ ntpd -nNdddd -p 127.127.28.0
doesn't seem to work - we just get "ntpd: reply from 127.127.28.0<http://127.127.28.0>: peer is unsynced". Any suggestions?

Thanks.

Tom Isaacson




More information about the busybox mailing list