|
From: David L. <dav...@le...> - 2019-07-25 17:25:35
|
Thanks for the answer. Two more questions: * I dont have the issue on x86/x64 windows/linux, Is there a difference with the ARM/Raspberry pi ? * A buffer size of 0x3FFF (or anything below 0x4000) works on the rasapberry even if its not a multiple of 512. Does the library only use the highest multiple of 512 ? De : Tim Roberts <ti...@pr...> Envoyé : 25 juillet 2019 00:53 À : lib...@li... Objet : Re: [libusb] Issue with raspberry pi and libusb_bulk_transfer if buffer size is too big On Jul 24, 2019, at 1:28 PM, David Levy <dav...@le...<mailto: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...<mailto:ti...@pr...> Providenza & Boekelheide, Inc. |