|
From: Tim R. <ti...@pr...> - 2019-07-25 04:52:58
|
On Jul 24, 2019, at 1:28 PM, David Levy <dav...@le...> wrote: > > We have an application that use libusb to communicate with a sensor. On windows and linux x86/x64 it works fine, however, when using a raspberry pi 3, I have a weird issue. > ... > We can see that we still have the 0x1c8, and I checked that the data inside is correct. But the other paquets (0x10) are incorrect. > > Is there any reason that a size > 0x4000 is problematic? Yes, actually, although it’s not clear how it leads to this problem. A USB device is never told how large the buffer is. It’s just given a “go” signal, and it is entitled to send any amount up to and including the max packet size. Thus, the buffer for a USB transfer must always be an even multiple of the endpoint’s max packet size. For a high speed device, that means a multiple of 512. — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |