lkml.org 
[lkml]   [2001]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectTurn OFF flow-control on a serial link??

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/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.035 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site