[ntp:questions] clockvar output from PPS

Dave Hart hart at ntp.org
Tue Feb 21 18:29:36 UTC 2012


On Tue, Feb 21, 2012 at 16:26, unruh <unruh at invalid.ca> wrote:
> On 2012-02-21, Alby VA <albyva at empire.org> wrote:
>>
>> David:
>>
>>  With your Sure GPS showing "PPS Clock Discipline", what does your
>> ntp.conf file look like? I ask, because if I list == server
>> 127.127.22.0 ==
>> I don't get anything (even though I did the soldering per
>> http://www.satsignal.eu/ntp/Sure-GPS.htm
>>
>> But when I list == server 127.127.20.0 == is works just fine.  I also
>> have
>> a link of ln -s /dev/cuau0 /dev/pps0 and ln -s /dev/cuau0 /dev/gps0
>
> ??? the format of pps0 output is nothing like the format of the output of
> the serial port as far as I know.

But you only know Linux PPSAPI, apparently.

> If you are going to use pps, you have to set up your serial port to run
> interrupts and to report those interrupts. On linux, you have to load
> the modules pps_core and pps_ldisc and then link the serial port dcd
> line to the pps_ldisc using ldattach 18. That creates a pps0 device in
> /dev and in /sys/class/pps/pps0/. I suspect similar things are needed in
> bsd.

Actually Linux PPSAPI is the outlier here.  Here's what the spec says:

   All of the other functions in the PPS API operate on PPS handles
   (type: pps_handle_t).  The time_pps_create() is used to convert an
   already-open UNIX file descriptor, for an appropriate special file,
   into a PPS handle.

   The definition of what special files are appropriate for use with the
   PPS API is outside the scope of this specification, and may vary
   based on both operating system implementation, and local system
   configuration.  One typical case is a serial line, whose DCD pin is
   connected to a source of PPS events.

On BSDs and Windows, the file descriptor passed to time_pps_create()
to identify the source is a communications FD (serial or parallel).
Linux chose to define a new device type for this role, and require its
separate association with a communications port via ldattach.

Cheers,
Dave Hart


More information about the questions mailing list