Ubuntu 16.04 with ntpd using NEMA/PPS..

Howard Leadmon howard at leadmon.net
Tue Jul 12 18:09:16 UTC 2016


OK, here is what I think is relevant, and I am sure I am just missing something.   As mentioned, I had this all working under FBSD, so that makes me think the hardware (Garmin 18lvc) is probably OK.

 

A couple quick notes, if I look at the datastream from ttyS0, I see output:

 

$GPRMC,175809,A,3920.0382,N,07623.5974,W,000.0,312.7,120716,011.3,W,D*15

$GPRMC,175810,A,3920.0382,N,07623.5974,W,000.0,312.7,120716,011.3,W,D*1D

 

If I run the ppstest, I see:

 

# ppstest /dev/gpspps0

trying PPS source "/dev/gpspps0"

found PPS source "/dev/gpspps0"

ok, found 1 source(s), now start fetching data...

source 0 - assert 1468346350.009738805, sequence: 43792 - clear  1468346349.109755945, sequence: 161702

 

So I am guessing that the PPS stream is working, as if I pull the serial link going to the Garmin, both the NEMA data, and the PPS output stop.

 

OK, with that said, if I look at ntptime, which seems like it should be a good indicator, I see:

 

ntp_gettime() returns code 0 (OK)

  time db2faee0.39e279dc  Tue, Jul 12 2016 14:01:04.226, (.226112987),

  maximum error 12997603 us, estimated error 1552 us, TAI offset 0

ntp_adjtime() returns code 0 (OK)

  modes 0x0 (),

  offset 0.004 us, frequency 15.031 ppm, interval 1 s,

  maximum error 12997603 us, estimated error 1552 us,

  status 0x2001 (PLL,NANO),

  time constant 9, precision 0.001 us, tolerance 500 ppm,

 

So I am not seeing any PPS info like would be expected, so I am guessing this is the root of the problem, I am just not sure how to fix it.

 

As to my ntp.conf, I have it setup using the NEMA device like this:

 

#

server 127.127.20.0 mode 16 minpoll 3 prefer

fudge 127.127.20.0 flag1 1 flag2 1 flag3 1 time1 0.0

#

 

I have tried changing flags, to try leading or falling edge, and even various baud rates from 4800 to 19,200 with the same results.

 

In my log I see:

 

10 Jul 17:11:20 ntpd[22130]: 38.103.8.24 local addr 10.3.0.13 -> <null>

10 Jul 17:11:20 ntpd[22130]: 127.127.20.0 local addr 127.0.0.1 -> <null>

10 Jul 17:11:20 ntpd[22130]: 38.103.8.18 local addr 10.3.0.13 -> <null>

10 Jul 17:11:20 ntpd[22130]: 38.103.8.1 local addr 10.3.0.13 -> <null>

10 Jul 17:11:20 ntpd[22130]: 0.0.0.0 061d 0d kern kernel time sync disabled

10 Jul 17:11:20 ntpd[22193]: Listen and drop on 0 v6wildcard [::]:123

10 Jul 17:11:20 ntpd[22193]: Listen and drop on 1 v4wildcard 0.0.0.0:123

10 Jul 17:11:20 ntpd[22193]: Listen normally on 2 lo 127.0.0.1:123

10 Jul 17:11:20 ntpd[22193]: Listen normally on 3 enp3s0f0 10.3.0.13:123

10 Jul 17:11:20 ntpd[22193]: Listen normally on 4 lo [::1]:123

10 Jul 17:11:20 ntpd[22193]: Listen normally on 5 enp3s0f0 [2001:550:102:301::13]:123

10 Jul 17:11:20 ntpd[22193]: Listen normally on 6 enp3s0f0 [fe80::6ab5:99ff:febe:212c%2]:123

10 Jul 17:11:20 ntpd[22193]: Listen normally on 7 pbw-ipv6 [2001:550:102:ff::b02]:123

10 Jul 17:11:20 ntpd[22193]: Listen normally on 8 pbw-ipv6 [fe80::a03:d%7]:123

10 Jul 17:11:20 ntpd[22193]: Listening on routing socket on fd #25 for interface updates

10 Jul 17:11:20 ntpd[22193]: refclock_params: time_pps_kcbind: Operation not supported

10 Jul 17:11:20 ntpd[22193]: GPS_NMEA(0) set PPSAPI params fails

10 Jul 17:11:20 ntpd[22193]: 0.0.0.0 c01d 0d kern kernel time sync enabled

10 Jul 17:11:20 ntpd[22193]: 0.0.0.0 c012 02 freq_set kernel 14.913 PPM

10 Jul 17:11:20 ntpd[22193]: 0.0.0.0 c016 06 restart

10 Jul 17:11:21 ntpd[22193]: 0.0.0.0 c615 05 clock_sync

10 Jul 17:11:22 ntpd[22193]: 0.0.0.0 0618 08 no_sys_peer

10 Jul 20:15:06 ntpd[22193]: 0.0.0.0 0628 08 no_sys_peer

11 Jul 14:17:46 ntpd[22193]: 0.0.0.0 0638 08 no_sys_peer

11 Jul 14:26:50 ntpd[22193]: 0.0.0.0 0413 03 spike_detect -0.625325 s

11 Jul 14:26:58 ntpd[22193]: 0.0.0.0 041c 0c clock_step -0.616403 s

11 Jul 14:26:58 ntpd[22193]: 0.0.0.0 0415 05 clock_sync

 

If you need any other info, by all means let me know, but I am still scratching my head as this all used to work fine.   I am sure I am just missing something, and hope someone can point me in the right direction..

 

 

---

Howard Leadmon 

 

From: ubuntu-users-bounces at lists.ubuntu.com [mailto:ubuntu-users-bounces at lists.ubuntu.com] On Behalf Of Peter Silva
Sent: Monday, July 11, 2016 12:32 PM
To: Ubuntu user technical support, not for general discussions <ubuntu-users at lists.ubuntu.com>
Subject: Re: Ubuntu 16.04 with ntpd using NEMA/PPS..

 

If the hardware is OK then... Perhaps show the NTP. Conf file?

On Jul 10, 2016 14:44, "Nils Kassube" <kassube at gmx.net <mailto:kassube at gmx.net> > wrote:

Howard Leadmon wrote:
>  I have a Garmin 18x which is connected into the serial port on the
> back of my HP DL-380 G7 server, using USB as some articles suggest to
> power it up. I have even run the ppstest, and and it showed I had a
> pps stream coming in, as well as connected to the serial port and I
> could watch the NEMA data flowing in on the board, so it appears at
> least hardware wise I should be OK.  Trust me, I have thought it just
> getting the gpsmod for my pi2 and turning it into a time machine so
> to speak.
>
> > lsmod|grep pps
>
>  The above command shows me:
>
> # lsmod|grep pps
> pps_ldisc              16384  3
> pps_core               20480  3 pps_ldisc
>
>
>  So I am guessing the PPS stuff is in the kernel.

Yes, obviously the correct module (pps_ldisc) is loaded. Otherwise you
probably couldn't see the pps stream with ppstest. Unfortunately I have
no idea what could be wrong - I don't have a ntp server with pps running
myself. I hope there is someone else who has some experience with pps
who can help you further.


Nils


--
ubuntu-users mailing list
ubuntu-users at lists.ubuntu.com <mailto:ubuntu-users at lists.ubuntu.com> 
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20160712/4b295eea/attachment-0001.html>


More information about the ubuntu-users mailing list