Hello GPSD-dev!
I recently started working with Chrony using their NTP implementation. Now I need to make my system compatible with GPS time using Chrony. Seeing that there is an integration between Chrony and GPSD I decided to investigate further.
What I would like to do is see how Chrony would behave under controlled input (probably using gpsfake) from GPSD. I have a logfile with NMEA statements that I try to replay through gpsfake like so:
$ gpsfake -c 0.5 log.nmea
With the following configurations attempts in Chrony
refclock SHM 0 offset 0.0 delay 0.2 refid NEMA
refclock SHM 1 offset 0.0 delay 0.1 refid PPS
refclock SOCK /var/run/chrony.2.sock delay 0.0 refid SOC1
refclock SOCK /var/run/chrony.pts2.sock delay 0.0 refid SOC2
None of the refclocks will receive any data in Chrony while gpsfake is running. However gpsmon and gpspipe -r does see the output. Do note that no real GPS is configured on my system.
I haven't a sense for the source code of gspfake, but I do see some code which looks designed NOT to run if the GPS input data is received by gspfake. I have tried to remove the following code from the method "ntpshm_link_activate" in timehint.c, but to no avail.
/* don't talk to NTP when we're running inside the test harness */
if (session->sourcetype == source_pty)
return;
So my question is the following: Is it possible to replay an NMEA logfile through gpsfake and have GPSD process/send the data to Chrony?
Kind regards,
Simon Larsen
![Sent from Mailspring]()