[ntp:questions] SIRF time output wobble, GPS or NTP fault?
David J Taylor
david-taylor at blueyonder.co.uk.invalid
Thu Mar 8 08:17:47 UTC 2012
"Dave Hart" <davehart at gmail.com> wrote in message
news:CAMbSiYBZw1wMb0cn1t5u=L5F+aduoMywHYX6AYznbatRBzJgEg at mail.gmail.co[]
> No, the PPSAPI support is in serialpps.sys, a slightly-modified 16550
> UART driver. When using serial-over-USB, a different driver (for the
> pl2003 or similar chip) presents the serial port and it will not have
> the PPSAPI ioctl to timestamp DCD in the driver.
Thanks, Dave. Yes, the kernel-mode PPSAPI support will only be true for a
real serial port. I appreciate that, but thanks for the clarification.
> On Windows only, ntpd has a hack user-mode PPS timestamping
> implemented in the serial I/O layer which substitutes the last PPS
> timestamp taken by ntpd after Windows indicates the DCD transition for
> the end-of-line serial timestamp of the first line received after each
> PPS event. That requires configuring ntpd to use only the first
> sentence after the PPS, and it won't work on Linux, so I doubt Ron
> will be interested in that approach.
>
> The Linux PPSAPI has the same type of driver issue -- the code to
> timestamp DCD is in the UART driver, but not the pl2003 driver, so
> PPSAPI will work with a real serial port but not with a USB/serial
> adapter.
>
> Cheers,
> Dave Hart
Dave, perhaps you could clarify one thing on Windows about the user-mode
PPS timestamping. When you say "serial I/O layer", my understanding is
that this /would/ include virtual COM port devices such as RS-232/USB
adapters. So when a DCD transition occurs (and providing the USB drivers
handle the DCD line properly), NTP's code would be called to say a DCD
transition had happened, and that time would be noted, albeit in user
mode. Later, when the first sentence has been received over that same
port - real or virtual port - the noted time would be substituted for the
end of line serial timestamp.
So the user-mode timestamping works for both real physical and emulated
virtual COM ports.
>From the test I made with Windows XP, this allows reported NTP offsets to
stay within about 400 microseconds with a GPS 18 LVC connected over USB,
which is much better than what I would get using Internet servers alone.
Perhaps the Linux port could also benefit from a user-mode DCD timestamp,
or is there not the justification for the effort?
Cheers,
David
More information about the questions
mailing list