Hello,

I'm using usbserial module to talk to a device supporting 2 bulk
endpoints (high speed USB 1.1). The input from the device to the host is
OK. However, when I write a sequence containing CR and/or LF to the
device, the device sees fake 0x80 just before CR and/or LF, and I see
this fake 0x80 in the debug output of usbserial/generic modules as
well. It looks really weird, e.g.:

Write:     Actual Output:

a<CR><LF>  a\0x80<CR><LF>
<CR><LF>   <CR><LF>             ! no 0x80 here !
a<CR>      a\0x80<CR>
a<LF>      a\0x80<LF>

For, say "a<CR><LF>" sequence, the usbserial/generic module actually
sees two writes, write("a", 1), and write("\0x80\r\n", 3). The number of
bytes before <CR>/<LF> doesn't really matter unless it is 0, in which
case fake 0x80 disappears.

The tty settings are:

osv:~# stty -F /dev/ttyUSB0 -a

speed 9600 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\;
erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 0; time = 0; -parenb -parodd cs8 -hupcl -cstopb cread clocal
-crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
-icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -olcuc -ocrnl onlcr
-onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon
-iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke

The same host application that is sending the data works fine with real
serial tty ports (and I've tried using raw 'cat' to send data as well
with the same strange result anyway).

Kernel versions that I've tried are 2.6.14 and 2.6.16.

Any idea what's going on here and how to fix it?

-- 
Sergei.



_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to