[LinuxPPS] LinuxPPS 5.0.0-rc1

Frank Kardel kardel at ntp.org
Thu Aug 9 21:29:38 CEST 2007


Hi Udo !

> Rodolfo Giometti wrote:
>> On Thu, Aug 09, 2007 at 05:26:37PM +0200, Udo van den Heuvel wrote:
>>
>>> Thanks for taking the steps that might take LinuxPPS to teh final
>>> inclusing into the kernel!
>>> What I am wondering about is the consequences to the refclocks.
>>> What should I change in the NMEA patch for example?
>>> I don't yet understand fully.
>>>
>>> Can someone please explain?
>>
>> If you see last letters with Frank in this ML's archives you can see
>> what you have to do. Take a look at refclock 8 (named PARSE):
>>
>>    http://www.ee.udel.edu/~mills/ntp/html/drivers/driver8.html
>
> These docs dont tell me that much.
>
>> it can consider one or two devices.
>>
>> If you supply one device it tries to read both GPS and PPS data from
>> it, but if you supply 2 devices it tries to read GPS data from
>> /dev/refclock-u while PPS data from /dev/refclockpps-u.
>
> So I make two links pointing to the same /dev/ttySx for my current
> Garmin GPS18?

If the serial also supports PPSAPI - only the first link /dev/refclock-0
is needed - DATA and PPS are handled via one device.
If PPSAPI for this device is supported by another device the second link
(/dev/refclockpps-0) is needed also - DATA is handled by the first device,
PPSAPI is handled by the second device.

>
>> You should modify your refclocks in order to do like PARSE does.
>>
>> The resulting patch will be more likely accepted into NTP main line
>> (as Frank said ;).
>
> So for NMEA plus PPS (like on the Garmin GPS18 I have) I could make a
> patch that accepts one device where it finds both PPS and NMEA by
> default? (alternate approach from the link suggestion above)
refclock_nmea.c already works this way and should not need any patches
wrt/ PPSAPI for LinuxPPS 5.0. It needs only patches to support a separate
PPSAPI capable device.

> And as extra (to make it flexible like expected) I can have it receive
> PPS from another device file.

Yes, add a second file descriptor that is initialized with the
normal device descriptor if the pps device cannot be opened. If open
of the pps device succeeds use this descriptor for all PPSAPI interaction.

At close() time close the pps descriptor if it differs from the standard
descriptor.
See refclock_parse.c for an example - look for fdpps.

>
> For the PPS driver we supply two devices where only the PPS device file
> works?
>
LinuxPPS 5.0 will supply the PPSAPI capable devices.

Frank




More information about the LinuxPPS mailing list