On 2014/09/19 14:26, Stuart Henderson wrote:
> On 2014/09/19 08:21, Stan Gammons wrote:
> > On Sep 19, 2014 8:06 AM, "Stuart Henderson" <[email protected]> wrote:
> > >
> > > On 2014/09/19 07:37, Stan Gammons wrote:
> > > > I have an apc usb ups that was working with OpenBSD 5.5 stable, but
> > when I
> > > > installed 5.6 current nut no longer recognizes the status change when
> > the
> > > > UPS goes on battery. When you do upsc apcusb@localhost with AC power
> > > > removed from the unit, it indicates the UPS is still online rather than
> > > > being on battery. After some debugging help from the folks on the nut
> > > > list, the only thing I see is a libusb error that says
> > > > "libusb_get_interrupt: Function not implemented" Any ideas what might
> > have
> > > > changed in libusb1 to cause this to no longer work?
> > >
> > > There have been no code changes to the libusb1 port since OpenBSD 5.4.
> > >
> > > Also no changes to libusb-compat since 5.5.
> > >
> >
> > Ok. I guess going back to 5.5 is about the only solution. Or try upd and
> > sensord to see if that might work. Not sure that will work though.
>
> How does your dmesg look with upd disabled?
>
Ah - you already sent the dmesg for that.. To get NUT to work properly
I think you will need to add this and build a new kernel. This knocks it
out from attaching as a HID device (as needed for upd) - attaching as a
HID device means that libusb has less control over it.
A better solution would be to allow the device to attach to upd, and write a
NUT driver that queries the hw.sensors sysctls rather than having NUT talk
USB to the device.
Index: usb_quirks.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v
retrieving revision 1.73
diff -u -p -r1.73 usb_quirks.c
--- usb_quirks.c 20 Mar 2014 15:07:11 -0000 1.73
+++ usb_quirks.c 19 Sep 2014 13:29:43 -0000
@@ -109,6 +109,8 @@ const struct usbd_quirk_entry {
{ USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY920, ANY, { UQ_BROKEN_BIDIR }},
{ USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY800, ANY, { UQ_BROKEN_BIDIR }},
+ { USB_VENDOR_APC, USB_PRODUCT_APC_UPS, ANY, {
UQ_BAD_HID }},
+ { USB_VENDOR_APC, USB_PRODUCT_APC_UPS5G, ANY, { UQ_BAD_HID }},
{ USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE, ANY, { UQ_BAD_HID }},
{ USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3G, ANY, { UQ_BAD_HID }},
{ USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3GS, ANY, { UQ_BAD_HID }},