Serial port speed being changed to 9600 by ntpd 0.9.6 despite conf otherwise
Tony Hain
tony at tndh.net
Fri Feb 10 22:46:42 UTC 2017
The nmea port speed is changed to the default despite a conf line stating
otherwise.
System: FreeBSD 12.0-CURRENT #0 r313411: Wed Feb 8 00:04:14 PST 2017
( I realize this is not on the "supported" list, but I have to use it to get
the
patch for the BBB pps device which is working)
NTPsec git clone & built again yesterday: ntpd ntpsec-0.9.6+420
2017-02-09T22:33:46Z
ntpd - Ver. 4.2.8p9 included with stock FreeBSD works as expected.
root at tic:~/ntpsec # /usr/local/bin/ntpq -p
remote refid st t when poll reach delay offset
jitter
============================================================================
===
o127.127.22.0 .PPS. 0 s 15 32 377 0.000 0.007
0.004
x127.127.20.0 .GPS. 0 s 6 8 377 0.000 -80.744
1.147
*172.24.144.11 .PPS. 1 u 33 64 377 0.504 -0.031
0.043
-172.24.144.12 .PPS. 1 u 56 64 377 0.373 0.610
0.039
-clock.fmt.he.ne .CDMA. 1 u 38 64 377 26.363 -0.193
2.700
+express.tndh.ne .GPS. 1 u 6 64 377 1.152 0.051
0.232
+2001:470:e930:7 .GPS. 1 u 28 64 377 0.883 -0.075
1.838
-clock.isc.org .SHM. 1 u 42 64 377 30.936 2.551
1.677
-omega.s.uw.edu 172.22.16.38 2 u 7 64 377 15.414 0.576
1.755
-time0.apple.com 17.150.231.5 2 u 36 64 377 25.264 0.205
2.060
Before ntpd 0.9.6 starts:
____________________________________________________________________________
___
root at tic:~/ntpsec # ls -l /dev | grep ps0
lrwxr-xr-x 1 root wheel 5 Feb 8 20:46 gps0 -> ttyu1
lrwxr-xr-x 1 root wheel 6 Feb 8 20:46 pps0 -> dmtpps
root at tic:~/ntpsec # stty -f /dev/ttyu1.init speed 4800 baud;
lflags: echoe echoke echoctl
oflags: tab0
cflags: cs8 -parenb
root at tic:~/ntpsec # stty -f /dev/gps0
speed 4800 baud;
lflags: echoe echoke echoctl
oflags: tab0
cflags: cs8 -parenb
root at tic:~/ntpsec # cat /dev/gps0
$GPZDA,043012.000,10,02,2017,,*55
$GPGGA,043012.000,4744.6987,N,12206.7244,W,2,09,0.9,138.2,M,-17.1,M,1.8,0000
*4D
$GPGSA,A,3,24,06,17,15,19,28,12,13,01,,,,1.6,0.9,1.3*3E
$GPZDA,043013.000,10,02,2017,,*54
$GPGGA,043013.000,4744.6987,N,12206.7244,W,2,08,1.0,138.3,M,-17.1,M,0.8,0000
*45
$GPGSA,A,3,24,06,17,15,19,28,13,01,,,,,1.7,1.0,1.3*34
After ntpd 0.9.6 starts:
____________________________________________________________________________
___
stty -f /dev/gps0
speed 9600 baud;
lflags: -isig -iexten -echo
iflags: -ixon -ixany -imaxbel ignbrk -brkint ignpar
oflags: -opost -onlcr tab0
cflags: cs8 -parenb -hupcl clocal
discard dsusp eof eol eol2 erase erase2 intr kill
^@ ^@ ^@ ^@ ^@ ^@ ^@ ^@ ^@
lnext min quit reprint start status stop susp werase
^@ 0 ^@ ^@ ^@ ^@ ^@ ^@ ^@
Conf file:
____________________________________________________________________________
___
root at tic:~/ntpsec # cat /etc/ntpsec.conf
# Stripped down ntp.conf with refclock changes for ntpsec parser
#
# PPS Device
# Time1 -- measured pps pulse shape/level box in to 555 DCD out high 400ns
# 0.40us + 27.4320m cable (@ 5ns/m = 137.160ns) = 0.000000537160
#
refclock pps flag3 1 stratum 0 refid PPS time1 0.000000537160
# Local GPS NMEA -- ZDA + GGA + GSA
# Time1 -- Output of pulse shaper -> (0.53716us after PPS) 544ms high 456ms
low
# Time2 -- end of ZDA incl chksum/crlf: 35 char @4800bps(480cps)
0.072916667
# Time2 -- end of GGA incl chksum/crlf: +81 char @4800bps(480cps)
0.241666667
# Time2 -- end of GSA incl chksum/crlf: +(38-62)~50 char @4800bps(480cps)
0.345833333
# ZDA mode 8
refclock nmea refid GPS baud 4800 mode 8 time2 0.41916667
************** ^^^^^^^^^ **************************
# Network time servers
#
# Local NTP pool
server ntp1.tndh.net prefer iburst
server ntp2.tndh.net prefer iburst
#server ntp3.tndh.net prefer iburst
#
server 172.24.144.11 prefer
server 172.24.144.12
#
# SIXXS IPv6 servers
# Chicago
#server 2001:4978:1:400:202:b3ff:feb4:59cb
# Dallas
#server 2001:4de0:1000:a3::2
#
#Testing reference servers
# Reference ACTS
#server time.nist.gov
#
# Reference USNO
#server tick.usno.navy.mil
#server tock.usno.navy.mil
#
# Reference CDMA
# ESnet
#server 198.124.252.90
#server 2001:400:6000:2::2
#server 198.129.252.38
#server 2001:400:15:1::2
# Hurricane Electric IPv6
#server 216.218.192.202
server 2001:470:0:50::2
#
# Reference GPS
#server 149.20.64.28
server clock.isc.org
server bigben.cac.washington.edu
#
# Vendor time servers
server time0.apple.com
#server time.windows.com
#
..... log, drift, stats, & acls cut
ntpq results:
____________________________________________________________________________
___
root at tic:~/ntpsec # /usr/local/bin/ntpq -p
remote refid st t when poll reach delay offset
jitter
============================================================================
===
oPPS(0) .PPS. 0 l 30 64 377 0.0000 -0.0200
0.0010
NMEA(0) .GPS. 0 l - 64 0 0.0000 0.0000
0.0000
*172.24.144.11 .PPS. 1 u 40 64 377 0.6596 -0.0548
0.1996
+172.24.144.12 .PPS. 1 u 18 64 377 0.5332 0.5133
0.1511
-clock.fmt.he.ne .CDMA. 1 u 32 64 377 29.9588 1.6406
1.8276
+express.tndh.ne .GPS. 1 u 48 64 377 1.2156 0.0721
0.0589
+2001:470:e930:7 .GPS. 1 u 22 64 377 0.9069 -0.0857
1.9997
-clock.isc.org .SHM. 1 u 8 64 337 30.9973 2.4510
2.1900
-omega.s.uw.edu 172.22.16.38 2 u 44 64 377 18.4575 1.7750
0.7515
-time0.apple.com 17.253.26.253 2 u 27 64 377 27.8979 1.1457
2.1259
More information about the bugs
mailing list