Paul Duncan wrote:
Hi Courtney,

Thanks very much for the response. I've been on a course and taken some leave, which is why I am just getting back to this now.

On 8 Dec 2011, at 14:13, Courtney Bane wrote:

I'm fairly sure that your problem is that you don't have the timepps.h
header installed (this is the header that defines the PPSAPI functions
and data types). If ntp's configure script can't find it, it won't
enable PPS support. It's available here:
<https://github.com/ago/pps-tools>. I can put it in /usr/local/include
and have it be picked up automatically on my Debian system; you might
need to add a "CFLAGS=-I/usr/local/include" to your ./configure
invocation if it doesn't find it automatically. If it was able to find
it, there should be a line "#define HAVE_PPSAPI 1" in config.h.

Thanks very much. I've downloaded that and put it in /usr/include to make absolutely sure it gets picked up.


Once you do that and rebuild, ntpd should be able to see the PPS.

Okay, done that.

checking termios.h presence... yes
checking for termios.h... yes
checking timepps.h usability... yes
checking timepps.h presence... yes
checking for timepps.h... yes
checking timex.h usability... no
checking timex.h presence... no
checking for timex.h... no
checking for unistd.h... (cached) yes

So, the obvious question (given that things are still not working) would seem to be, what is timex.h and is it s absence likely to be causing PPS not to work?


2) Should I put the "ldattach 18 /dev/ttyS0" command in rc.local -
currently I'm running it manually after each boot.

I'm using udev to do that. I put the lines below in
/etc/udev/rules.d/09-pps.rules (which I created). The first line adds a
/dev/gps0 symlink to the serial port device, the second line runs
ldattach against the serial port, and the third line sets the ownership
and permissions of the pps device, and adds a /dev/gpspps0 symlink.

KERNEL=="ttyS1", SYMLINK+="gps0"
KERNEL=="ttyS1", RUN+="/usr/sbin/ldattach pps /dev/%k"
KERNEL=="pps0", OWNER="root", GROUP="tty", MODE="0660", SYMLINK+="gpspps0"

Okay, thats done, and seems to work. All the correct devices are created and the ppstest program works with the gpspps0 device :-)

So, below is my now very minimalist /etc/ntp.conf file:

server 127.127.20.0 flag3 1 prefer mode 2 minpoll 4 maxpoll 4

I've used pps with Ubuntu but not recently. I can't be sure if
your ntpd refclock driver is same as here but I see type 20 has:

flag1 0 | 1
        Disable PPS if 0 (default)

I had to use the ATOM driver when I first used PPS and on NetBSD
my conf has:

server 127.127.20.2 mode 18 prefer
fudge  127.127.20.2 time2 0.350 refid GPSb

server 127.127.22.2
fudge  127.127.22.2 flag2 0  flag3 1  refid PPSb

The time and edge parameters will be specific for
your setup.

I've kept with the ATOM driver even though the PPS
support is now added to the type 20 driver.

# ntpq -p
remote        refid st  t reach  delay   offset jitter
*GPS_NMEA(2) .GPSb.  0  l   377  0.000  -72.923  5.190
oPPS(2)      .PPSb.  0  l   377  0.000    0.002  0.004
+ntp1....            2  u   377  0.735    0.366  0.608
+ntp0....    .MSFa.  1  u   377  0.901    0.083  0.412


David


tos mindist 0.250

statistics loopstats
statsdir /var/log/ntp/
filegen loopstats file loop type delay enable


Don't ask me why it shows up as quoted...

The bad news is that ntpq -p still reports the following:

reading /etc/ntp.conf

root@tick:/etc/ntp# ntpq -p
remote refid st t when poll reach delay offset jitter ============================================================================== *GPS_NMEA(0) .GPS. 0 l 64 64 377 0.000 -27.294 9.165

So. Question: Should I just give up and use BSD? Please note: I really am a committed Linux user and did my first install using SLS and 20+ floppies sometime before I got my first CD drive (a Mitsumi) in the early 90's onto an i386sx running at 20MHz with about 4MB of RAM (in SIP modules).

Thanks for all your help so far,

Paul.

_______________________________________________
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Reply via email to