Quantcast

LIBUSB_ERROR_OVERFLOW even when transfer buffer size is a multiple of the endpoint's packet size

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LIBUSB_ERROR_OVERFLOW even when transfer buffer size is a multiple of the endpoint's packet size

Ларионов Даниил
Hi all. I don't know in whose area of liability this lies, so I'm writing this to both libusb and libftdi MLs.

Long story short, I'm trying to get a stream of data from an FT2232H and I get a LIBUSB_ERROR_OVERFLOW. (Actually, what I get is an "unknown status 6" string to my stderr, which is defined in ftdi_stream.c:109).
This error is present when using both ftdi_readstream and ftdi_read_data.

The reason why I am writing this letter is that the libusb documentation says this:

>you will never see an overflow if your transfer buffer size is a multiple of the endpoint's packet size

...and this is exactly what libftdi does:

int bufferSize = packetsPerTransfer * ftdi->max_packet_size; (ftdi_stream.c:153)

I checked, and the max_packet_size field is populated correctly (as far as lsusb can tell): the chip declares the endpoint's packet size as 512 bytes, and this is what max_packet_size equals to.

I found a 5 years old report on a similar problem with another FTDI chip:
http://libusb.6.n5.nabble.com/libusb-bulk-transfer-and-overflow-errors-td2802636.html
but it sort of ended on nothing.

I'm using OpenSuSE 13.2 x64 with 3.16.7-7-desktop kernel, libusb 1.0.19-2.1.2 and the latest version of libftdi (f6ac3c2).

Daniil



--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...