Alfred Ganz
2005-Aug-18 13:41 UTC
[Nut-upsdev] RE: newhidups and APC Back-UPS CS 350 (Thomas Jarosch)
Thomas, The none (-22) message in your log is an errno from the libusb_get_interrupt() call in HIDGetEvents() in libhid.c. It indicates an invalid ioctl type. 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. Hope this helps, AG -- ---------------------------------------------------------------------- Alfred Ganz alfred-ganz@agci.com AG Consulting, Inc. (203) 624-9667 440 Prospect Street # 11 New Haven, CT 06511 ----------------------------------------------------------------------
Thomas Jarosch
2005-Aug-18 13:44 UTC
[Nut-upsdev] Re: newhidups and APC Back-UPS CS 350 (Thomas Jarosch)
Alfred, On Thursday 18 August 2005 15:40, you wrote:> The none (-22) message in your log is an errno from the > libusb_get_interrupt() call in HIDGetEvents() in libhid.c. > It indicates an invalid ioctl type. > > 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.Strange, I'm using libusb-0.1.10a. Though it could be a kernel header mismatch, I'll investigate this one further. Thanks. Thomas
Charles Lepple
2005-Aug-18 14:09 UTC
[Nut-upsdev] RE: newhidups and APC Back-UPS CS 350 (Thomas Jarosch)
On 8/18/05, Alfred Ganz <alfred-ganz+nut@agci.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. -- - Charles Lepple
arnaud.quette@mgeups.com
2005-Aug-18 14:35 UTC
[Nut-upsdev] RE: newhidups and APC Back-UPS CS 350 (Thomas Jarosch)
> > 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. Arnaud