c - WinUSB Bulk IN transfer fails on transfer size greater than maximum packet size -


i using winusb on windows host side communicate winusb usb device. usb device full speed device. able device handle , out , in data transfers.

i facing issue bulk in transfer on fs winusb device. when loop of data pc device , pc, sizes 1 64 working fine. when transfer 65 bytes, first 64 bytes able read in pc. last byte missing.

can facing same kind of issue or can suggest solution?

regards, nisheedh

first should read out maximum_transfer_size. sending, winusb "divides buffer appropriately sized chunks, if necessary" (source).

also check remarks of winusb_readpipe:

if data returned device greater maximum transfer length, winusb divides request smaller requests of maximum transfer length , submits them serially. if transfer length not multiple of endpoint's maximum packet size (retrievable through winusb_pipe_information structure's maximumpacketsize member), winusb increases size of transfer next multiple of maximumpacketsize.

usb packet size not factor transfer read request. if device responds packet large client buffer, behavior of read request corresponds type of policy set on pipe. if policy type pipe allow_partial_reads, winusb adds remaining data beginning of next transfer. if allow_partial_reads not set, read request fails. more information policy types, see winusb functions pipe policy modification.

check settings , whether last byte send second transfer. should test how many bytes have been written / read.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -