gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Re: NTP with only GPS/PPS flags PPS as falseticker


From: Martin Boissonneault
Subject: Fwd: Re: NTP with only GPS/PPS flags PPS as falseticker
Date: Wed, 18 Mar 2020 22:54:25 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

OK, I have issues sending to the address@hidden maillist, this is my 3rd attempt. It should be OK now, I juggled my email configuration by creating a dedicated email instead of the default catch-all. -- Martin
---

Hi Nick,

If I disconnect the Ethernet cable off my Pi 3B+, NTPsec 1.1.8 continues to show the GPSd PPS shm as (+) and the PPS refclock shows (o). This is a significant difference from you, I use the Linux kernel PPS refclock as a "prefer". It's activated by a 

dtoverlay=pps-gpio,gpiopin=18,assert_falling_edge=off,capture_clear=off
in the Pi's config.txt file, and takes the MAX-M8Q's PPS pulse and sends it to the kernel. So, my configuration may be different enough not to help much.

Still, here's most of my ntp.conf (whole file attached):

# flag2 0 | 1    - Specifies PPS capture on the rising (assert) pulse edge if 0 (default) or falling (clear) pulse edge if 1.
# flag3 0 | 1    - Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.
refclock pps unit 0 	refid kPPS flag2 0 flag3 0 minpoll 4 prefer

# time1 time     - Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. 
# flag1 0 | 1    - Skip the difference limit check if set. Useful for systems where the RTC backup cannot keep the time 
# 		over long periods without power and the SHM clock must be able to force long-distance initial jumps. Check the difference limit if cleared (default). 
refclock shm unit 1 	refid gPPS minpoll 4
refclock shm unit 0 	refid GNSS stratum 11 flag1 0 time1 0.060 	# fudged so it stays positive and minimum +10ms offset


# *** NOTE: by default, the ARP cache flushes after 60 seconds. If so, use maxpoll 5 ***
# *** I modified the ARP flush on rPi to 65sec, so maxpoll 6  (64s) is OK ***
# /etc/sysctl.d/ net.ipv4.neigh.default.gc_stale_time = 65

# LAN servers:
server 192.168.10.11 	minpoll 4 maxpoll 6 		# !!! On LAN !!! # For ARP reasons, maxpoll 6 -> 64s


# Official Canadian gov NTP servers (Stratum 2)
server time.nrc.ca 	maxpoll 6 	# For ARP reasons, maxpoll 6 -> 64s
server time.chu.nrc.ca 	maxpoll 6 	# For ARP reasons, maxpoll 6 -> 64s


# Pool:
pool ca.pool.ntp.org 			maxpoll 10
pool us.pool.ntp.org 			maxpoll 10
pool north-america.pool.ntp.org 	maxpoll 10

On Ethernet reconnection, about an hour later, NTPsec 1.1.8 reconnects to the pools, fetches more servers and restarts the selection and evaluation process while keeping the kernel PPS (o) and GPSd PPS shm (+).

My only current issue is GPSd stalling on reboot: It starts but does not pull GNSS info and does not feed the shms with data. A manual service restart later it's running fine.

Martin

On 2020-03-15 13:46, Nick Burkitt wrote:
Hi Martin.

Have you tried disconnecting from any networks to see what happens to GPS and PPS?
Lowering the priority of the GPS clock source isn't the issue - I've done that by putting it last in my ntp.conf file. The problem is that ntpd won't use it at all, and when it (ntpd) has no clock sources left, it won't use PPS, either. 

-Nick

------ Original Message ------
From: "Residual Catch-all" <address@hidden>
To: "Nick Burkitt" <address@hidden>
Sent: 3/14/2020 3:44:50 PM
Subject: Re: NTP with only GPS/PPS flags PPS as falseticker

Hi!
In my ntp.conf, I set the GPS time source (SHM0 for you) to stratum 11. NTP would use anything but that if it has a choice. If it doesn't, it's there to serve. 

It also makes the line's position in the file less relevant I believe. Right?

Martin Boissonneault
Sent from my phone

On Mar 14, 2020, at 18:38, Nick Burkitt <address@hidden> wrote:


Hi Gary.

I need to tweak my ntpd.conf so that ntpd will use GPS and PPS when no network is available. As it is now, GPS is never used, and when all other clock sources go away, PPS is marked with the fatal 'x' as well.

Here's my current ntp.conf:

refclock shm unit 2 refid PPS minpoll 3 maxpoll 3 flag4 1 prefer

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

refclock shm unit 0 refid GPS minpoll 1 maxpoll 4 flag4 1

restrict default kod limited nomodify nopeer noquery
restrict -6 default kod limited nomodify nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
logfile /var/log/ntpd.log
logconfig =syncall +clockall +peerall +sysall

After unplugging the Ethernet cable, eventually I get ntpmon output similar to this:

     remote           refid      st t when poll reach   delay   offset   jitter
xSHM(2)          .PPS.            0 l    3    8  377      0ns 559.43us 22.935us
 99.104.170.138  132.163.97.6     2 u 1160  128    0 86.471ms -2.210ms      0ns
 206.55.191.142  .PPS.            1 u 1159  128    0 76.624ms 616.54us      0ns
 2600:3c00::f03c 129.7.1.66       2 u 1160  128    0 62.125ms 900.64us      0ns
 64.22.253.155   173.161.33.165   2 u 1159  128    0 71.788ms 5.5779ms      0ns
xSHM(0)          .GPS.            0 l    -    2  377      0ns -78.66ms 3.7365ms
 pool.ntp.org    .POOL.          16 p    -    8    0      0ns      0ns  1.907us
 162.159.200.123 10.4.0.197       3 u 1159  128    0 25.787ms -1.624ms      0ns
 204.2.134.163   44.24.199.34     3 u 1159  128    0 24.766ms -396.1us      0ns
 199.223.248.101 209.51.161.238   2 u 1159 1024    0 96.084ms 4.4596ms 317.59us
ntpd ntpsec-1.1.8+ 2020-03-04T20:55:58Z        Updated: 2020-03-14T22:31:35 (1)
 lstint avgint rstr r m v  count rport remote address
      0  0.132    0 . 6 2   8897 40414 localhost

Thanks,

-Nick

Attachment: ntp.conf
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]