Re: [chrony-users] Setting up Chrony with PPS |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
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 | unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
On Thu, 18 Feb 2016, Deven Hickingbotham wrote:
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
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
Note that I do not use gpsd so do not know what it does or how to set it up,
but I use
refclock PPS /dev/pps0
to get the PPS into chrony. I use the external pps sites to give the time to
the nearest second (starting PPS with /etc/init.d/gps which has a start
secitonof
start)
gprintf "Starting gps pps service"
modprobe pps-ldisc
ldattach 18 /dev/ttyS0
Ie I use the serial port, not the gpio, but the idea should be the same for
the gpio pins using the appropriate module which you have apparently
downloaded.
Ie, I donot know if ldattach works for gpio, or if there is some other program
which tells pps-gpio which pin to look at.
I am concerned that your assert times are pretty screwed up-- it is not
looking like a PPS at all, or your clock rate on the Raspberry is way way off
of 1 sec/sec.
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.
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 1 6 41 -263ms[ -263ms] +/- 61ms
^~ pacific.latt.net 3 6 21 -323ms[ -323ms] +/- 82ms
^x leeloo.scurvynet.com 2 6 13 -317ms[ -317ms] +/- 127ms
^~ repos.lax-noc.com 2 6 22 -326ms[ -326ms] +/- 63ms
#x SHM0 0 4 21 +18ms[ +18ms] +/- 3102us
#? PPS 0 4 10y +0ns[ +0ns] +/- 0ns
#? SOCK 0 4 10y +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-request@xxxxxxxxxxxxxxxxxxxx with
"unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the
subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.