[LinuxPPS] A question about the PPS device.

Cirilo Bernardo cirilo.bernardo at gmail.com
Thu Jun 26 02:38:30 CEST 2008


On Wed, Jun 25, 2008 at 10:04 PM,  <clemens at dwf.com> wrote:
> Here is a note (slightly edited) that I sent to Rodolfo,
> about installing the N_PPS code in the ONCORE driver.
> He suggested that I send it to the whole list in case anyone out there
> has any ideas...
>
> ---
>
>> Here is a correct statement of the problem:
>>
>> I open /dev/ttyS0 RW, no problem.
>> I then set the line discipline,  no problem.
>>
>> Now in the SAME process I try opening /dev/pps1 RW, that fails.
>> If I try RO I can open it.
>>
>> Strange.
>>
>> If however I do the first two steps in one process (ttyctrl),
>> I CAN open /dev/pps1 RW in a 2nd process (ntpd).
>>
>> Stranger.
>>
>> I doubt that makes any sense, but thats what I saw.  I just changed
>> O_RDWR to O_RDONLY in the ONCORE driver and it ran.
>
> Anyone have any ideas?
>
> --
>                                        Reg.Clemens
>                                        reg at dwf.com
>
>
>
> _______________________________________________
> LinuxPPS mailing list
> LinuxPPS at ml.enneenne.com
> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support
>

That would have to do with the pps_core code if 'pps1' can be RW in
one process but only RO when opened in the same process as ttyS0.  I
can't imagine why that would happen; there is no direct link between
pps_core and serial_core; something is not right, but I'd say the
ttyS0 relation is only a coincidence.   Unless you need write access
to pps1 for operation, I think the fact that it can be opened RW at
all is a bug. Some people may see it differently and say it should be
possible to open r/w but that all data written should simply be
ignored and the 'write' should succeed.

- Cirilo



More information about the LinuxPPS mailing list