Re: Serial port, DTR & CTS

Theodore Y. Ts'o (tytso@mit.edu)
Thu, 11 Nov 1999 11:03:25 -0500


Date: Thu, 11 Nov 1999 09:50:04 +0100 (MET)
From: R.E.Wolff@BitWizard.nl (Rogier Wolff)

Linux Lists (AKA Ivan?) wrote:
>
> On Wed, 10 Nov 1999, David Monniaux wrote:
> >
> > Can I work around this? Is there any way to tell the kernel not to touch
> > the RTS and DTR lines, except when explicitely requested by ioctl's?
>
> For 2.0.x kernels, it seems that there is no way to do it. For 2.2.x (and
> probably for 2.3.x as well, although I didn't check that), it seems that
> opening the port with baud rate 0 (zero) will do the job.

1) How do I open a port with a baud rate of 0? Indeed I have a few
serial ports that don't do exactly what they were designed to do, so I
also don't like the RTS signal doing funky stuff when I open the port
just to toggle the DTR signal...

If you really care about this, use a separate process to permanently
keep the serial driver open, and then use the TIOCMSET ioctl's to jiggle
the modem control signals.

2) This sounds like an oversight in the driver. I mean I don't know
about these semantics, and I write serial drivers....

It's not something the POSIX interfaces really allow for, and it may be
a specialized enough need that "use a custom kernel module" may be the
cleanest solution, especially if you can't allow DTR to flicker even
once after boot-time (when you start the daemon). Using the modem
control signals to (say) detonate explosives, or some such, is so
outside the design envelope of serial driver interface that I don't feel
that bad if there's no interface to allow that particular usage.

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/