[chrony-users] Integrating chrony with gpsd

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]

I wonder if anyone can help....this is mainly a chronyd question, with a bit of gpsd thrown in....

I have been trying to setup chronyd to grab time from a USB connected GPS module. 
The module has a RTC and battery backup, so the NMEA strings contain a valid time even when there is no fix. 

gpsd has been set up successfully, using the following config file: 
# Start the gpsd daemon automatically at boot time

# Use USB hotplugging to add new USB devices automatically to the daemon

# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
# Other options you want to pass to gpsd

And using cgps I can see the time. In addition, I can telnet into gpsd and see the time: 
pi@raspberrypi:~ $ telnet 2947
Connected to
Escape character is '^]'.

I have set up chronyd using the following config file: 
  GNU nano 3.2                                       /etc/chrony/chrony.conf                                                  

driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC

# Specify directory for log files.
logdir /var/log/chrony
refclock SHM 0 offset 0.5 delay 0.2 refid NMEA

However, my chrony status is always:

Code: Select all

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
#? NMEA                          0   4     0     -     +0ns[   +0ns] +/-    0ns

If I am correct, then the "?" means chronyd can not connect to gpsd...? 

This test was carried out when the GPS had no fix - should I expect chronyd to get time successfully in the absence of a GPS fix in this scenario (since the NMEA strings do still contain time thanks to the RTC)....or is there some other issue I am missing? 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/