Re: [cdc_acm] The received data seems to be buffered

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

 



Hi, thanks for the reply

Using usbmon I can see that the data is arriving correctly on my host (not buffered). I can see something strange in the way that the data is arriving byte per byte like this :

cfe76cc0 1231821044 S Bo:1:003:1 -115 1 = 5e
cfe76c40 1231821044 S Bo:1:003:1 -115 1 = 40
cfe76bc0 1231821075 S Bo:1:003:1 -115 1 = 5e
cfe76b40 1231821075 S Bo:1:003:1 -115 1 = 40
cfe76ac0 1231821105 S Bo:1:003:1 -115 1 = e6
cfe76a40 1231821136 C Bo:1:003:1 0 1 >
cfe769c0 1231821136 C Bo:1:003:1 0 1 >
cfe76940 1231821136 C Bo:1:003:1 0 1 >
cfe76a40 1231821166 S Bo:1:003:1 -115 1 = 6c

If I check the same in a working system (ubuntu with kernel 2.6.38), the packets arrive in one line :

.... 16 = b5620210 0800c8fc 08000 ....

Now if I use picocom, I can see some data arriving every second (but I've no way to know if the data is correct).

In my application, I'm opening the device like that :

open("/dev/ttyACM0", O_RDWR);

But I also have the "buffering" problem. Adding to this the fact that the packets seem to be incomplete...

Thanks
Jérôme



Le 12. 12. 11 19:39, Greg KH a écrit :
On Mon, Dec 12, 2011 at 11:51:02AM +0100, Jérôme Stadelmann wrote:
Hello everybody,

I've actually some problem when trying to read data from a u-blox
LEA-6T USB module. My kernel is the 2.6.34 and I'm using the cdc_acm
driver to read data from the GPS.

The GPS is sending a packet every second, but when I try a "hexdump
/dev/ttyACM0",<file:///dev/ttyACM0%22%2C>  I do only receive some
data every 5, 10 or even 20 seconds instead of every second as if it
has been buffering the data. But I am receiving the correct number
of packets (for example 10 every 10 seconds, 5 every 5, etc.). I'm
also losing some data (a few bytes) when I receive the data.

I've checked with a few kernels and linux distros, and I haven't
been able to find some coherency.
If you look at the "raw" USB data, using usbmon, do you also see the
buffering happening on the wire?  Or is the kernel doing it?  I'd bet
that the device is doing this, as the kernel really only passes along
the data as it receives it.

You should also use a "real" serial program, like minicom, to watch the
data, not hexdump, that might help here.

thanks,

greg k-h

--
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