[LinuxPPS] Found it, problem with current PPS code.

Cirilo Bernardo cirilo.bernardo at gmail.com
Sat Jun 14 00:37:03 CEST 2008


On Sat, Jun 14, 2008 at 5:39 AM,  <clemens at dwf.com> wrote:
> OK, here's the problem Im seeing with ntpd.
> Ntpd uses a generic function ntp_refclock to open the serial file, which I
> use in the ONCORE driver.
>
> This function does a "tcgetattr" to get the attributes of the tty line, then
> proceeds to set or clear those attributes before doing a tcsetattr
> (there is separate code for termio/termios/sysV ttys/BSD ttys, which is
> the reason for using this code)
>
> In any case the call to tcgetattr, returns with the error message
>
>    tcgetattr: Invalid arguments
>
> I can follow this thru if necessary, but Ill assume that this is enough
> of a clue for you.  My assumption is that he device being pointed at
> (/dev/ttyS0) must not appear to be a tty.
>

Sorry, I was assuming everyone was familiar with the ntp code.  This
is why I was suggesting that the line discipline may need to support
more ioctls.   I can't even remember exactly what is set/cleared now
or why.   What I can remember is that in many cases you can ignore the
request and just return a 'success' code (if anyone bothers to check
'termios' they will see that some things haven't changed).   This may
be necessary if the attributes being set will interfere with the GPS
or PPS.

- Cirilo



More information about the LinuxPPS mailing list