Re: Issue with CDC driver when receiving the data character 0x1A

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/27/2011 2:34 PM, Toan Pham wrote:
I had this same problem 2 years ago when i was using the ACM_CDC
driver to interface with a uC using LUFA usb library.  As far as i can
remember,  I sniffed the data using usb_mon and saw that the data came
through; but somehow the character (13 ordinal) got filtered out
through usb serial, cdc or tty layer.  I wasn't sure the real cause,
and so I programmed the uC to add 48 to all transfer byte, and
subtract 48 on the host application.

It would be nice to know the root cause.


thank you,

-toan
This specific character is the End Of File (EOF ) character, and usually it is interpreted depending on how a file is open, in "text mode" or in "binary mode", if your file is open in text mode and have binary stuff in it like EOF than you're doomed, this is ground for VERY interesting and hard to kill bugs. I don't know how is the Linux default behavior of "w" fopen() parameter because I open them explicitly with "wb" or "wt" since 15yrs when I had this problem as well.

 Cheers,
 Mircea

--

--------------------------------------
CMOS Vision GmbH
Mircea Ciocan
Grubenstrasse 108
CH-8200 Schaffhausen
SWITZERLAND
Tel: +41 52 620 10 30
Fax: +41 52 620 10 31
e-mail:<mircea.ciocan@xxxxxxxxxxxxxx>
--------------------------------------

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux