[chrony-users] gpsd with no rtc and no network |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: "chrony-users@xxxxxxxxxxxxxxxxxxxx" <chrony-users@xxxxxxxxxxxxxxxxxxxx>
- Subject: [chrony-users] gpsd with no rtc and no network
- From: Brian Kuschak <bkuschak@xxxxxxxxx>
- Date: Thu, 8 Dec 2016 04:47:03 +0000 (UTC)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1481172462; bh=Lq8Cf2PS5CUCKlzAHfafCRzKjy8jDCrQJ/Ck3B7qj50=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=iX6rnicCoOXGvh9mWB4nkezXyfghBE2tJgFThm6mJRIS00tbmhDuWYoQOhdtXrKewv47v9NAZjB1AKWJKVLqshfR2FO5x6CjYmsUUGjYbbiUUAwObMzBLVqAyXHfV44+5N9HXoTvV8WGFP04F2BOFTrrqckk6lN31FCutKTEiMohSmfp1Z2lfUkDnvgfcaZta9/yRsQZSUmLgapaiRE4BiZkkdo3KGVZ12B9Jok+eGrRUUYxCeBIuXwApXX0/8bV4Zioo8buRzpYHsYYbPuyhbUCiSw5yiFInNxFikbORYdYHBfp6SO+SoMt6XkWHPD0DZQFXbhLcJ+0mb0PMKl41w==
I'm trying to set up something simple. I want chrony to grab NMEA time as soon as it's available, and then sync to PPS. This system (BBB) has no battery-backed RTC and no network access.
When the time is initially correct (set via NTP when connected to network), chrony seems to work, and locks to PPS. But when it powers up with a default date of 2000, it never syncs after getting GPS lock.
It seems to step once, to the bogus RTC time. But then it never steps to NMEA time.
root@beaglebone:~# chronyd -d
2000-01-01T00:01:29Z chronyd version 2.4 starting (+CMDMON +NTP +REFCLOCK +RTC -PRIVDROP -SCFILTER -SECHASH +ASYNCDNS +IPV6 +DEBUG)
2000-01-01T00:01:29Z Setting filter length for PPS to 1
2000-01-01T00:01:29Z Setting filter length for NMEA to 2
2000-01-01T00:01:29Z Frequency -40.366 +/- 234.206 ppm read from /var/lib/chrony/chrony.drift
2000-01-01T00:01:29Z Using right/UTC timezone to obtain leap second data
2000-01-01T00:01:36Z Selected source NMEA
2000-01-01T00:01:36Z System clock wrong by -11404807.817246 seconds, adjustment started
1999-08-22T00:01:28Z System clock was stepped by -11404807.817246 seconds
1999-08-22T00:01:55Z Can't synchronise: no selectable sources
1999-08-22T00:02:00Z Selected source NMEA
1999-08-22T00:02:02Z System clock wrong by -0.029797 seconds, adjustment started
1999-08-22T00:02:04Z System clock wrong by 0.020517 seconds, adjustment started
1999-08-22T00:02:15Z RTC wrong by 11404807.787 seconds (step)
1999-08-22T00:02:15Z Could not set RTC time
1999-08-22T00:02:18Z Can't synchronise: no selectable sources
1999-08-22T00:02:36Z Selected source NMEA
1999-08-22T00:02:36Z System clock wrong by 361331.850290 seconds, adjustment started
1999-08-26T04:24:48Z System clock was stepped by 361331.850290 seconds
1999-08-26T04:24:50Z Can't synchronise: no selectable sources
1999-08-26T04:25:10Z RTC wrong by 11043475.933 seconds (step)
1999-08-26T04:25:10Z Could not set RTC time
brian@beaglebone:~$ chronyc sources
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? PPS 0 0 0 - +0ns[ +0ns] +/- 0ns
#? NMEA 0 1 377 2 -6314d[ -6314d] +/- 10559m
brian@beaglebone:~$ chronyc tracking
Reference ID : 127.127.1.1 ()
Stratum : 10
Ref time (UTC) : Thu Aug 26 04:40:34 1999
System time : 0.000000000 seconds slow of NTP time
Last offset : -361331.843750000 seconds
RMS offset : 114263.164062500 seconds
Frequency : 40.366 ppm slow
Residual freq : +0.000 ppm
Skew : 0.000 ppm
Root delay : 0.000000 seconds
Root dispersion : 0.000003 seconds
Update interval : 20.0 seconds
Leap status : Normal
brian@beaglebone:~$ chronyc rtcdata
RTC ref time (UTC) : Thu Aug 26 04:43:22 1999
Number of samples : 4
Number of runs : 0
Sample span period : 3
RTC is fast by : 0.347582 seconds
RTC gains time at : -77.250 ppm
brian@beaglebone:~$ cat /etc/chrony/chrony.conf
# use at least this many samples of the refclock measurement to reduce jitter
minsamples 10
maxsamples 60
# measure kernel PPS every second, referenced to NMEA time.
refclock PPS /dev/pps0 poll 0 refid PPS lock NMEA maxsamples 60 prefer
# Get NMEA data from gpsd over shared memory.
# Our GPS sends $GSV (sats in view) followed by $GLL (time), at 9600 bps, so the
# time msg is delayed a variable amount. To help get a better time estimate when using
# NMEA only, we estimate this to be fixed offset of 160 msec. Assume a variable delay
# of +/- 250 msec.
# Allow this measurement to set clock initially. This also serves as a fallback in case
# a clock discontinuity causes PPS to fail sanity checking. (Otherwise, PPS will
# permanently become invalidated and time sync will never resume.)
# Measure the NMEA time every 2 seconds.
#
refclock SHM 0 offset 0.160 delay 0.5 poll 1 refid NMEA
# Step the clock if the time is off by more than N seconds.
makestep 5.0 -1
leapsectz right/UTC
driftfile /var/lib/chrony/chrony.drift
# Disable logging to save space...
#log tracking measurements statistics refclocks
logdir /var/log/chrony
# Log any adjustment of > 10 msec
logchange 0.01
dumponexit
dumpdir /var/lib/chrony
# Use real-time scheduler priority
sched_priority 5
# if there's a local clock issue, the PPS changes stratum to match this stratum.
# 10 means very suspect.
local stratum 10
# act as NTP server
allow
# Update the RTC if error is > N seconds
rtconutc
rtcautotrim 1.0
rtcfile /var/lib/chrony/chrony.rtc
# do not use any NTP servers
#pool us.pool.ntp.org iburst offline
# No NTP authentication used
#keyfile /etc/chrony/chrony.keys
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.