Discussion:
[chrony-users] getting chrony to work with gpsd on raspbian jessie with gps hat
Charles Muggen
2018-02-02 17:35:13 UTC
Permalink
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>I have a Raspberry Pi Model 2 running Raspbian Jessie. Attached to the Raspberry Pi is a GPS HAT from Adafruit. I think I have all the libs installed to get this to work, but for some reason I am getting question marks &quot;?&quot; when I run chronyc sources.</div>

<div>The goal is to get accurate time with no internet connection. The only time source is the GPS HAT.</div>

<div>Status printouts below.</div>

<div>Any hints/suggestions on getting this to work are greatly appreciated.</div>

<div>Thank you.</div>

<div>&nbsp;</div>

<div>chronyc sources</div>

<div>210 Number of sources = 2<br/>
MS Name/IP address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Stratum Poll Reach LastRx Last sample&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br/>
===============================================================================<br/>
#? GPS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp; +0ns[&nbsp;&nbsp; +0ns] +/-&nbsp;&nbsp;&nbsp; 0ns<br/>
#? PPS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp; +0ns[&nbsp;&nbsp; +0ns] +/-&nbsp;&nbsp;&nbsp; 0ns</div>

<div>&nbsp;</div>

<div>chronyc tracking</div>

<div>Reference ID&nbsp;&nbsp;&nbsp; : 7F7F0101 ()<br/>
Stratum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 8<br/>
Ref time (UTC)&nbsp; : Fri Feb 02 17:23:28 2018<br/>
System time&nbsp;&nbsp;&nbsp;&nbsp; : 0.000000004 seconds fast of NTP time<br/>
Last offset&nbsp;&nbsp;&nbsp;&nbsp; : +0.000000000 seconds<br/>
RMS offset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000000000 seconds<br/>
Frequency&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 7.218 ppm fast<br/>
Residual freq&nbsp;&nbsp; : +0.000 ppm<br/>
Skew&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000 ppm<br/>
Root delay&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000000000 seconds<br/>
Root dispersion : 0.000000000 seconds<br/>
Update interval : 0.0 seconds<br/>
Leap status&nbsp;&nbsp;&nbsp;&nbsp; : Normal</div>

<div>&nbsp;</div>

<div>systemctl status chronyd</div>

<div>&#9679; chronyd.service - NTP client/server<br/>
&nbsp;&nbsp; Loaded: loaded (/lib/systemd/system/chronyd.service; enabled)<br/>
&nbsp;&nbsp; Active: active (running) since Fri 2018-02-02 00:18:07 UTC; 17h ago<br/>
&nbsp;&nbsp;&nbsp;&nbsp; Docs: man:chronyd(8)<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; man:chrony.conf(5)<br/>
&nbsp;Main PID: 961 (chronyd)<br/>
&nbsp;&nbsp; CGroup: /system.slice/chronyd.service<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#9492;&#9472;961 /usr/local/sbin/chronyd</div>

<div>&nbsp;</div>

<div>&nbsp;</div></div></body></html>
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-02 17:51:44 UTC
Permalink
You line breaks are a mess.
You gps is not getting any data, and thus pps cannot work. Your system needs
to get the approximate time ( to better than 1/4 of a second) from somewhere
else than PPS, since PPS give no information about the actual time. Just when
the turn of the second occurs.
What is your chrony.conf file? How have you connected up gpsd? Is it seeing
the gps source?



William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by Charles Muggen
I have a Raspberry Pi Model 2 running Raspbian Jessie. Attached to the Raspberry Pi is a GPS HAT from Adafruit. I
think I have all the libs installed to get this to work, but for some reason I am getting question marks "?" when I
run chronyc sources.
The goal is to get accurate time with no internet connection. The only time source is the GPS HAT.
Status printouts below.
Any hints/suggestions on getting this to work are greatly appreciated.
Thank you.
 
chronyc sources
210 Number of sources = 2 MS Name/IP address         Stratum Poll Reach LastRx Last sample               
=============================================================================== #? GPS                          
0   4     0     -     +0ns[   +0ns] +/-    0ns #? PPS                           0   4     0     -     +0ns[   +0ns]
+/-    0ns
 
chronyc tracking
0.000000004 seconds fast of NTP time Last offset     : +0.000000000 seconds RMS offset      : 0.000000000 seconds
0.000000000 seconds Root dispersion : 0.000000000 seconds Update interval : 0.0 seconds Leap status     : Normal
 
systemctl status chronyd
active (running) since Fri 2018-02-02 00:18:07 UTC; 17h ago      Docs: man:chronyd(8)            man:chrony.conf(5)
 Main PID: 961 (chronyd)    CGroup: /system.slice/chronyd.service            └─961 /usr/local/sbin/chronyd
 
 
Charles Muggen
2018-02-02 18:41:02 UTC
Permalink
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>sorry about the line breaks...</div>

<div>is this better?</div>

<div>&nbsp;</div>

<div><strong>chrony.conf</strong></div>

<div>&nbsp;</div>

<div>
<div>driftfile /var/lib/chrony/chrony.drift</div>

<div>log tracking measurements statistics<br/>
logdir /var/log/chrony</div>

<div># Stop bad estimates upsetting machine clock.<br/>
maxupdateskew 100.0</div>

<div>dumponexit<br/>
dumpdir /var/lib/chrony</div>

<div>local stratum 8<br/>
manual<br/>
smoothtime 400 0.01<br/>
makestep .1 -1</div>

<div>allow<br/>
logchange 0.5<br/>
rtcsync</div>

<div># set larger delay to allow the NMEA source to overlap with<br/>
# the other sources and avoid the falseticker status<br/>
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2<br/>
refclock PPS /dev/pps0 lock NMEA</div>

<div>&nbsp;</div>

<div><strong>chrony sources</strong></div>

<div>&nbsp;</div>

<div>210 Number of sources = 2<br/>
MS Name/IP address &nbsp; &nbsp; &nbsp; &nbsp; Stratum Poll Reach LastRx Last sample &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br/>
===============================================================================<br/>
#? GPS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 &nbsp; 4 &nbsp; &nbsp; 0 &nbsp; &nbsp; - &nbsp; &nbsp; +0ns[ &nbsp; +0ns] +/- &nbsp; &nbsp;0ns<br/>
#? PPS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 &nbsp; 4 &nbsp; &nbsp; 0 &nbsp; &nbsp; - &nbsp; &nbsp; +0ns[ &nbsp; +0ns] +/- &nbsp; &nbsp;0ns</div>

<div>&nbsp;</div>

<div><strong>chrony tracking</strong></div>

<div>&nbsp;</div>

<div>Reference ID &nbsp; &nbsp;: 7F7F0101 ()<br/>
Stratum &nbsp; &nbsp; &nbsp; &nbsp; : 8<br/>
Ref time (UTC) &nbsp;: Fri Feb 02 17:23:28 2018<br/>
System time &nbsp; &nbsp; : 0.000000004 seconds fast of NTP time<br/>
Last offset &nbsp; &nbsp; : +0.000000000 seconds<br/>
RMS offset &nbsp; &nbsp; &nbsp;: 0.000000000 seconds<br/>
Frequency &nbsp; &nbsp; &nbsp; : 7.218 ppm fast<br/>
Residual freq &nbsp; : +0.000 ppm<br/>
Skew &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 0.000 ppm<br/>
Root delay &nbsp; &nbsp; &nbsp;: 0.000000000 seconds<br/>
Root dispersion : 0.000000000 seconds<br/>
Update interval : 0.0 seconds<br/>
Leap status &nbsp; &nbsp; : Normal</div>

<div>&nbsp;</div>

<div><strong>systemctl status chronyd</strong></div>

<div>&nbsp;</div>

<div>&#9679; chronyd.service - NTP client/server<br/>
&nbsp; &nbsp;Loaded: loaded (/lib/systemd/system/chronyd.service; enabled)<br/>
&nbsp; &nbsp;Active: active (running) since Fri 2018-02-02 00:18:07 UTC; 17h ago<br/>
&nbsp; &nbsp; &nbsp;Docs: man:chronyd(8)<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;man:chrony.conf(5)<br/>
&nbsp;Main PID: 961 (chronyd)<br/>
&nbsp; &nbsp;CGroup: /system.slice/chronyd.service<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#9492;&#9472;961 /usr/local/sbin/chronyd</div> <div>&nbsp;</div> <div>&nbsp;</div> </div> <div>&nbsp; <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Friday, February 02, 2018 at 12:51 PM<br/> <b>From:</b>&nbsp;&quot;Bill Unruh&quot; &lt;***@physics.ubc.ca&gt;<br/> <b>To:</b>&nbsp;chrony-***@chrony.tuxfamily.org<br/> <b>Subject:</b>&nbsp;Re: [chrony-users] getting chrony to work with gpsd on raspbian jessie with gps hat</div> <div name="quoted-content">You line breaks are a mess. You gps is not getting any data, and thus pps cannot work. Your system needs to get the approximate time ( to better than 1/4 of a second) from somewhere else than PPS, since PPS give no information about the actual time. Just when the turn of the second occurs. What is your chrony.conf file? How have you connected up gpsd? Is it seeing the gps source? William G. Unruh __&#124; Canadian Institute for&#124;____ Tel: +1(604)822-3273 Physics&amp;Astronomy _&#124;___ Advanced Research _&#124;____ Fax: +1(604)822-5324 UBC, Vancouver,BC _&#124;_ Program in Cosmology &#124;____ ***@physics.ubc.ca Canada V6T 1Z1 ____&#124;____ and Gravity ______&#124;_ <a href="http://www.theory.physics.ubc.ca/" target="_blank">www.theory.physics.ubc.ca/</a> On Fri, 2 Feb 2018, Charles Muggen wrote: &gt; I have a Raspberry Pi Model 2 running Raspbian Jessie. Attached to the Raspberry Pi is a GPS HAT from Adafruit. I &gt; think I have all the libs installed to get this to work, but for some reason I am getting question marks &quot;?&quot; when I &gt; run chronyc sources. &gt; The goal is to get accurate time with no internet connection. The only time source is the GPS HAT. &gt; Status printouts below. &gt; Any hints/suggestions on getting this to work are greatly appreciated. &gt; Thank you. &gt; &nbsp; &gt; chronyc sources &gt; 210 Number of sources = 2 MS Name/IP address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Stratum Poll Reach LastRx Last sample&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &gt; =============================================================================== #? GPS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; 0&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp; +0ns[&nbsp;&nbsp; +0ns] +/-&nbsp;&nbsp;&nbsp; 0ns #? PPS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp; +0ns[&nbsp;&nbsp; +0ns] &gt; +/-&nbsp;&nbsp;&nbsp; 0ns &gt; &nbsp; &gt; chronyc tracking &gt; Reference ID&nbsp;&nbsp;&nbsp; : 7F7F0101 () Stratum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 8 Ref time (UTC)&nbsp; : Fri Feb 02 17:23:28 2018 System time&nbsp;&nbsp;&nbsp;&nbsp; : &gt; 0.000000004 seconds fast of NTP time Last offset&nbsp;&nbsp;&nbsp;&nbsp; : +0.000000000 seconds RMS offset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000000000 seconds &gt; Frequency&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 7.218 ppm fast Residual freq&nbsp;&nbsp; : +0.000 ppm Skew&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000 ppm Root delay&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &gt; 0.000000000 seconds Root dispersion : 0.000000000 seconds Update interval : 0.0 seconds Leap status&nbsp;&nbsp;&nbsp;&nbsp; : Normal &gt; &nbsp; &gt; systemctl status chronyd &gt; &#9679; chronyd.service - NTP client/server &nbsp;&nbsp; Loaded: loaded (/lib/systemd/system/chronyd.service; enabled) &nbsp;&nbsp; Active: &gt; active (running) since Fri 2018-02-02 00:18:07 UTC; 17h ago &nbsp;&nbsp;&nbsp;&nbsp; Docs: man:chronyd(8) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; man:chrony.conf(5) &gt; &nbsp;Main PID: 961 (chronyd) &nbsp;&nbsp; CGroup: /system.slice/chronyd.service &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#9492;&#9472;961 /usr/local/sbin/chronyd &gt; &nbsp; &gt; &nbsp; &gt; -- To unsubscribe email chrony-users-***@chrony.tuxfamily.org with &quot;unsubscribe&quot; in the subject. For help email &gt; chrony-users-***@chrony.tuxfamily.org with &quot;help&quot; in the subject. Trouble? Email &gt; ***@chrony.tuxfamily.org. &gt;</div>
</div>
</div>
</div></div></body></html>
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Charles Muggen
2018-02-02 18:49:41 UTC
Permalink
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div>My GPS HAT has a fix. I am getting NMEA messages.</div> <div>gpsmon /dev/serial0 shows valid NMEA messages.</div> <div>&nbsp;</div> <div>&nbsp;</div> <div>&nbsp; <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Friday, February 02, 2018 at 12:51 PM<br/> <b>From:</b>&nbsp;&quot;Bill Unruh&quot; &lt;***@physics.ubc.ca&gt;<br/> <b>To:</b>&nbsp;chrony-***@chrony.tuxfamily.org<br/> <b>Subject:</b>&nbsp;Re: [chrony-users] getting chrony to work with gpsd on raspbian jessie with gps hat</div> <div name="quoted-content">You line breaks are a mess. You gps is not getting any data, and thus pps cannot work. Your system needs to get the approximate time ( to better than 1/4 of a second) from somewhere else than PPS, since PPS give no information about the actual time. Just when the turn of the second occurs. What is your chrony.conf file? How have you connected up gpsd? Is it seeing the gps source? William G. Unruh __&#124; Canadian Institute for&#124;____ Tel: +1(604)822-3273 Physics&amp;Astronomy _&#124;___ Advanced Research _&#124;____ Fax: +1(604)822-5324 UBC, Vancouver,BC _&#124;_ Program in Cosmology &#124;____ ***@physics.ubc.ca Canada V6T 1Z1 ____&#124;____ and Gravity ______&#124;_ <a href="http://www.theory.physics.ubc.ca/" target="_blank">www.theory.physics.ubc.ca/</a> On Fri, 2 Feb 2018, Charles Muggen wrote: &gt; I have a Raspberry Pi Model 2 running Raspbian Jessie. Attached to the Raspberry Pi is a GPS HAT from Adafruit. I &gt; think I have all the libs installed to get this to work, but for some reason I am getting question marks &quot;?&quot; when I &gt; run chronyc sources. &gt; The goal is to get accurate time with no internet connection. The only time source is the GPS HAT. &gt; Status printouts below. &gt; Any hints/suggestions on getting this to work are greatly appreciated. &gt; Thank you. &gt; &nbsp; &gt; chronyc sources &gt; 210 Number of sources = 2 MS Name/IP address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Stratum Poll Reach LastRx Last sample&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &gt; =============================================================================== #? GPS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; 0&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp; +0ns[&nbsp;&nbsp; +0ns] +/-&nbsp;&nbsp;&nbsp; 0ns #? PPS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp; +0ns[&nbsp;&nbsp; +0ns] &gt; +/-&nbsp;&nbsp;&nbsp; 0ns &gt; &nbsp; &gt; chronyc tracking &gt; Reference ID&nbsp;&nbsp;&nbsp; : 7F7F0101 () Stratum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 8 Ref time (UTC)&nbsp; : Fri Feb 02 17:23:28 2018 System time&nbsp;&nbsp;&nbsp;&nbsp; : &gt; 0.000000004 seconds fast of NTP time Last offset&nbsp;&nbsp;&nbsp;&nbsp; : +0.000000000 seconds RMS offset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000000000 seconds &gt; Frequency&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 7.218 ppm fast Residual freq&nbsp;&nbsp; : +0.000 ppm Skew&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0.000 ppm Root delay&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &gt; 0.000000000 seconds Root dispersion : 0.000000000 seconds Update interval : 0.0 seconds Leap status&nbsp;&nbsp;&nbsp;&nbsp; : Normal &gt; &nbsp; &gt; systemctl status chronyd &gt; &#9679; chronyd.service - NTP client/server &nbsp;&nbsp; Loaded: loaded (/lib/systemd/system/chronyd.service; enabled) &nbsp;&nbsp; Active: &gt; active (running) since Fri 2018-02-02 00:18:07 UTC; 17h ago &nbsp;&nbsp;&nbsp;&nbsp; Docs: man:chronyd(8) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; man:chrony.conf(5) &gt; &nbsp;Main PID: 961 (chronyd) &nbsp;&nbsp; CGroup: /system.slice/chronyd.service &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#9492;&#9472;961 /usr/local/sbin/chronyd &gt; &nbsp; &gt; &nbsp; &gt; -- To unsubscribe email chrony-users-***@chrony.tuxfamily.org with &quot;unsubscribe&quot; in the subject. For help email &gt; chrony-users-***@chrony.tuxfamily.org with &quot;help&quot; in the subject. Trouble? Email &gt; ***@chrony.tuxfamily.org. &gt;</div>
</div>
</div>
</div></div></body></html>
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-02 20:15:33 UTC
Permalink
Clearly your mailer is stripping out line ends from the messages sent out. The
email I sent you had a line break at the end of every line. Your quote of it
has stripped them all out. Strange.

Anyway, so gpsd is working. It is the communication with chrony that does not
seem t obe working.

What is your /etc/chrony.conf file? Are you using a socket or an shm to
communicate from gpsd to chrony?



William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by Charles Muggen
My GPS HAT has a fix. I am getting NMEA messages.
gpsmon /dev/serial0 shows valid NMEA messages.
 
 
jessie with gps hat
You line breaks are a mess. You gps is not getting any data, and thus pps cannot work. Your system needs to get the
approximate time ( to better than 1/4 of a second) from somewhere else than PPS, since PPS give no information
about the actual time. Just when the turn of the second occurs. What is your chrony.conf file? How have you
+1(604)822-3273 Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324 UBC, Vancouver,BC _|_ Program
Fri, 2 Feb 2018, Charles Muggen wrote: > I have a Raspberry Pi Model 2 running Raspbian Jessie. Attached to the
Raspberry Pi is a GPS HAT from Adafruit. I > think I have all the libs installed to get this to work, but for some
reason I am getting question marks "?" when I > run chronyc sources. > The goal is to get accurate time with no
internet connection. The only time source is the GPS HAT. > Status printouts below. > Any hints/suggestions on
getting this to work are greatly appreciated. > Thank you. >   > chronyc sources > 210 Number of sources = 2 MS
Name/IP address         Stratum Poll Reach LastRx Last sample                >
=============================================================================== #? GPS                           >
0   4     0     -     +0ns[   +0ns] +/-    0ns #? PPS                           0   4     0     -     +0ns[   +0ns]
+/-    0ns >   > chronyc tracking > Reference ID    : 7F7F0101 () Stratum         : 8 Ref time (UTC)  : Fri Feb
02 17:23:28 2018 System time     : > 0.000000004 seconds fast of NTP time Last offset     : +0.000000000 seconds
RMS offset      : 0.000000000 seconds > Frequency       : 7.218 ppm fast Residual freq   : +0.000 ppm
Skew            : 0.000 ppm Root delay      : > 0.000000000 seconds Root dispersion : 0.000000000 seconds Update
interval : 0.0 seconds Leap status     : Normal >   > systemctl status chronyd > ● chronyd.service - NTP
client/server    Loaded: loaded (/lib/systemd/system/chronyd.service; enabled)    Active: > active (running) since
Fri 2018-02-02 00:18:07 UTC; 17h ago      Docs: man:chronyd(8)            man:chrony.conf(5) >  Main PID: 961
(chronyd)    CGroup: /system.slice/chronyd.service            └─961 /usr/local/sbin/chronyd >   >   > -- To
Charles Muggen
2018-02-02 22:15:41 UTC
Permalink
Let's do a test.
I found an option to "Always send e-mails as plain text (without formatting)."

210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS 0 4 0 - +0ns[ +0ns] +/- 0ns
#? PPS 0 4 0 - +0ns[ +0ns] +/- 0ns
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-03 02:48:50 UTC
Permalink
That looks much better!


William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by Charles Muggen
Let's do a test.
I found an option to "Always send e-mails as plain text (without formatting)."
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS 0 4 0 - +0ns[ +0ns] +/- 0ns
#? PPS 0 4 0 - +0ns[ +0ns] +/- 0ns
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Charles Muggen
2018-02-02 22:35:42 UTC
Permalink
#####chrony.conf
driftfile /var/lib/chrony/chrony.drift

log tracking measurements statistics
logdir /var/log/chrony

# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0

dumponexit
dumpdir /var/lib/chrony

local stratum 8
manual
smoothtime 400 0.01
makestep .1 -1

allow
logchange 0.5
rtcsync

# set larger delay to allow the NMEA source to overlap with
# the other sources and avoid the falseticker status
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
refclock SHM 1 refid PPS precision 1e-9

#####chronyc sources
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#* GPS 0 4 377 17 -6540us[ -11ms] +/- 200ms
#? PPS 0 4 0 - +0ns[ +0ns] +/- 0ns

#####chronyc tracking
Reference ID : 47505300 (GPS)
Stratum : 1
Ref time (UTC) : Fri Feb 02 22:19:35 2018
System time : 0.003947824 seconds slow of NTP time
Last offset : -0.004957667 seconds
RMS offset : 0.010333695 seconds
Frequency : 19.195 ppm slow
Residual freq : -1.445 ppm
Skew : 25.232 ppm
Root delay : 0.200000003 seconds
Root dispersion : 0.100304745 seconds
Update interval : 16.0 seconds
Leap status : Normal

I made a change to my /boot/config.txt
I had to add a line that says
dtoverlay=pps-gpio,gpio=4
This points the PPS server to pin 4 of the GPS HAT.

hmmm, maybe the thing is working... but should the PPS show an asterisk "*"?
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Miroslav Lichvar
2018-02-05 11:03:54 UTC
Permalink
Post by Charles Muggen
# set larger delay to allow the NMEA source to overlap with
# the other sources and avoid the falseticker status
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
refclock SHM 1 refid PPS precision 1e-9
If you are using the SHM 1 source, which is based on PPS with gpsd,
I'd suggest to either remove the first line or add noselect to it.

You could also use the PPS device directly with SHM 0, e.g.

refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
refclock PPS /dev/pps0 lock NMEA refid GPS
Post by Charles Muggen
I made a change to my /boot/config.txt
I had to add a line that says
dtoverlay=pps-gpio,gpio=4
This points the PPS server to pin 4 of the GPS HAT.
hmmm, maybe the thing is working... but should the PPS show an asterisk "*"?
How is gpsd started? With a GPIO PPS, I think it needs to be started
with both devices: serial (e.g. /dev/ttyS0) and PPS (e.g. /dev/pps0).
--
Miroslav Lichvar
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Charles Muggen
2018-02-05 20:57:31 UTC
Permalink
I changed my chrony.conf file as suggested.

##### chrony.conf
driftfile /var/lib/chrony/chrony.drift

log tracking measurements statistics
logdir /var/log/chrony

# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0

dumponexit
dumpdir /var/lib/chrony

local stratum 8
manual
smoothtime 400 0.01
makestep .1 -1

allow
logchange 0.5
rtcsync

# set larger delay to allow the NMEA source to overlap with
# the other sources and avoid the falseticker status
refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
refclock PPS /dev/pps0 lock NMEA refid GPS

now it seems to lock on PPS1, but I don't think PPS1 is not a valid source.
here's the results for chronyc sources:

210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS 0 4 0 1192 -43.4s[ -43.7s] +/- 200ms
#* PPS1 7 4 377 20 +9ns[ +773ns] +/- 629ns
Sent: Monday, February 05, 2018 at 6:03 AM
Subject: Re: [chrony-users] getting chrony to work with gpsd on raspbian jessie with gps hat
Post by Charles Muggen
# set larger delay to allow the NMEA source to overlap with
# the other sources and avoid the falseticker status
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
refclock SHM 1 refid PPS precision 1e-9
If you are using the SHM 1 source, which is based on PPS with gpsd,
I'd suggest to either remove the first line or add noselect to it.
You could also use the PPS device directly with SHM 0, e.g.
refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
refclock PPS /dev/pps0 lock NMEA refid GPS
Post by Charles Muggen
I made a change to my /boot/config.txt
I had to add a line that says
dtoverlay=pps-gpio,gpio=4
This points the PPS server to pin 4 of the GPS HAT.
hmmm, maybe the thing is working... but should the PPS show an asterisk "*"?
How is gpsd started? With a GPIO PPS, I think it needs to be started
with both devices: serial (e.g. /dev/ttyS0) and PPS (e.g. /dev/pps0).
--
Miroslav Lichvar
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-05 21:24:52 UTC
Permalink
Post by Charles Muggen
now it seems to lock on PPS1, but I don't think PPS1 is not a valid source.
Sorry, you double negative is completely confusing. It looks to me like pps1
is a fine source and so does chrony. What problem do you have with it?
Post by Charles Muggen
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? GPS 0 4 0 1192 -43.4s[ -43.7s] +/- 200ms
#* PPS1 7 4 377 20 +9ns[ +773ns] +/- 629ns
Sent: Monday, February 05, 2018 at 6:03 AM
Subject: Re: [chrony-users] getting chrony to work with gpsd on raspbian jessie with gps hat
Post by Charles Muggen
# set larger delay to allow the NMEA source to overlap with
# the other sources and avoid the falseticker status
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
refclock SHM 1 refid PPS precision 1e-9
If you are using the SHM 1 source, which is based on PPS with gpsd,
I'd suggest to either remove the first line or add noselect to it.
You could also use the PPS device directly with SHM 0, e.g.
refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
refclock PPS /dev/pps0 lock NMEA refid GPS
Post by Charles Muggen
I made a change to my /boot/config.txt
I had to add a line that says
dtoverlay=pps-gpio,gpio=4
This points the PPS server to pin 4 of the GPS HAT.
hmmm, maybe the thing is working... but should the PPS show an asterisk "*"?
How is gpsd started? With a GPIO PPS, I think it needs to be started
with both devices: serial (e.g. /dev/ttyS0) and PPS (e.g. /dev/pps0).
--
Miroslav Lichvar
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Charles Muggen
2018-02-06 17:11:38 UTC
Permalink
I'm sorry for the double negative.
I was in the middle of a paste.
I need to proofread my replies better.
Sent: Monday, February 05, 2018 at 4:24 PM
Subject: Re: [chrony-users] getting chrony to work with gpsd on raspbian jessie with gps hat
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Loading...