Discussion:
[chrony-users] raspberry PPS Adafruit Ultimate GPS - rare PPS fix
Jochen Demmer
2021-05-08 09:05:16 UTC
Permalink
Hi,

I've been trying to run a stratum 1 server at home with a Raspi 2 and an Adafruit Ultimate GPS hat (MTK3339) + battery + external Antenna.

The device runs Raspian 10 with chrony 3.4 and gpsd 3.17. Generally speaking it's all working out fine, except that the PPS fix seems to come in very rarely, sometimes it goes several hours without lock. The GPS itself seems to have a good fix all the time.

The time then starts to diverge so heavily that ntp pool project kicks me out by giving me a bad score.

I already tried different positions:
1. In my living room with the antenna at the window on the window board.
2. In the attic (temperature very unstable, getting very cold and then very arm again) with the antenna on the rooftop.
3. In the basement with the antenna leading out in the garden.

This is an chronyc sources when I had a recent fix:
https://paste.debian.net/1196767/

This is what gpsmon looks like:
https://paste.debian.net/1196770/

This is an excerpt of ppswatch:
***@ntpofden1:~# ppswatch -a /dev/pps0  
https://paste.debian.net/1196768/

This is my chrony.conf
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
logdir /var/log/chrony
maxupdateskew 100.0
makestep 1 3
allow
refclock PPS /dev/pps0 lock NMEA trust prefer
refclock SHM 0 offset 0 delay 0.5 refid NMEA trust noselect
server ntp1.rwth-aachen.de
server ntp2.rwth-aachen.de
logdir /var/log/chrony
log measurements statistics tracking

Could someone point me at what's going on?
I understand that PPS is only being accepted under specific circumstances. Where can I read what those circumstances are and how do I see in chrony whether those are met or not and why?

Regards
Jochen
 
Miroslav Lichvar
2021-05-10 07:35:13 UTC
Permalink
Post by Jochen Demmer
https://paste.debian.net/1196767/
It seems the posts expired.
Post by Jochen Demmer
Could someone point me at what's going on?
I understand that PPS is only being accepted under specific circumstances. Where can I read what those circumstances are and how do I see in chrony whether those are met or not and why?
Most likely, the offset of the SHM source is not set accurately enough
for the PPS to lock to it.

https://chrony.tuxfamily.org/faq.html#_using_a_pps_reference_clock
--
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.
Jochen Demmer
2021-05-11 11:38:25 UTC
Permalink
Hi,

sorry for the expired paste...
I was not able to manage so I tried something else and connected an old USB DCF77 and referenced the PPS to that source. Does it make sense to you? The values look legit.

This is the config snippet:
refclock PPS /dev/pps0 lock DCF trust prefer
refclock SHM 0:perm=0644 precision 1e-1 offset 0 delay 0.55 refid NMEA trust noselect
#USB DCF77
refclock SHM 1:perm=0644 refid DCF

The USB Device is being fed by radioclk.

Here are outputs of sources and sourcestats
https://paste.debian.net/1197122/
https://paste.debian.net/1197123/

Regards
Jochen
Post by Jochen Demmer
https://paste.debian.net/1196767/
It seems the posts expired.
Post by Jochen Demmer
Could someone point me at what's going on?
I understand that PPS is only being accepted under specific circumstances. Where can I read what those circumstances are and how do I see in chrony whether those are met or not and why?
Most likely, the offset of the SHM source is not set accurately enough
for the PPS to lock to it.

https://chrony.tuxfamily.org/faq.html#_using_a_pps_reference_clock

--
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.
 


 
Miroslav Lichvar
2021-05-11 11:54:08 UTC
Permalink
Post by Jochen Demmer
refclock PPS /dev/pps0 lock DCF trust prefer
refclock SHM 0:perm=0644 precision 1e-1 offset 0 delay 0.55 refid NMEA trust noselect
The sources and sourcestats reports show an offset of about 495ms, so
you should specify it more like this

refclock SHM 0 offset 0.5 delay 0.3 refid NMEA noselect

Depending on stability of the message timing you could decrease the
delay, but it doesn't really matter as long as it allows the PPS to
lock.
--
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.
Jochen Demmer
2021-05-12 12:54:42 UTC
Permalink
That did the trick, thank you very much.
Post by Jochen Demmer
refclock PPS /dev/pps0 lock DCF trust prefer
refclock SHM 0:perm=0644 precision 1e-1 offset 0 delay 0.55 refid NMEA trust noselect
The sources and sourcestats reports show an offset of about 495ms, so
you should specify it more like this

refclock SHM 0 offset 0.5 delay 0.3 refid NMEA noselect

Depending on stability of the message timing you could decrease the
delay, but it doesn't really matter as long as it allows the PPS to
lock.

--
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.
 


 

Loading...