31 Mar 2011 17:02
Re: Missing reports in hid_interrupt_read()
Jacques Dirac <jacquesdirac <at> gmail.com>
2011-03-31 15:02:53 GMT
2011-03-31 15:02:53 GMT
Hi Charles, Thanks for your reply! > Is it possible that your code is expecting a certain length for the reply, > and you are discarding the packet if the return code from > hid_interrupt_read() is non-zero? Good thinking! I did first, but now I changed the code to check this: hid_interrupt_read() is only returning HID_RET_TIMEOUT and HID_RET_SUCCESS when data is available. Increasing the timeout (from 10 to 1000) in hid_interrupt_read() improves the situation, but I think this is only because the chance a message is missed (not waiting in hid_interrupt_read()) is lowered. > If not, you may have to look deeper in the stack. libusb 0.1 generally > doesn't buffer things, either (although I admit I haven't looked at all the > platform-specific code lately). There are often kernel-level debugging > facilities available I will try to do that. > FreeBSD prior to 8.0 seems to continuously poll interrupt endpoints at the > interval specified in the USB descriptor, and it buffers the results with > marginal success. (I wouldn't recommend developing for the pre-8.0 USB > stack.) Running Linux 2.4.32 with libusb 0.1.12 and libhid 0.2.16.(Continue reading)
RSS Feed