Re: LibusbK Read Pipe timeout but all the

Xiaofan Chen <[email protected]> Fri, 25 Nov 2016 21:15:28 +0800
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <CAGjSPUDF_5XB3hpBrJ0x65D98JxOFf1qTsGuLE4VT-uc42W50Q@mail.gmail.com>
On Fri, Nov 25, 2016 at 9:11 PM, Xiaofan Chen <[email protected]> wrote:
> On Fri, Nov 25, 2016 at 3:53 PM, diabolo <[email protected]> wrote:
>> I use stm32 with libusbk back-end and I nevr seen this:
>> But device f/w never send a multiple of 64 byte  youc an do it by sending a
>> zlp after data on te stm32 side
>> but that's not convenient
>> I always managed to send short packet and prefer to send one extra byte if
>> payload is  nx64 but if it the max size I ever send (ie 1024 in most of my
>> app)
>>
>
> Not so sure if setting the pipe policy will help.
>
> https://msdn.microsoft.com/en-us/library/windows/hardware/ff728833(v=vs.85).aspx
>
> http://libusbk.sourceforge.net/UsbK3/group__usbk.html#ga10f9e367e4241c431edc2cecd1bb827e
>   UsbK_SetPipePolicy
>
> SHORT_PACKET_TERMINATE (0x01)
> PIPE_TRANSFER_TIMEOUT (0x03)
>
Also ALLOW_PARTIAL_READS (0x05).

Ref: http://permalink.gmane.org/gmane.comp.lib.libusbx.devel/1245

-- 
Xiaofan

------------------------------------------------------------------------------