Stan Gammons
2014-Sep-12 21:15 UTC
[Nut-upsuser] Nut 2.7.2 on OpenBSD 5.6 with APC USB UPS
On 09/11/14 22:34, Charles Lepple wrote:> On Sep 11, 2014, at 11:04 PM, Stan Gammons <sg063015 at gmail.com> wrote: > >> I see a libusb_get_interrupt message in the log. Could that be the problem? > Yes, it seems related. > > 1.126896 upsdrv_initinfo... > 1.126906 upsdrv_updateinfo... > 1.127023 libusb_get_interrupt: Function not implemented > 1.127030 Got 0 HID objects... > 1.127036 Quick update... > > Come to think of it, this might also depend on how OpenBSD provides libusb-0.1. What version of libusb-compat do you have?# pkg_info libltdl-2.4.2p0 GNU libtool system independent dlopen wrapper libusb-compat-0.1.5 libusb-0.1 compatibility layer for libusb1 libusb1-1.0.9p8 library for USB device access from userspace nut-2.7.2p2 UPS monitoring program supporting many brands quirks-2.11 exceptions to pkg_add rules radeondrm-firmware-20131002p0 firmware binary images for radeondrm(4) driver> > However, checking the rest of the log, it seems like there are no errors during the "Quick update" portion, which should provide AC status updates (among others) every two seconds. > > Can you can do a test where you power off the AC to the UPS? (I'd advise using a power strip, PDU, or circuit breaker to keep the ground connected, rather than pulling the plug completely.) > > If so, same test, but "-DD" should suffice, and record the time (first column of the log is seconds since the start) when you toggle the power. Let it go for at least 30 seconds, so it will eventually show up in the "Full update". > > The OB/OL status is controlled by this line: > > [time] Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x07, Offset: 2, Size: 1, ValueUPS.PowerSummary.PresentStatus.ACPresent remains at 1 when I turn the power off on the power strip the UPS is plugged into. Here's a 73 seconds long log with the power turned off. Stan -------------- next part -------------- A non-text attachment was scrubbed... Name: apcusb2.tar.gz Type: application/gzip Size: 6872 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140912/41726348/attachment.bin>
Charles Lepple
2014-Sep-18 03:31 UTC
[Nut-upsuser] Nut 2.7.2 on OpenBSD 5.6 with APC USB UPS
On Sep 12, 2014, at 5:15 PM, Stan Gammons <sg063015 at gmail.com> wrote:> On 09/11/14 22:34, Charles Lepple wrote: >> On Sep 11, 2014, at 11:04 PM, Stan Gammons <sg063015 at gmail.com> wrote: >> >>> I see a libusb_get_interrupt message in the log. Could that be the problem? >> Yes, it seems related. >> >> 1.126896 upsdrv_initinfo... >> 1.126906 upsdrv_updateinfo... >> 1.127023 libusb_get_interrupt: Function not implemented >> 1.127030 Got 0 HID objects... >> 1.127036 Quick update... >> >> Come to think of it, this might also depend on how OpenBSD provides libusb-0.1. What version of libusb-compat do you have? > > # pkg_info > ... > libusb-compat-0.1.5 libusb-0.1 compatibility layer for libusb1 > libusb1-1.0.9p8 library for USB device access from userspace > ...Nothing looks strange in libusb-compat, but there is a possibility that you are getting "Function not implemented" from some strange combinations of flags being passed to libusb1. Can you rebuild the libusb1 pkg as a port, with the DEBUG flag turned on? -- Charles Lepple clepple at gmail
Stan Gammons
2014-Sep-19 02:09 UTC
[Nut-upsuser] Nut 2.7.2 on OpenBSD 5.6 with APC USB UPS
On 09/17/14 22:31, Charles Lepple wrote:> On Sep 12, 2014, at 5:15 PM, Stan Gammons <sg063015 at gmail.com> wrote: > >> On 09/11/14 22:34, Charles Lepple wrote: >>> On Sep 11, 2014, at 11:04 PM, Stan Gammons <sg063015 at gmail.com> wrote: >>> >>>> I see a libusb_get_interrupt message in the log. Could that be the problem? >>> Yes, it seems related. >>> >>> 1.126896 upsdrv_initinfo... >>> 1.126906 upsdrv_updateinfo... >>> 1.127023 libusb_get_interrupt: Function not implemented >>> 1.127030 Got 0 HID objects... >>> 1.127036 Quick update... >>> >>> Come to think of it, this might also depend on how OpenBSD provides libusb-0.1. What version of libusb-compat do you have? >> # pkg_info >> ... >> libusb-compat-0.1.5 libusb-0.1 compatibility layer for libusb1 >> libusb1-1.0.9p8 library for USB device access from userspace >> ... > Nothing looks strange in libusb-compat, but there is a possibility that you are getting "Function not implemented" from some strange combinations of flags being passed to libusb1. > > Can you rebuild the libusb1 pkg as a port, with the DEBUG flag turned on?Is --enable-debug the way one turns it on? I modified the Makefile as shown below, then did a make and make install. # $OpenBSD: Makefile,v 1.22 2013/08/07 15:37:09 naddy Exp $ COMMENT = library for USB device access from userspace VERSION = 1.0.9 DISTNAME = libusb-${VERSION} PKGNAME = libusb1-${VERSION} REVISION = 8 SHARED_LIBS += usb-1.0 1.0 # 1.0 CATEGORIES = devel HOMEPAGE = http://www.libusb.org MAINTAINER = Martin Pieuchot <mpi at openbsd.org> # LGPL 2.1 PERMIT_PACKAGE_CDROM = Yes WANTLIB = pthread MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=libusb/} EXTRACT_SUFX = .tar.bz2 CONFIGURE_STYLE = gnu CONFIGURE_ARGS += ${CONFIGURE_SHARED} .ifdef DEBUG CONFIGURE_ARGS += --enable-debug-log \ --enable-examples-build \ --enable-debug .endif .include <bsd.port.mk>