circle icon indicating copy to clipboard operation
circle copied to clipboard

USB bulk transfer timeout

Open giulioz opened this issue 5 months ago • 8 comments

I'm trying to implement support for the Komplete Kontrol A-series of USB keyboards. It exposes different USB interfaces, among those a MIDI standard interface (which works already) and a HID standard interface for controlling the additional buttons and LCD screen. I'm trying to add support for the latter (which I know already works fine on my laptop).

Working example with hidapi here: https://gist.github.com/giulioz/7c0d43d97477194a3e18bed37e4e992f

I'm experiencing some weird behavior when porting the code to Circle:

  • I've initially implemented support by inheriting the CUSBHIDDevice class, which didn't work: after sending the initial async USB request, the completion function never gets called (no response?)
  • I've then changed to using blocking USB transfers with a short timeout in a loop, which worked properly
  • If I combine the blocking USB transfers with the CUSBMIDIHostDevice driver, the former stops working

Is it possible that Circle only supports one pending USB async transfer at a time, even on different endpoints/interfaces?

Thanks for the help and for this very nice project!

giulioz avatar Sep 06 '24 14:09 giulioz