soldernerd / HID_Utility

This open source (GNU GPLv3) project is aimed at simplifying the development of C# applications that communicate with USB HID (Human Interface Device) devices.
https://soldernerd.com/2017/02/14/c-usb-hid-utility/
40 stars 10 forks source link

Can the out buffer be greater than 64 bytes? #5

Closed PhillyNJ closed 3 years ago

PhillyNJ commented 3 years ago

First, thanks for a really easy to use HID API. I am working on a project where I need to transfer more than 64 bytes. Can the out buffer be greater than 64 bytes?

soldernerd commented 3 years ago

Unfortunately it can't. This is not a limitation of the API but of the USB specifications. A HID device can only transmit or receive 64 bytes at a time. But: you can do so every millisecond so maximum throughput is a respectable 64kB per second. So think about splitting your data into smaller chunks and transmitting them one by one.

PhillyNJ commented 3 years ago

Thanks for getting back to me so soon. I figured the cap was 64bytes, so plan B is to make several calls.