We use a microcontroller as USB UART bridge. It's detected as ttyACM device. For testing it sends every second a string to the host. A "cat /dev/ttyACM4" shows the content at the console. Unfortunately additional zero bytes are "received" . (This doesn't happened at Ubuntu 12.04 and Windows PC's)
The device sends an empty buffer every 100ms if nothing to transmit.
Logging with usbmon(one empty buffer and one buffer with (different!!!) content) :
cat /sys/kernel/debug/usb/usbmon/2u (Sitara)
cc372ec0 1504524769 S Bi:2:003:9 -115 128 <
cc372e40 1504624708 C Bi:2:003:9 0 1 = 00
cc372e40 1504624759 S Bi:2:003:9 -115 128 <
cc3610c0 1504625721 C Bi:2:003:9 0 21 = 5469636b 73203234 33382050 6f727473 2031300d 0a
cat /sys/kernel/debug/usb/usbmon/2u (Ubuntu 12.04)
eceeaa80 1513359710 S Bi:2:004:9 -115 128 <
ecfb8000 1513459733 C Bi:2:004:9 0 0
ecfb8000 1513459745 S Bi:2:004:9 -115 128 <
ecfb80c0 1513460682 C Bi:2:004:9 0 20 = 5469636b 73203530 3020506f 72747320 31300d0a
At the Ubuntu PC the empty buffer is received with a length of 0 byte while the Sitara received it with a length of one byte (Which caused the zero bytes in data output)
Is this a bug in the USB driver ?
Any help appreciate.
Thanks
Rainer