time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Getting NTP/Linux to work with GPS-DO?

BT
Bruce Taylor
Mon, Oct 20, 2008 8:09 PM

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
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
BG
Björn Gabrielsson
Mon, Oct 20, 2008 8:42 PM

Hi Bruce,

On Mon, 2008-10-20 at 16:09 -0400, 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.

Try a 2.4-kernel, see below.

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.

LinuxPPS is very much work in progress. You are on the bleeding edge!
I am not sure the dust has settled enough for stable performance.

If your LAB have the option -- and some hair left -- try the latest 2.4
kernel with a working PPSKit-patch.

http://www.kernel.org/pub/linux/daemons/ntp/PPS/

Do not know if there are later ones than 2.1.7 somewhere else.

I have 2.4.3X-something kernel running on a lab laptop with a standard
NMEA serial stream with PPS on DCD, that converges down to sub 10us
offset within a minute or two. (There might be reasons not to trust the
NTP stats down at this level, but...)

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.

Most serial ports I have tested will tolerate a standard PPS-pulse even
if its voltage levels are (way) noncompliant with RS232. YMMV!

To see if you get the pulses through the serial port, you might run
the radioclkd in test mode.

 http://www.buzzard.me.uk/jonathan/downloads/radioclk-1.0.tar.gz

That will show you both edges on signals attached to DCD, CTS or DSR.
This approach could also be used to time your signals from a user space
program.

Apologies if my description is vague, as I'm just getting into the
fun and joy of kernel hacking :-)

Good luck!

Many thanks for any advice,

  • Bruce Taylor

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.

Hi Bruce, On Mon, 2008-10-20 at 16:09 -0400, 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. Try a 2.4-kernel, see below. > 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. LinuxPPS is _very_ much work in progress. You are on the bleeding edge! I am not sure the dust has settled enough for stable performance. If your LAB have the option -- and some hair left -- try the latest 2.4 kernel with a working PPSKit-patch. http://www.kernel.org/pub/linux/daemons/ntp/PPS/ Do not know if there are later ones than 2.1.7 somewhere else. I have 2.4.3X-something kernel running on a lab laptop with a standard NMEA serial stream with PPS on DCD, that converges down to sub 10us offset within a minute or two. (There might be reasons not to trust the NTP stats down at this level, but...) > 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. Most serial ports I have tested will tolerate a standard PPS-pulse even if its voltage levels are (way) noncompliant with RS232. YMMV! To see if you get the pulses through the serial port, you might run the radioclkd in test mode. http://www.buzzard.me.uk/jonathan/downloads/radioclk-1.0.tar.gz That will show you both edges on signals attached to DCD, CTS or DSR. This approach could also be used to time your signals from a user space program. > Apologies if my description is vague, as I'm just getting into the > fun and joy of kernel hacking :-) Good luck! > Many thanks for any advice, > > - Bruce Taylor > > _______________________________________________ > 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.
JA
John Ackermann N8UR
Mon, Oct 20, 2008 9:26 PM

Bruce, unfortunately Linux doesn't play too nicely with PPS -- long
story, but you need to do patches to get even minimal functionality with
current kernels.

An option is to use a shared memory driver called shmpps (available from
http://time.qnan.org/).  I've done this in the past, but had a little
trouble keeping the driver running reliably; it would sometimes die
silently, causing loss of the PPS source.  However, I think I was using
an earlier version than the one that's on that web page.

Using this approach will let you use the PPS signal, but won't give you
coarse time via the serial data stream.  To get that, you can use the HP
driver in ntpd which supports the HP Z3801A/58503A command set.  I think
that the Jackson Fury emulates these commands, though I haven't tried it
with this driver.

But if you can, a FreeBSD system makes a much better ntp server.  I am
a Linux guy, but my primary ntp boxes all are slightly modified Soekris
4501A single-board computers running a stripped down FreeBSD.  They run
rings around anything else.

Hope this helps a bit.

John

Bruce Taylor said the following on 10/20/2008 04:09 PM:

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@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Bruce, unfortunately Linux doesn't play too nicely with PPS -- long story, but you need to do patches to get even minimal functionality with current kernels. An option is to use a shared memory driver called shmpps (available from http://time.qnan.org/). I've done this in the past, but had a little trouble keeping the driver running reliably; it would sometimes die silently, causing loss of the PPS source. However, I think I was using an earlier version than the one that's on that web page. Using this approach will let you use the PPS signal, but won't give you coarse time via the serial data stream. To get that, you can use the HP driver in ntpd which supports the HP Z3801A/58503A command set. I think that the Jackson Fury emulates these commands, though I haven't tried it with this driver. But if you can, a FreeBSD system makes a *much* better ntp server. I am a Linux guy, but my primary ntp boxes all are slightly modified Soekris 4501A single-board computers running a stripped down FreeBSD. They run rings around anything else. Hope this helps a bit. John ---- Bruce Taylor said the following on 10/20/2008 04:09 PM: > 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@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.
SM
Scott Mace
Mon, Oct 20, 2008 10:18 PM

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@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

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@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there. > >