NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD as an NTP stratum 1 server



Brad Spencer <brad%anduin.eldar.org@localhost> writes:

> No, there is no support for the /dev/ttyXX based IOCTLs that glue a PPS
> signal to a TTY port [1].  If there is an output on your GPS device for
> a pure GPIO style PPS signal, something that is either 5v or 3.3v in
> nature and pulses once per second at a digital logic level, you can feed
> that into a GPIO pin and use gpiopps(4) to utilize the pulse-per-second
> that way [2].  I have been doing that with GPS modules for years with
> NetBSD and run 2 GPS Stratum 1 NTP servers and 1 WWVB Stratum 1 NTP
> server.

There is actually support for PPS with USB devices that put the pps
signal on one of the modem pins, and I'm using it.  I think that I added
it a few years ago, and it was pretty easy.  However, there are two
issues:

  almost no USB GPS receivers bring PPS out on DCD.  I have a GR-601W or
  some model number like that, with a ublox 6, that was a special run
  that wired PPS to DCD inside.  If you have wired up a USB/serial chip
  and a GPS chip, then you may have this too.  But if you just bought a
  "gps mouse" or dongle, it is highly unlikely.

  There is 1 ms of fuzz on timing.

> As for stability and accuracy... using just the USB data alone will
> yield very poor results, as has been mentioned.  That can, however, be
> used for a quick test with the NEMA driver that ntpd has, just don't be
> impressed by it.  By adding the digital PPS signal into the mix that
> will deal with the USB problems and you will get a good result once the
> device and ntpd stabilizes.  My modules present their NEMA output as
> digital tty (uart) signals that I hook to a FTDI chip and into a USB
> port... so the effect is very simular to what you are probably doing.  I
> also use ntpd which can deal with both a /dev/ttyXX NEMA device and
> /dev/gpioppsX PPS device at the same time.  In this arrangement, you
> won't be using shared memory and your output would look something like
> this:

It is true that using USB PPS has 1 ms of fuzz.  However, people say
"stratum 1" and make varying assumptions about what they care about.

If the concern is to keep time sync when the Internet is down, 1 ms of
fuzz is ok.  If you are trying to build something to distribute time to
other people, and especially to be a public stratum 1, then it's not ok.


(The advice about "use gpio" is good - I am just trying to clarify USB PPS.)


Home | Main Index | Thread Index | Old Index