<html><head>

<style id="css_styles" type="text/css">blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: right;'] {  list-style-position: inside;}
body { font-family: Segoe UI; font-size: 12pt;   }</style></head><body class="plain"><div>Hi Hal.</div>
<div><br /></div><div id="xe5a79f054fc2443"><blockquote type="cite" class="cite2"><div class="plain_line">It could be a bug in our code, but that seems like the sort of thing that</div>
<div class="plain_line">would get noticed.</div></blockquote></div><div id="xe5a79f054fc2443"><span>Even if I stop gpsd, which kills both shared-memory segments, and reduce my ntp.conf file to this:</span></div><div id="xe5a79f054fc2443"><span><br /></span></div><div id="xe5a79f054fc2443"><span><font face="Courier New">refclock shm unit 0 refid GPS</font></span></div><div id="xe5a79f054fc2443"><span><br /></span></div><div id="xe5a79f054fc2443"><span>I still see this error (in stdout, since there's no log file):</span></div><div id="xe5a79f054fc2443"><span><br /></span></div><div id="xe5a79f054fc2443"><span><font face="Courier New">2020-03-19T22:13:50 ntpd[23312]: CONFIG: configpeers: Ignoring duplicate '127.127.28.0' </font></span></div><div id="xe5a79f054fc2443"><span><font face="Courier New"><br /></font></span></div><div id="xe5a79f054fc2443"><font size="3">Is it possible to define a reference clock (using the refclock command) without provoking this error?</font></div><div id="xe5a79f054fc2443"> </div><div id="xe5a79f054fc2443"><blockquote type="cite" class="cite2">
<div class="plain_line">ntpd does scan a directory, something like /etc/ntp.d/, but I thought that</div>
<div class="plain_line">added a log message if it found anything.  gpsd may have put something there.</div></blockquote><span>Nothing unusual in /etc/ntp.d:</span></div><div id="xe5a79f054fc2443"><span><br /></span></div><div id="xe5a79f054fc2443"><font face="Courier New">-rw-r--r--  1 root root  577 Mar 19 22:21 ntp.conf<br />-rw-r--r--  1 root root 1437 Sep 27  2018 use-country-pool<br />-rw-r--r--  1 root root  652 Mar 19 22:16 use-gpsd-gps-shm<br />-rw-r--r--  1 root root  379 Sep 27  2018 use-gpsd-json<br />-rw-r--r--  1 root root  631 Mar 19 22:20 use-gpsd-pps-shm<br />-rw-r--r--  1 root root  178 Sep 27  2018 use-minimal-logging<br />-rw-r--r--  1 root root  416 Sep 27  2018 use-no-remote-configuration<br />-rw-r--r--  1 root root  465 Sep 27  2018 use-performance-logging<br />-rw-r--r--  1 root root 1246 Sep 27  2018 use-pool<br /></font><br /><blockquote type="cite" class="cite2">
<div class="plain_line"><span>There is probably a way to tell gpsd how to find the PPS device.  My guess</span></div></blockquote><span>I believe the official method is to include it on the command line. :-) <br /></span><blockquote type="cite" class="cite2"><div class="plain_line"><span><br /></span></div>
<div class="plain_line">would be that it looks for /dev/pps0 when it opens the first serial port and</div>
<div class="plain_line">uses if if it finds one, else does the ldattach dance to make it.</div></blockquote><span>gpsd doesn't find /dev/pps0 unless I specify it on the command line.<br /></span><blockquote type="cite" class="cite2"><div class="plain_line"><br /></div>
<div class="plain_line"> <span>If nothing else, there is a HOWTO on setting up a Raspberry Pi and that has a</span></div>
<div class="plain_line">separate PPS via GPIO.</div>
<div class="plain_line">  <a href="https://www.ntpsec.org/white-papers/stratum-1-microserver-howto/">https://www.ntpsec.org/white-papers/stratum-1-microserver-howto/</a></div></blockquote><span>Since I'm using a hardware interrupt, rather than a GPIO input, the pps-gpio driver isn't useful. But what it does is trivial, and my kernel driver does the same thing. </span></div><div id="xe5a79f054fc2443"><span><br /></span></div><div id="xe5a79f054fc2443"><span>But - since there's nothing to indicate that either PPS or gpsd has a problem...</span></div><div id="xe5a79f054fc2443"><span><br /></span><blockquote type="cite" class="cite2"><blockquote type="cite" class="cite2"><div class="plain_line"> I'd like to understand why that is. So far, I've  managed to improve things a</div>
<div class="plain_line"> bit by adjust the GPS offset</div>
</blockquote>
<div class="plain_line"> </div>
<div class="plain_line">That's the mindist stuff in my second message.  I forgot to include this line</div>
<div class="plain_line">from my ntp.conf</div>
<div class="plain_line"> </div>
<div class="plain_line">tos mindist 0.250                      # default is 0.001 (1 ms)</div></blockquote><span>And that seems to be the magic incantation that has been missing from my ntp.conf until now!</span></div><div id="xe5a79f054fc2443"><span>250 ms is probably more generous than I need - I don't see offsets greater than about 15 ms, but it probably doesn't hurt</span><br /></div><div id="xe5a79f054fc2443"><span><br /></span></div><div id="xe5a79f054fc2443"><span>I think the mystery is finally solved!</span></div><div id="xe5a79f054fc2443"><span>Thanks,</span></div><div id="xe5a79f054fc2443"><span><br /></span></div><div id="xe5a79f054fc2443"><span>-Nick</span></div>
</body></html>