Re: USB - Generic Serial device : Unable to read more than 4095 bytes

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

 



On Mon, Aug 03, 2015 at 04:44:07PM +0900, arun k wrote:
> Hi ,
> 
> I have a trouble with using usb serial generic device.
>  I am using USB - Generic Serial driver for communicating with my usb
> device and my embedded device.

Please don't use the "generic" driver, it's slow and not the best to
use.

> My usb device sending data at a rate of 409600 bytes/sec, and in host
> side application I tried to read 16384 bytes in one read. But the read
> size returning is always  4095

The tty layer is limiting you, just keep reading in a loop until you
run out of data, you should not ever expect to read a specific number of
bytes from a tty device at a time, the read call will tell you the
number that was read properly.

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