Probles description:
I tried to send data from Linux /dev/ttyS0 to a SCO unix serial
port. The two serial ports are connected with a NULL MODEM.
If XON/XOFF flow control is used, I set the linux /dev/ttyS0 with:
( stty 9600 ixon ixoff -crtscts cs8 ;
while : ; do sleep 3600 ; done ) < /dev/ttyS0 &
and set the SCO serial port same way. Now I can send data by
echo "some data" > /dev/ttyS0
There is no trouble at all. But if I use Hardware flow control,
the case is different.
First I set up the linux terminal as:
( stty 9600 crtscts -ixon -ixoff -ixany ;
while : ; do sleep 3600 ; done ) < /dev/ttyS0 &
The SCO serial port is set as Hardware flow control same way.
If I use :
echo "some data" > /dev/ttyS0
It will send nothing and the command never return.
Later I wrote a c program to send the data. The C code works only if
the port is opened as:
int fd = open("/dev/ttyS0", O_RDWR | O_NONBLOCK );
If the O_NONBLOCK micro is not there, the c code does not send
any data either.
I am not sure where is the bug: in the tty driver, in the shell, or need
another flag in the stty command ?
Yi Yan
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.;
_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils