[Nut-upsdev] RE: newhidups and APC Back-UPS CS 350 ( Thomas Jarosch )

Thomas Jarosch thomas.jarosch at intra2net.com
Thu Aug 25 14:56:03 UTC 2005


Hello Arnaud & Alfred,

On Thursday 18 August 2005 16:35, arnaud.quette at mgeups.com wrote:
> > > In HIDGetEvents() there is a comment with that call:
> > >         /* needs libusb-0.1.8 to work => use ifdef and autoconf */
> > > You may want to make sure your libusb is up-to-date.
> >
> > I think the "needs libusb-0.1.8" comment refers to the call to detach
> > the kernel HID driver, which was first available in libusb 0.1.8. The
> > EINVAL error is probably not related to the version.
>
> exact. if you get EINVAL (-22), this means that there is a problem
> with interrupt handling. Otherwise, you should either get notifications
> or ETIMEOUT.
>
> Try to generate events when the driver is waiting for notification
> (ie you got 5 sec to unplug the UPS power cord).
>
> Alfred might have some more info about apc interrupt support.

Ok, I traced the code path from libhid over libusb to the kernel (2.4.31).
I added a lot of debug code to the USB procfs interface to see where it fails.
Unfortunately EINVAL is returned by usb_submit_urb() in the kernel's devio.c,
at the end of the proc_submiturb() function. Looks like I have to ask on the 
linux-usb mailinglist for further help. 

Strange though the old hidups driver works atleast somehow.

Cheers,
Thomas



More information about the Nut-upsdev mailing list