time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Re: [time-nuts] Getting ntpd to work with Garmin LVC-18x and Ubuntu 16.04..

HM
Hal Murray
Sat, Jul 16, 2016 7:14 PM

Does anyone have any ideas, or have this all working under Ubuntu 16.04 LTS?
I would sure love to get my time server back online, as I pretty much have
everything on the network sync with it..

The PPS stuff on Linux needs some magic setup.  You need to run something
like:

if [ ! -e /dev/gps0 ]; then
ln -s /dev/ttyS0 /dev/gps0
setserial /dev/ttyS0 low_latency
ldattach 18 /dev/gps0 & # gets /dev/pps0
sleep 10
fi

I put that in /etc/sysconfig/ntpd which gets run by the startup scripts
before starting ntpd.

When you get to systemd, it doesn't actually run /etc/sysconfig/ntpd, just
scans it for OPTIONS=xxx
I haven't found a great solution.  What I've been doing is use systemctl to
disable autostart and start ntpd from rc.local by:
/bin/sh /etc/sysconfig/ntpd
/usr/sbin/service ntpd start

--
These are my opinions.  I hate spam.

howard@leadmon.net said: > Does anyone have any ideas, or have this all working under Ubuntu 16.04 LTS? > I would sure love to get my time server back online, as I pretty much have > everything on the network sync with it.. The PPS stuff on Linux needs some magic setup. You need to run something like: if [ ! -e /dev/gps0 ]; then ln -s /dev/ttyS0 /dev/gps0 setserial /dev/ttyS0 low_latency ldattach 18 /dev/gps0 & # gets /dev/pps0 sleep 10 fi I put that in /etc/sysconfig/ntpd which gets run by the startup scripts before starting ntpd. When you get to systemd, it doesn't actually run /etc/sysconfig/ntpd, just scans it for OPTIONS=xxx I haven't found a great solution. What I've been doing is use systemctl to disable autostart and start ntpd from rc.local by: /bin/sh /etc/sysconfig/ntpd /usr/sbin/service ntpd start -- These are my opinions. I hate spam.
GE
Gary E. Miller
Sat, Jul 16, 2016 7:57 PM

Yo Hal!

On Sat, 16 Jul 2016 12:14:44 -0700
Hal Murray hmurray@megapathdsl.net wrote:

Does anyone have any ideas, or have this all working under Ubuntu
16.04 LTS? I would sure love to get my time server back online, as
I pretty much have everything on the network sync with it..

The PPS stuff on Linux needs some magic setup.  You need to run
something like:

Or use gpsd and just let gpsd do the magic.

RGDS
GARY

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com  Tel:+1 541 382 8588

Yo Hal! On Sat, 16 Jul 2016 12:14:44 -0700 Hal Murray <hmurray@megapathdsl.net> wrote: > howard@leadmon.net said: > > Does anyone have any ideas, or have this all working under Ubuntu > > 16.04 LTS? I would sure love to get my time server back online, as > > I pretty much have everything on the network sync with it.. > > The PPS stuff on Linux needs some magic setup. You need to run > something like: Or use gpsd and just let gpsd do the magic. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 gem@rellim.com Tel:+1 541 382 8588
HL
Howard Leadmon
Sat, Jul 16, 2016 8:32 PM

I made sure that even by hand I had run the ldattach, and that /dev/pps0 existed and was also linked to /dev/gpspps0 which is the case.

I have also run ppstest, and show a pps stream, granted the weird thing is it seems like I get two lines of the same output ever second so not sure what is up there.

ppstest /dev/pps0

trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1468700910.979003708, sequence: 44155 - clear  1468700910.078946163, sequence: 516263
source 0 - assert 1468700910.979003708, sequence: 44155 - clear  1468700911.078993120, sequence: 516264
source 0 - assert 1468700911.979006178, sequence: 44156 - clear  1468700911.078993120, sequence: 516264
source 0 - assert 1468700911.979006178, sequence: 44156 - clear  1468700912.079007527, sequence: 516265
source 0 - assert 1468700912.978993897, sequence: 44157 - clear  1468700912.079007527, sequence: 516265
source 0 - assert 1468700912.978993897, sequence: 44157 - clear  1468700913.079009555, sequence: 516266

If I pull the serial line, as expected it loses the source and stops counting.

I also loaded up gpsd thinking it might help, but it didn't seem to resolve the issue.

I figure something isn't right, but I am just not quite sure how to debug this, and all my google-fu hasn't come up with anything that has resolved the issues.  So much for easy..  LOL


Howard Leadmon

-----Original Message-----
From: time-nuts [mailto:time-nuts-bounces@febo.com] On Behalf Of Hal
Murray
Sent: Saturday, July 16, 2016 3:15 PM
To: Discussion of precise time and frequency measurement <time-
nuts@febo.com>
Cc: hmurray@megapathdsl.net
Subject: Re: [time-nuts] Getting ntpd to work with Garmin LVC-18x and
Ubuntu 16.04..

howard@leadmon.net said:

Does anyone have any ideas, or have this all working under Ubuntu 16.04

LTS?

I would sure love to get my time server back online, as I pretty much
have everything on the network sync with it..

The PPS stuff on Linux needs some magic setup.  You need to run something
like:

if [ ! -e /dev/gps0 ]; then
ln -s /dev/ttyS0 /dev/gps0
setserial /dev/ttyS0 low_latency
ldattach 18 /dev/gps0 & # gets /dev/pps0
sleep 10
fi

I put that in /etc/sysconfig/ntpd which gets run by the startup scripts before
starting ntpd.

When you get to systemd, it doesn't actually run /etc/sysconfig/ntpd, just
scans it for OPTIONS=xxx I haven't found a great solution.  What I've been
doing is use systemctl to disable autostart and start ntpd from rc.local by:
/bin/sh /etc/sysconfig/ntpd
/usr/sbin/service ntpd start

--
These are my opinions.  I hate spam.


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-
nuts
and follow the instructions there.

I made sure that even by hand I had run the ldattach, and that /dev/pps0 existed and was also linked to /dev/gpspps0 which is the case. I have also run ppstest, and show a pps stream, granted the weird thing is it seems like I get two lines of the same output ever second so not sure what is up there. # ppstest /dev/pps0 trying PPS source "/dev/pps0" found PPS source "/dev/pps0" ok, found 1 source(s), now start fetching data... source 0 - assert 1468700910.979003708, sequence: 44155 - clear 1468700910.078946163, sequence: 516263 source 0 - assert 1468700910.979003708, sequence: 44155 - clear 1468700911.078993120, sequence: 516264 source 0 - assert 1468700911.979006178, sequence: 44156 - clear 1468700911.078993120, sequence: 516264 source 0 - assert 1468700911.979006178, sequence: 44156 - clear 1468700912.079007527, sequence: 516265 source 0 - assert 1468700912.978993897, sequence: 44157 - clear 1468700912.079007527, sequence: 516265 source 0 - assert 1468700912.978993897, sequence: 44157 - clear 1468700913.079009555, sequence: 516266 If I pull the serial line, as expected it loses the source and stops counting. I also loaded up gpsd thinking it might help, but it didn't seem to resolve the issue. I figure something isn't right, but I am just not quite sure how to debug this, and all my google-fu hasn't come up with anything that has resolved the issues. So much for easy.. LOL --- Howard Leadmon > -----Original Message----- > From: time-nuts [mailto:time-nuts-bounces@febo.com] On Behalf Of Hal > Murray > Sent: Saturday, July 16, 2016 3:15 PM > To: Discussion of precise time and frequency measurement <time- > nuts@febo.com> > Cc: hmurray@megapathdsl.net > Subject: Re: [time-nuts] Getting ntpd to work with Garmin LVC-18x and > Ubuntu 16.04.. > > > howard@leadmon.net said: > > Does anyone have any ideas, or have this all working under Ubuntu 16.04 > LTS? > > I would sure love to get my time server back online, as I pretty much > > have everything on the network sync with it.. > > The PPS stuff on Linux needs some magic setup. You need to run something > like: > > if [ ! -e /dev/gps0 ]; then > ln -s /dev/ttyS0 /dev/gps0 > setserial /dev/ttyS0 low_latency > ldattach 18 /dev/gps0 & # gets /dev/pps0 > sleep 10 > fi > > I put that in /etc/sysconfig/ntpd which gets run by the startup scripts before > starting ntpd. > > When you get to systemd, it doesn't actually run /etc/sysconfig/ntpd, just > scans it for OPTIONS=xxx I haven't found a great solution. What I've been > doing is use systemctl to disable autostart and start ntpd from rc.local by: > /bin/sh /etc/sysconfig/ntpd > /usr/sbin/service ntpd start > > > > -- > These are my opinions. I hate spam. > > > > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time- > nuts > and follow the instructions there.
GE
Gary E. Miller
Sat, Jul 16, 2016 9:03 PM

Yo Howard!

On Sat, 16 Jul 2016 16:32:20 -0400
"Howard Leadmon" howard@leadmon.net wrote:

I have also run ppstest, and show a pps stream, granted the weird
thing is it seems like I get two lines of the same output ever second
so not sure what is up there.

One is the assert edge of the PPS, the other is the clear edge.

source 0 - assert 1468700910.979003708, sequence: 44155 - clear 1468700910.078946163, sequence: 516263
source 0 - assert 1468700910.979003708, sequence: 44155 - clear 1468700911.078993120, sequence: 516264

So, the assert happened at 1468700910.979003708
And the clear happend at  1468700911.078993120

So about a 200 milliSecond pulse.

I also loaded up gpsd thinking it might help, but it didn't seem to
resolve the issue.

You gotta change your ntpconfig to use dirver 28, not driver 20, with gpsd.

Only one of ntpd and gpsd should use the serial port at the same time.

RGDS
GARY

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com  Tel:+1 541 382 8588

Yo Howard! On Sat, 16 Jul 2016 16:32:20 -0400 "Howard Leadmon" <howard@leadmon.net> wrote: > I have also run ppstest, and show a pps stream, granted the weird > thing is it seems like I get two lines of the same output ever second > so not sure what is up there. One is the assert edge of the PPS, the other is the clear edge. > source 0 - assert 1468700910.979003708, sequence: 44155 - clear 1468700910.078946163, sequence: 516263 > source 0 - assert 1468700910.979003708, sequence: 44155 - clear 1468700911.078993120, sequence: 516264 So, the assert happened at 1468700910.979003708 And the clear happend at 1468700911.078993120 So about a 200 milliSecond pulse. > I also loaded up gpsd thinking it might help, but it didn't seem to > resolve the issue. You gotta change your ntpconfig to use dirver 28, not driver 20, with gpsd. Only one of ntpd and gpsd should use the serial port at the same time. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 gem@rellim.com Tel:+1 541 382 8588