Is there any USB2.0 data transfer chunk size limit?

With one read() or write() at a time, can we increase the bulk data size over USB interface? For example, I want to transfer chunk of 1024 (1K) bytes data and if the device has limitations of only 64bytes, is there any way I can increase the packet size for read() and write() system call over USB?

Is there any limitation on size of data transfer over USB in a host->device environment?


At the USB bus level packet sizes are restricted by the USB Specifications — restrictions for USB 2.0 are:

  • for bulk transfers — 512 bytes for high-speed endpoints, 8, 16, 32, or 64 bytes for full-speed endpoints (and low-speed bulk endpoints are not allowed at all);
  • for interrupt transfers — up to 1024 bytes for high-speed, up to 64 bytes for full-speed, up to 8 bytes for low-speed;
  • for isochronous transfers — up to 1024 bytes for high-speed, up to 1023 bytes for full-speed (and low-speed is not allowed again).

However, restrictions for read() and write() can be different due to buffering done by kernel drivers; e.g., when using usbfs with current Linux versions, up to 16384 bytes can be transferred with one system call.


I'm not a USB protocol engineer but this document from the Intel EHCI USB Specification seems to suggest that the largest USB packet size that is allowable is 1024 bytes and the largest block of data that can be transferred in one go is 24576 bytes, as on page 35:

Seven page pointers are provided to support the expression of 8 isochronous transfers. The seven pointers allow for 3 (transactions) * 1024 (maximum packet size) * 8 (transaction records) (24576 bytes) to be moved with this data structure