I have a situation where I need to send blocks of data (1MB - 50MB) to a USB device and i’m confined to the Control EP. What’s the most efficient way to do this from the host application/driver perspective?
Should I send my driver the full amount as an IOCTL, and then have my driver break the full block into 4k transfers, calling WdfUsbTargetDeviceSendControlTransferSynchronously for each 4k xfer?
xxxxx@gmail.com wrote:
I have a situation where I need to send blocks of data (1MB - 50MB) to a USB device and i’m confined to the Control EP. What’s the most efficient way to do this from the host application/driver perspective?
Change your device to use a bulk pipe. Control pipes have the highest
overhead and lowest bandwidth of all of the pipe types. Even on USB
2.0, a single control pipe transaction is limited to 64 bytes at a
time. You’re going to wait a looong time.
Should I send my driver the full amount as an IOCTL, and then have my driver break the full block into 4k transfers, calling WdfUsbTargetDeviceSendControlTransferSynchronously for each 4k xfer?
You can send larger transfers than that, although not 50MB. A megabyte
at a time should be workable.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.