[ntp:questions] ntp on ubuntu 12.10 with gps and pps.

Paul J R me at pjr.cc
Sun Apr 7 10:14:24 UTC 2013


Hi All,

I've got a SiRF star 3 GPS with a PPS line which im trying to get 
running on a machine with ubuntu 12.10 and a serial port using the DCD 
line for pps signalling. Took quite a while as the ntpd that ships with 
ubuntu 12.10 appears to be compiled without pps support (please correct 
me if im wrong here - but no matter what I do, the shipped version never 
tries to open /dev/pps0, gpspps0, etc etc and i've checked permissions 
and apparmor) - also theres alot of contradictory info on the net about 
how you get pps and gps operating this way (took some time to find that 
i needed "flag1 1" in the gps settings - which alot of articles dont 
mention).

But, once it was up and running it appeared to work very well, after a 
few hours the jitter was down to below 0.01. Next I added in a few 
external time sources, and i ended up with this:

      remote           refid      st t when poll reach   delay offset  
jitter
==============================================================================
  203.0.178.191   216.218.254.202  2 u   14   64    3    8.704 990.003   
0.189 (my isp)
  203.82.209.217  18.26.4.105      2 u   18   64    3   62.372 997.624   
0.466 (pool server)
  202.127.210.36  223.255.185.2    2 u   19   64    3   22.454 1067.75   
1.747 (pool server)
  130.102.2.123   130.102.132.164  2 u   17   64    3   22.947 1000.23   
0.392 (pool server)
  202.125.45.77   223.252.32.9     2 u   17   64    3   24.810 1001.95   
0.849 (pool server)
*127.127.20.0    .GPS.            0 l    7    8  377    0.000 0.467   
0.209 (GPS)

Everythings almost exactly 1 second out. Reading around about this, it 
appears that this occurs cause theres possibly too many sentences coming 
across the 4800 baud serial line, is that correct?

After adjusting "fudge time2", i ended up with with this:
      remote           refid      st t when poll reach   delay offset  
jitter
==============================================================================
-203.0.178.191   216.218.254.202  2 u   51   64  377    9.070 -5.518   1.423
-202.127.210.36  223.255.185.2    2 u   53   64  377   21.729 74.408   4.701
*203.192.179.99  223.252.32.9     2 u   48   64  377   22.956 17.581   3.551
+119.148.67.183  203.12.160.2     3 u   51   64  377   21.200 4.094   1.439
+203.192.179.98  203.35.83.242    2 u   50   64  377   22.735 17.913  27.315
o127.127.20.0    .GPS.            0 l    3    8  377    0.000 5.080   0.193


and a few hours later:
      remote           refid      st t when poll reach   delay offset  
jitter
==============================================================================
+203.0.178.191   216.218.254.202  2 u   44   64  377    9.041 -10.309   
0.356
+202.127.210.36  223.255.185.2    2 u   50   64  377   21.547 64.812   6.039
+203.192.179.99  210.9.192.50     2 u   35   64  377   23.000 -0.256   2.525
-119.148.67.183  203.12.160.2     3 u   48   64  377   21.006 -15.580   
4.364
-203.192.179.98  203.35.83.242    2 u   49   64  377   23.130 74.392  26.231
o127.127.20.0    .GPS.            0 l    4    8  377    0.000 -0.065   0.003


and the config i've ended up with is:
server 127.127.20.0 mode 1 minpoll 2 maxpoll 4 prefer
fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 time2 1.0

Seems like a pretty decent little gps unit, assuming i've got it 
functioning and configured correctly?



More information about the questions mailing list