Discussion:
[chrony-users] PPS on stretch Raspberry Pi
Deven Hickingbotham
2018-02-26 15:39:54 UTC
Permalink
I've had chrony 2.3 running on jessie with PPS, but haven't been able to
get PPS working on stretch with chrony 3.0. Here is my configuration on
stretch (which was the same on jessie):

Installation:
sudo apt-get -y install chrony pps-tools

/boot/cmdline.txt:
dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=1d614c15-02
rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash
plymouth.ignore-serial-consoles

/boot/config.txt:
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if
console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's
size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio
work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference,
blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
enable_uart=1
dtoverlay=pps-gpio,gpiopin=4

/etc/modules:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

i2c-dev
pps-gpio

/etc/chrony/chrony.conf:
server 0.us.pool.ntp.org iburst
server 1.us.pool.ntp.org iburst
server 2.us.pool.ntp.org iburst
server 3.us.pool.ntp.org iburst
#server 192.168.0.108 iburst
#server 172.20.10.6 iburst

refclock PPS /dev/pps0 lock NMEA refid PPS
# Settings for 1 update per 1 to 2.5 second seconds
#refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
# Setting for 2, 3, 4, 5, 10 updates per seconds
refclock SHM 0 offset 0.1 delay 0.2 refid NMEA noselect

# In first three updates step the system clock instead of slew
# if the adjustment is larger than 0.01 seconds.
makestep 0.01 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Allow NTP client access from local network.
allow 192.168
allow 172.20
--
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-26 15:59:32 UTC
Permalink
Does /dev/pps0 exist?
Does /sys/devices/virtual/pps/pps0 exist?
Do either the assert or clear files in that directory exist and do they
display steadily increasing values in the file (looket at at successive
times)?

It would really help the reader if you made some indication as to where a new
file were listed in your dump of various files. Just the name of the file is
not enough.


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/
I've had chrony 2.3 running on jessie with PPS, but haven't been able to get
PPS working on stretch with chrony 3.0. Here is my configuration on stretch
refclock PPS /dev/pps0 lock NMEA refid PPS
# Settings for 1 update per 1 to 2.5 second seconds
#refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
# Setting for 2, 3, 4, 5, 10 updates per seconds
refclock SHM 0 offset 0.1 delay 0.2 refid NMEA noselect
What feeds the SHM with the NMEA time? Are you also running gpsd?
What is in the chrony logs (actually you should turn them on)
--
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.
Deven Hickingbotham
2018-02-26 16:59:34 UTC
Permalink
Does /dev/pps0 exist? Does /sys/devices/virtual/pps/pps0 exist?
Yes, both exist.
Do either the assert or clear files in that directory exist and do they
display steadily increasing values in the file (looket at at successive
times)?
Both files exist. assert does show increasing values. clear is empty.
BTW, this is the same on my jessie system where PPS works.
It would really help the reader if you made some indication as to where a new
file were listed in your dump of various files. Just the name of the file is
not enough.
I did include the path on the file names.
Post by Deven Hickingbotham
refclock PPS /dev/pps0 lock NMEA refid PPS
# Settings for 1 update per 1 to 2.5 second seconds
#refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
# Setting for 2, 3, 4, 5, 10 updates per seconds
refclock SHM 0 offset 0.1 delay 0.2 refid NMEA noselect
What feeds the SHM with the NMEA time? Are you also running gpsd?
gpsd is running and working.
What is in the chrony logs (actually you should turn them on)
What options should I specify for logging?
--
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-26 17:32:51 UTC
Permalink
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 Deven Hickingbotham
Does /dev/pps0 exist? Does /sys/devices/virtual/pps/pps0 exist?
Yes, both exist.
Do either the assert or clear files in that directory exist and do they
display steadily increasing values in the file (looket at at successive
times)?
Both files exist. assert does show increasing values. clear is empty. BTW,
this is the same on my jessie system where PPS works.
OK, so everything is ready.
Post by Deven Hickingbotham
It would really help the reader if you made some indication as to where a new
file were listed in your dump of various files. Just the name of the file is
not enough.
I did include the path on the file names.
Yes, but that is just text which looks like all the other text. Some more
noticable indication of a new file
----------------
****************
or something like that would be helpful to the reader being able to see where
the transition takes place.
Post by Deven Hickingbotham
Post by Deven Hickingbotham
refclock PPS /dev/pps0 lock NMEA refid PPS
# Settings for 1 update per 1 to 2.5 second seconds
#refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
# Setting for 2, 3, 4, 5, 10 updates per seconds
refclock SHM 0 offset 0.1 delay 0.2 refid NMEA noselect
What feeds the SHM with the NMEA time? Are you also running gpsd?
gpsd is running and working.
What is in the chrony logs (actually you should turn them on)
What options should I specify for logging?
log tracking rtc measurements refclocks statistics
logdir /var/log/chrony

Tracking is the calculation as to how far the clock is off, rtc is the status
of your rtc (although I thought the RPi had no rtc), measurements is the ntp
packets sent to the various ntp servers, refclocks is the measurements from
the refclocks (NMEA and PPS in your case), statistics is the results of the
linear fitting that is done on new measurements.

For you the key would be refclocks and measurements probably..
--
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...