Turn OFF flow-control on a serial link??

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Mon Jan 15 2001 - 09:18:38 EST


Hello,

When the 'console' is mapped to a serial device, i.e., /dev/ttyS0,
if a terminal, without modem control is connected, no text is displayed.

If a terminal is connected, it is often just 3-wires, i.e, RX/TX/GND.
I need to disable modem control, i.e., hardware slow-control.
It used to be that CLOCAL was sufficient in the c_cflag member of
the termios structure. Then a flag, CRTSCTS was put into c_cflag member
also. I could do:

        tcgetattr(STDIN_FILENO, &termios);
        termios.c_cflag &= ~CRTSCTS;
        termios.c_cflag |= CLOCAL;
        tcsetattr(STDIN_FILENO, TCSANOW, &termios);

This worked up to Linux version 2.2.17 or thereabouts.

This no longer is the case. It compiles and executes without errors, but
does absolutely nothing! So, how do I initialize a serial link to ignore
RTS/CTS on version 2.4.0... ?

FYI, I tried......

        ioctl(fd, TIOCMGET, &modem);
        modem &= ~TIOCM_RTS;
// modem &= ~TIOCM_CTS;
// modem &= ~TIOCM_DTR;
        ioctl(fd, TIOCMSET, &modem);

... and other such guesses without any success.

Also:
        `cp textfile /dev/ttyS0` # Waits forever
        `cat textfile >/dev/ttyS0` # Waits forever
        but....
        `ls >dev/ttyS0` # Executes

Cheers,
Dick Johnson

Penguin : Linux version 2.4.0 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

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



This archive was generated by hypermail 2b29 : Mon Jan 15 2001 - 21:00:41 EST