[libhid-discuss] libhid problems with interrupt_read/write

Thomas Maclean tmaclean at sandbox.ca
Thu Apr 5 20:07:49 UTC 2007


I'm also getting writes that return with value 23!  My count of the enum
for the hid_return values doesn't go that high!

'cat /proc/bus/usb/devices' returns

T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=10bf ProdID=0004 Rev= 4.00
S:  Manufacturer=SmartHome
S:  Product=SmartHome PowerLinc USB E
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
E:  Ad=01(O) Atr=03(Int.) MxPS=   8 Ivl=10ms

-tom


On Thu, 5 Apr 2007, Charles Lepple wrote:

> 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