I am writing code for a very specific scientific device (a spectrometer) for Windows. This device registers itself as an HID device. A library and source code of the library for the device has been provided.
Going by the source code, the device gets a request from the host and responds with data using the INTERRUPT IN endpoint. The hidapi library is used for HID data transfer. I noticed that using the hidapi's hid_read_timeout function, my computer's input devices as well as audio (connected by USB) freeze for short timeperiod (maybe 200 ms) everytime the request for data is sent and read (every time hid_read_timeout is called). I'm currently trying to understand the USB HID specifications, but my question is why this happens. Does the interrupt interrupt everything on all USB ports? If so, is there a way to prevent it? What would occur if I had multiple devices and would call hid_read_timeout multiple times sequentially? Would these calls block each other?
Do HID interrupts interrupt all devices?
77 Views Asked by Iridium At
1
In the context of a USB endpoints, "interrupt" just means that you get a guarantee about how often you can send data with that interrupt. There's no reason for your use of interrupt endpoint on one device to disrupt the use of other devices. It sounds like you might have found a serious bug in Windows, if that's really happening to you.