[time-nuts] Getting NTP/Linux to work with GPS-DO?

Scott Mace smace at intt.net
Mon Oct 20 22:18:00 UTC 2008


I have it working under FreeBSD w/ a custom ntp refclock.  It does
not work with the hpgps refclock.  PTIME:TCODE is not on-time.
The 1-PPS output is a couple 100ms wide, so there is no need for a
PPS stretcher.  I'm using a soekris net4501 w/ the tmrin mod
that is documented on febo.com.  Attached is a patch
which should work on both linux and freebsd, but for
kernel pps support, you will need to apply one of the various
kernel patches... Older 2.4kernels are better supported.  FreeBSD
has it natively.

Here's a sample ntp.conf

server 127.127.45.0 prefer minpoll 4 maxpoll 4 iburst
fudge 127.127.45.0 time1 0.012 #115200
fudge 127.127.45.0 flag3 1
server 127.127.22.0 minpoll 4 maxpoll 4
tos mindist 0.050

driftfile /media/log/ntpd.drift

statsdir /media/log/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable


sysctl.conf

machdep.elan_gpio_config=-----P...--..--------..---------


also I have to modify the sio driver in the kernel:
/sys/dev/sio/sio.c

diff -u sio.c.orig sio.c
--- sio.c.orig  2008-06-27 15:11:52.000000000 -0500
+++ sio.c       2008-10-04 10:32:57.000000000 -0500
@@ -1928,7 +1928,7 @@
          * (about 3 ticks if input flow control is not used or not honoured,
          * but a bit less for CS5-CS7 modes).
          */
-       cp4ticks = speed / 10 / hz * 4;
+       cp4ticks = speed / 10 / hz * 40;
         for (ibufsize = 128; ibufsize < cp4ticks;)
                 ibufsize <<= 1;
         if (ibufsize == com->ibufsize) {





	Scott

Bruce Taylor wrote:
> Folks,
> 
>   Has anyone gotten a Jackson Labs 'Fury' gps-do to work as a time/pps
> source for Linux?
> 
>   Our lab is looking to use both the stable 10MHz clock for various
> LOs on a radio-telescope, and also get reasonably tight timing for a
> software correllator to use in discriminating pulsar signals.
> 
>   Our Linux guy has lost most of his hair out trying to get the NTP
> daemon to receive the PPS signal and thus get NTP to see the GPS-DO as
> a stratum 0 source.
> 
>   Our configuration is: vanilla Linux from kernel.org (version 2.6.23)
> running on an intel platform.  We've applied the LinuxPPS kernel
> patch, and we're feeding the serial port with the Fury in NMEA mode.
> We made the required internal mod on the Fury to feed the PPS signal
> out on the serial port, and can see it blinking using a scope.
> 
>   Apologies if my description is vague, as I'm just getting into the
> fun and joy of kernel hacking :-)
> 
>   Many thanks for any advice,
> 
>   - Bruce Taylor
> 
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ntp-fury.diff
Type: text/x-patch
Size: 19111 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20081020/846021fe/attachment.bin>


More information about the Time-nuts_lists.febo.com mailing list