[libhid-discuss] libhid problems with interrupt_read/write

Charles Lepple clepple at ghz.cc
Thu Apr 5 19:53:45 UTC 2007


Thomas Maclean wrote:
>
> Great!
>
> My kernel is  2.6.9-42.0.3.EL.
>
> As you concluded Ion is not big...  Do you know if libhid or libusb have
> an byte alignment requirements?  I found it quite weird that adding small
> amounts of unrelated code could cause a segfault.

They shouldn't. The kernel should take care of moving things into a
properly aligned buffer.

> What I see in the stripped version is that after a hid_interrupt_read
> times out, the following write fails, the one after that works, and all
> subsequent reads fail.  Is there something I am supposed to do after a
> interrupt_read timeout to clear the timeout condition?

Shouldn't be necessary.

Out of curiosity, what does 'cat /proc/bus/usb/devices' return for the
device in question? (Your version of libusb is sort of old, and I want to
make sure that there isn't a kernel driver in the way.)

-- 
Charles Lepple
clepple at ghz.cc




More information about the libhid-discuss mailing list