Re: [chrony-users] Setting up Chrony with PPS
Deven Hickingbotham schreef op 2016-04-11 22:10: Yes, but I didn't expect that it would affect chrony. The update rate was increased from 1 per second to 10 time per second (since this didn't affect the PPS signal, I didn't expect it to impact chrony). Changing the update rate back to 1 per second corrected the issue, but I need an update rate of at least 5 per second (preferably 10). Is the GPS connected with a serial link? What baudrate? Default for NMEA is 4800 bps AFAIK, but if I'm reading Adafruit's website correctly your Adafruit Ultimate GPS uses 9600 bps by default. Even that may not be enough for 10 position updates per second. Maybe the GPS simply has trouble sending all data in the available time. Can you try increasing the baudrate of the serial connection? See https://learn.adafruit.com/adafruit-ultimate-gps/faq#faq-4 HTH Best regards, Roel -- "You can fool some of the people all the time, and all of the people some of the time, but you cannot fool all of the people all of the time." -- Abraham Lincoln "You can fool too many of the people too much of the time." -- James Thurber -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On Tue, 12 Apr 2016, Deven Hickingbotham wrote: On 4/11/2016 10:41 PM, Miroslav Lichvar wrote: That probably depends on the FW of the GPS. If with one update per second the NMEA messages were only 0.1 second late, with 10 updates per second that delay wouldn't have to change, it would still fit between updates. But if it's 0.5 second late, that can't work with 10 updates per second. I think you just need to change the offset of the SHM refclock to 0.1 second. The delay can stay as it was. Setting offset to 0.1 works for 10, 5, 4, 3, and 2 updates per second. Setting offset to 0.5 works for updates every 1 and 2.5 seconds. It does not work for updates every 5 seconds. If a future version of chrony could support a wide range of gps update rates without having to modify chrony.conf, that would be appreciated. ?? why the demand not to modify chrony.conf? It is there precisely to put in configuration information. Your update frequency is something you set once, and a bit of effort to get it right is a good idea. It is somewhat hard for the program itself to know how far off the time is since it is the only thing that tells it what the time is. Thanks for the support, it has been very helpful and timely! -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org. -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On 4/12/2016 12:29 PM, Roel Schroeven wrote: Is the GPS connected with a serial link? What baudrate? Default for NMEA is 4800 bps AFAIK, but if I'm reading Adafruit's website correctly your Adafruit Ultimate GPS uses 9600 bps by default. Even that may not be enough for 10 position updates per second. Maybe the GPS simply has trouble sending all data in the available time. Can you try increasing the baudrate of the serial connection? See https://learn.adafruit.com/adafruit-ultimate-gps/faq#faq-4 Yes, serial. Baud rate is set to 115200. -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On Mon, Apr 11, 2016 at 01:10:30PM -0700, Deven Hickingbotham wrote: > > On 4/10/2016 11:30 PM, Miroslav Lichvar wrote: > >Hm, did the configuration of the GPS change? Maybe it's giving fewer > > Yes, but I didn't expect that it would affect chrony. The update rate > was increased from 1 per second to 10 time per second (since this didn't > affect the PPS signal, I didn't expect it to impact chrony). > > Changing the update rate back to 1 per second corrected the issue, but I > need an update rate of at least 5 per second (preferably 10). > > Would it be correct to assume that different update rates require > different chrony offsets and delays? And if so, what values should I try? That probably depends on the FW of the GPS. If with one update per second the NMEA messages were only 0.1 second late, with 10 updates per second that delay wouldn't have to change, it would still fit between updates. But if it's 0.5 second late, that can't work with 10 updates per second. I think you just need to change the offset of the SHM refclock to 0.1 second. The delay can stay as it was. -- Miroslav Lichvar -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On Mon, 11 Apr 2016, Deven Hickingbotham wrote: On 4/11/2016 2:26 PM, Bill Unruh wrote: So please tell us what it is you are trying to do that makes you think you want more frequency updates. The faster update rate is not to get GPS time more frequently, but to get GPS location data more frequently. I'm working on an auto racing app where the car can be moving at 250 feet per second, so an update every second is not very accurate for my needs. CAn you not tell the gps to deliver time and location at rates which are independent of each other? And are you sure that the gps can really update the position at 10 times per second? There are quite a lot of calculations and measurements that need to be done to update the position. Is you receiver capable of doing it. (Just because it says it does something 10 times per sec does not mean it delivers anything meaningful that quickly). Deven -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org. -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On 4/10/2016 11:30 PM, Miroslav Lichvar wrote: Hm, did the configuration of the GPS change? Maybe it's giving fewer NMEA sentences than before? It looks like the NMEA samples are now ~400 ms off from the expected offset and PPS can't lock to them. You could try changing the SHM offset to 0.1 and maybe increase the delay to 0.6 or so, but I'm not sure if that will be enough if the NMEA offset is changing so much over time. Yes, but I didn't expect that it would affect chrony. The update rate was increased from 1 per second to 10 time per second (since this didn't affect the PPS signal, I didn't expect it to impact chrony). Changing the update rate back to 1 per second corrected the issue, but I need an update rate of at least 5 per second (preferably 10). Would it be correct to assume that different update rates require different chrony offsets and delays? And if so, what values should I try? Thanks, Deven -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
> On 19/02/2016, at 1:08 PM, Deven Hickingbothamwrote: > > Now 10 minutes after restarting chronyc sources outputs: > > pi@gps ~/SystemFiles $ chronyc sources > 210 Number of sources = 7 > MS Name/IP address Stratum Poll LastRx Last sample > === > ^~ tock.usshc.com 16 41 -263ms[ -263ms] +/- 61ms > ^~ pacific.latt.net 36 21 -323ms[ -323ms] +/- 82ms > ^x leeloo.scurvynet.com 26 13 -317ms[ -317ms] +/- 127ms > ^~ repos.lax-noc.com26 22 -326ms[ -326ms] +/- 63ms > #x SHM0 04 21+18ms[ +18ms] +/- 3102us > #? PPS 0410y +0ns[ +0ns] +/-0ns > #? SOCK 0410y +0ns[ +0ns] +/-0ns > > > So SHM0 does show up. Still question the use of chrony.ttyAMA0.sock? > > Deven > OK _ are you stopping gpsd, restarting chronyd then restarting gpsd? Order matters (well it used to anyway) Bryan Christianson br...@whatroute.net -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
> On 19/02/2016, at 12:07 PM, Tomalak Geret'kalwrote: > > On 18/02/2016 22:48, Deven Hickingbotham wrote: >> >>> $cat /sys/class/pps/pps0/assert >>> 1455831692.018636856#178 >>> >>> Are you seeing those? >>> >> >> Yes, but just one timestamp per execution: >> >> pi@gps ~ $ cat /sys/class/pps/pps0/assert >> 1455835119.289108505#4272 >> pi@gps ~ $ cat /sys/class/pps/pps0/assert >> 1455835154.690359907#4305 >> pi@gps ~ $ cat /sys/class/pps/pps0/assert >> 1455835157.936493770#4308 >> pi@gps ~ $ cat /sys/class/pps/pps0/assert >> 1455835160.102904599#4310 >> > > Okay so your PPS looks fine. > > I think what's happening (and I'm half guessing but I did the following in > the past to solve the same problem) is that you have two separate refclocks. > One is your GPS NMEA (which is working), and the other is your PPS source ... > which is only providing timing, not time. > > I believe you need to make it so that the PPS refclock is treated as a sort > of extension of the GPS refclock, then prevent the GPS refclock from being > selected on its own: > > refclock SHM 0 refid GPS precision 1e-1 offset 0. delay 0.2 noselect > refclock SOCK /var/run/chrony.ttyAMA0.sock refid PPS lock GPS > > I'm not sure why you see "PP" in the "chronyc sources" output - double-check > your file on disk for dodgy line endings perhaps? Bit of a concern if the > trailing "S" now gets truncated in my example above. > > Anyway, give that a try. > > Cheers > Tom I have this config working on a RP 2 - different PPP device but substituting your device for mine and adjusting the offsets to suit your device may work. I got this config from the gpsd web site # SHM0 from gpsd is the NEMA data at 4800bps, so is not very accurate refclock SHM 0 precision 1e-1 offset -0.135 delay 0.5 refid NEMA # SHM1 from gpsd (if present) is from the kernel PPS_LDISC # module. It includes PPS and will be accurate to a few ns refclock SHM 1 offset 0.00135 delay 0.1 refid PPS # SOCK protocol also includes PPS data and # it also provides time within a few ns refclock SOCK /var/run/chrony.ttyUSB0.sock offset 0.00135 delay 0.0 refid SOCK Bryan Christianson br...@whatroute.net -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On 2/18/2016 8:19 PM, Deven Hickingbotham wrote: GPS is an Adafruit Ultimate GPS Hat on a Raspberry Pi 2 B. I have two identical units and have had PPS working with ntp. Is it possible to bring the PPS signal in on a serial port? I'm doing something similar but with different hardware; using an internal TTL level serial port rather than GPIO. I had no luck with GPIO. Also, I've found that it's best to have a time delay before starting gpsd: root@AP1:~# cat /etc/rc.local $( sleep 60 ; /etc/init.d/gpsd start ) & exit 0 That 60 second delay apparently gives enough time to chrony to do whatever it needs to do. Make sure you delete SXXgpsd from rc.d if that's how it's starting. root@AP1:~# chronyc sources 210 Number of sources = 6 MS Name/IP address Stratum Poll Reach LastRx Last sample === #- NEMA 0 4 37711 +141ms[ +141ms] +/- 251ms #* PPS 0 4 377 9 +403us[ +404us] +/- 50ms ^+ vexx.wtfismyip.com2 6 37713 +317us[ +320us] +/- 81ms ^- ntp2.tranzeo.com 2 6 37710 -2895us[-2893us] +/- 565ms ^? mirror3.rafal.ca 0 6 0 10y +0ns[ +0ns] +/-0ns ^+ zero.gotroot.ca 2 6 377 9 -1172us[-1171us] +/- 64ms -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On 19/02/2016 03:08, Bryan Christianson wrote: My understanding is that chrony.ttyAMA0.sock is a socket created by chronyd and listened to by chronyd When gpsd starts, it checks to see if the socket exists and writes the PPS data to it. Isn't that backwards? How would gpsd know what socket to write to? Generally the model is the writer (which doesn't know what wants to receive) creates the file and the receiver (which knows what it wants to receive) opens it. We can see that here by the presence of gpsd.sock. Right? Tom -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On 18/02/2016 22:48, Deven Hickingbotham wrote: $cat /sys/class/pps/pps0/assert 1455831692.018636856#178 Are you seeing those? Yes, but just one timestamp per execution: pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835119.289108505#4272 pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835154.690359907#4305 pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835157.936493770#4308 pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835160.102904599#4310 Okay so your PPS looks fine. I think what's happening (and I'm half guessing but I did the following in the past to solve the same problem) is that you have two separate refclocks. One is your GPS NMEA (which is working), and the other is your PPS source ... which is only providing /timing/, not /time/. I believe you need to make it so that the PPS refclock is treated as a sort of extension of the GPS refclock, then prevent the GPS refclock from being selected on its own: refclock SHM 0 refid GPS precision 1e-1 offset 0. delay 0.2 *noselect* refclock SOCK /var/run/chrony.ttyAMA0.sock refid PPS *lock GPS* I'm not sure why you see "PP" in the "chronyc sources" output - double-check your file on disk for dodgy line endings perhaps? Bit of a concern if the trailing "S" now gets truncated in my example above. Anyway, give that a try. Cheers Tom
Re: [chrony-users] Setting up Chrony with PPS
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273 Physics | Advanced Research | Fax: +1(604)822-5324 UBC, Vancouver,BC | Program in Cosmology | un...@physics.ubc.ca Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/ On Thu, 18 Feb 2016, Deven Hickingbotham wrote: On 2/18/2016 6:57 PM, Bill Unruh wrote: Is this more in line with what you expected? Nope. Those are huge uncertainties for network timing. 134ms uncertainty corresponds to light travel time around the earth uncertainty. I would expect more like +- 100 microseconds, not milliseconds. What is your network link? I have cable network. Ping 41ms, 20mb downloads speed, 5mp upload. Should still be a lot better than what you are getting. I also have cable (Shaw cable in Vancouver) ^* info.physics.ubc.ca 1 6 37757 -422us[ -465us] +/- 5975us -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273 Physics | Advanced Research | Fax: +1(604)822-5324 UBC, Vancouver,BC | Program in Cosmology | un...@physics.ubc.ca Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/ On Thu, 18 Feb 2016, Deven Hickingbotham wrote: First off, thanks for all of the responses! I'm testing your suggestions as fast as I can and if I apologize if I don't directly reply to a suggestion. Does /var/run/chrony.ttyAMA0.sock exist? If not, then it is hard to read from it. Your gpsd does not seem to be writing to SHM0 Yes, it does exist: pi@gps /var/run $ ls -l *.sock srwxr-xr-x 1 root root 0 Feb 18 16:23 chrony.ttyAMA0.sock srw-rw 1 root root 0 Feb 18 15:43 dhcpcd.sock srw-rw-rw- 1 root root 0 Feb 18 15:43 dhcpcd.unpriv.sock srwxr-xr-x 1 root root 0 Feb 18 16:23 gpsd.sock OK, not sure what it does But I don't think it existed before I configured chrony. I suspect it is a socket that chrony listens to, but there needs to be something that actually writes to that socket as well. But I have never used sockets on chrony so have no idea. I am also concerned that your outside clocks are way off ( hundreds of ms ) and have HUGE variances -- the network, unless you are using smoke signals for your network, should not be out by a hundred ms. Mind you telling your system that your SHM0 is out by 135ms is probably all wrong, and is part of the problem. So, I would first suggest that you get rid of the nmea, and just use the external clocks as your reference. and get PPS working. Then you can try to get nmea working. One thing at a time. After removing the refclock references from chrony.conf I get: pi@gps ~/SystemFiles $ chronyc sources 210 Number of sources = 4 MS Name/IP address Stratum Poll LastRx Last sample == ^+ gopher.fart.website 37 43+16ms[ +14ms] +/- 89ms ^? mirror 37 41+17ms[ +17ms] +/- 134ms ^~ com1243.eecs.utk.edu 166 59+71ms[ +55ms] +/- 55ms ^* tock.usshc.com 16 59+15ms[ -696us] +/- 122ms Is this more in line with what you expected? Nope. Those are huge uncertainties for network timing. 134ms uncertainty corresponds to light travel time around the earth uncertainty. I would expect more like +- 100 microseconds, not milliseconds. What is your network link? -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
Bill, On 2/18/2016 4:06 PM, Bill Unruh wrote: pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835119.289108505#4272 Yes, as should be, assuming that it was about 33 sec between the one above and below, and then about 3 sec. However I am worried that you are getting such differences in ms. What GPS device are you using? Are you sure its PPS is working? Or is your computer really that far off in its clock rate? GPS is an Adafruit Ultimate GPS Hat on a Raspberry Pi 2 B. I have two identical units and have had PPS working with ntp. -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
On Thu, 18 Feb 2016, Deven Hickingbotham wrote: On 2/18/2016 4:12 PM, Bryan Christianson wrote: OK _ are you stopping gpsd, restarting chronyd then restarting gpsd? Order matters (well it used to anyway) Yes, I did that. No change in the chronyc sources output. GPS apps like cgps -s work. How can I tell what order the services load during startup? -- You can start them and stop them while it is running. killall chronyd killall gpsd I do not know how what you are using starts them up, or whether your system uses systemd or init. service gpsd start service chronyd start might work. -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
First off, thanks for all of the responses! I'm testing your suggestions as fast as I can and if I apologize if I don't directly reply to a suggestion. Does /var/run/chrony.ttyAMA0.sock exist? If not, then it is hard to read from it. Your gpsd does not seem to be writing to SHM0 Yes, it does exist: pi@gps /var/run $ ls -l *.sock srwxr-xr-x 1 root root 0 Feb 18 16:23 chrony.ttyAMA0.sock srw-rw 1 root root 0 Feb 18 15:43 dhcpcd.sock srw-rw-rw- 1 root root 0 Feb 18 15:43 dhcpcd.unpriv.sock srwxr-xr-x 1 root root 0 Feb 18 16:23 gpsd.sock But I don't think it existed before I configured chrony. I am also concerned that your outside clocks are way off ( hundreds of ms ) and have HUGE variances -- the network, unless you are using smoke signals for your network, should not be out by a hundred ms. Mind you telling your system that your SHM0 is out by 135ms is probably all wrong, and is part of the problem. So, I would first suggest that you get rid of the nmea, and just use the external clocks as your reference. and get PPS working. Then you can try to get nmea working. One thing at a time. After removing the refclock references from chrony.conf I get: pi@gps ~/SystemFiles $ chronyc sources 210 Number of sources = 4 MS Name/IP address Stratum Poll LastRx Last sample == ^+ gopher.fart.website 37 43+16ms[ +14ms] +/- 89ms ^? mirror 37 41+17ms[ +17ms] +/- 134ms ^~ com1243.eecs.utk.edu 166 59+71ms[ +55ms] +/- 55ms ^* tock.usshc.com 16 59+15ms[ -696us] +/- 122ms Is this more in line with what you expected? -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
Bryan, I changed chrony.conf to include: refclock SHM 0 precision 1e-1 offset -0.135 delay 0.5 refid NEMA refclock SHM 1 offset 0.00135 delay 0.1 refid PPS refclock SOCK /var/run/chrony.ttyAMA0.sock offset 0.00135 delay 0.0 refid SOCK Now 10 minutes after restarting chronyc sources outputs: pi@gps ~/SystemFiles $ chronyc sources 210 Number of sources = 7 MS Name/IP address Stratum Poll LastRx Last sample === ^~ tock.usshc.com 16 41 -263ms[ -263ms] +/- 61ms ^~ pacific.latt.net 36 21 -323ms[ -323ms] +/- 82ms ^x leeloo.scurvynet.com 26 13 -317ms[ -317ms] +/- 127ms ^~ repos.lax-noc.com26 22 -326ms[ -326ms] +/- 63ms #x SHM0 04 21+18ms[ +18ms] +/- 3102us #? PPS 0410y +0ns[ +0ns] +/-0ns #? SOCK 0410y +0ns[ +0ns] +/-0ns So SHM0 does show up. Still question the use of chrony.ttyAMA0.sock? Deven On 2/18/2016 3:23 PM, Bryan Christianson wrote: I have this config working on a RP 2 - different PPP device but substituting your device for mine and adjusting the offsets to suit your device may work. I got this config from the gpsd web site # SHM0 from gpsd is the NEMA data at 4800bps, so is not very accurate refclock SHM 0 precision 1e-1 offset -0.135 delay 0.5 refid NEMA # SHM1 from gpsd (if present) is from the kernel PPS_LDISC # module. It includes PPS and will be accurate to a few ns refclock SHM 1 offset 0.00135 delay 0.1 refid PPS # SOCK protocol also includes PPS data and # it also provides time within a few ns refclock SOCK /var/run/chrony.ttyUSB0.sock offset 0.00135 delay 0.0 refid SOCK -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273 Physics | Advanced Research | Fax: +1(604)822-5324 UBC, Vancouver,BC | Program in Cosmology | un...@physics.ubc.ca Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/ On Thu, 18 Feb 2016, Deven Hickingbotham wrote: Rob, Thanks for replying. A little more info: my system is a Raspberry Pi 2 B. I have been able to get ntp to work with pps via GPIO pin 4. Had to recompile ntp to activate the pps support. Don't let the above fool you into thinking I know what I am doing. I have some level of expertise with programming, but system level Linux stuff is a mystery to me. IOW, real clear step by step instructions are greatly appreciated! If either module is being loaded, you should see a device (e.g. pps0) in /sys/class/pps. If your GPS has a lock and the pps kernel module is configured properly, you should see timestamps updating every second, e.g. Yes, the /sys/class/pps/pps0 path exists and contains these files: subsystem (folder), assert, clear, dev, echo, mode, name, path, and uevent. $cat /sys/class/pps/pps0/assert 1455831692.018636856#178 Are you seeing those? Yes, but just one timestamp per execution: pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835119.289108505#4272 Yes, as should be, assuming that it was about 33 sec between the one above and below, and then about 3 sec. However I am worried that you are getting such differences in ms. What GPS device are you using? Are you sure its PPS is working? Or is your computer really that far off in its clock rate? pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835154.690359907#4305 pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835157.936493770#4308 pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835160.102904599#4310 Have a look at the clear line to see if it is more regular (the ms should be more or less the same -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org. -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
Tom, refclock SHM 0 refid GPS precision 1e-1 offset 0. delay 0.2 noselect refclock SOCK /var/run/chrony.ttyAMA0.sock refid PPS lock GPS I made the above changes, restarted chrony, waited 10 minutes and: pi@gps ~/SystemFiles $ chronyc sources 210 Number of sources = 6 MS Name/IP address Stratum Poll LastRx Last sample ^~ 1.time.dbsinet.com26 25 +2169ms[+2169ms] +/-80ms ^~ nist.netservicesgroup.com 16 7 +2168ms[+2168ms] +/-50ms ^~ pacific.latt.net 36 5 +2169ms[+2169ms] +/-77ms ^~ clock.trit.net26 3 +2163ms[+2163ms] +/-28ms #? GPS 0410y +0ns[ +0ns] +/- 0ns #? PPS 0410y +0ns[ +0ns] +/- 0ns This did fix PPS in that it now appears as 'PPS' and not 'PP'. I'm beginning to think that the reference to chrony.ttyAMA0.sock may not work for three reasons: isn't that serial access and I need GPIO?; LastRx indicates no connection; and this looks like it may be messing up gpsd as it uses ttyAMA0 as a source. Deven -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-users] Setting up Chrony with PPS
Rob, Thanks for replying. A little more info: my system is a Raspberry Pi 2 B. I have been able to get ntp to work with pps via GPIO pin 4. Had to recompile ntp to activate the pps support. Don't let the above fool you into thinking I know what I am doing. I have some level of expertise with programming, but system level Linux stuff is a mystery to me. IOW, real clear step by step instructions are greatly appreciated! If either module is being loaded, you should see a device (e.g. pps0) in /sys/class/pps. If your GPS has a lock and the pps kernel module is configured properly, you should see timestamps updating every second, e.g. Yes, the /sys/class/pps/pps0 path exists and contains these files: subsystem (folder), assert, clear, dev, echo, mode, name, path, and uevent. $cat /sys/class/pps/pps0/assert 1455831692.018636856#178 Are you seeing those? Yes, but just one timestamp per execution: pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835119.289108505#4272 pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835154.690359907#4305 pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835157.936493770#4308 pi@gps ~ $ cat /sys/class/pps/pps0/assert 1455835160.102904599#4310 -- To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-users-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.