lkml.org 
[lkml]   [2004]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPROBLEM: serial port loopback serious bug
Description:

I observe the bug in kernel 2.4.21 and 2.4.22, I guess it is general problem
in 2.4.xx kernel. Command 'cat file >/dev/ttyS0' sends the first 4096 bytes
again and again...

DETAILS:

I have generic serial port on i586 machine (PC). I created loopback cable
(TX-RX and RTS-CTS pins connected) and conected the cable to serial port
ttyS0. Simple serial port loopback.

Configuration:
#stty 38400 raw clocal crtscts </dev/ttyS0

Command in console1 (capture ttyS0 to file):
#cat /dev/ttyS0 > fileI.bin

Command in console2 (send a longer file to ttyS0):
#cat fileO.bin >/dev/ttyS0

The file fileO.bin have to be at least 4096 bytes long.

I guess you know what is expected result but I bet you don't know real
result under Linux. I will tell you. Only first 4096 bytes are sent to
/dev/ttyS0. After that this sequence is read from /dev/ttyS0 again and
again..., even when no data are send to /dev/ttyS0 anymore. I tested this
sequence on FreeBSD 4.9 too and I had no problem with loopback like
this there. Something is seriosly wrong in kernel 2.4.x What about 2.6.x??

With regards,
Petr


---------------------------------
Petr Slansky, slansky@usa.net
---------------------------------


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

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