Re: Serial port, DTR & CTS

Linux Lists (lists@cyclades.com)
Thu, 11 Nov 1999 08:23:09 -0800 (PST)


On Thu, 11 Nov 1999, Rogier Wolff wrote:

> Linux Lists (AKA Ivan?) wrote:
> >
> > 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...

Good question! :)

My answer was just based on the following serial.c code fragment:

if (info->tty->termios->c_cflag & CBAUD)
info->MCR = UART_MCR_DTR | UART_MCR_RTS;

So, if no baud rate is set, the two signals do not go high. As this
function (startup) is only called when the port is first opened, that
means that the signals won't change.

Now, how to open the port with baud rate 0 (zero) is a good question. Ted?

Regards,
Ivan

-
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/