On Tue, June 7, 2016 13:56, Johan Huldtgren wrote:
> On 6/7/16 03:21, Martin Pieuchot wrote:
>> On 06/06/16(Mon) 19:01, Johan Huldtgren wrote:
>>> hello,
>>>
>>> I have an APC Smart-UPS-2200 which is connected via USB, as long as
>>> I've followed the instructions in pkg-readme about disabling uhidev
>>> and upd it's always worked fine. When I updated to the latest snap
>>> (June 4th) however I am now always seeing "COMMLOST" in the output of
>>> 'apcaccess status' I tried booting the previous kernel (May 19th,
>>> #1709), but that did not resolve it, it seems the breakage occurred
>>> when apcupsd went from 3.14.13p1 to 3.14.13p2 which seems to have been
>>> because the removal of USB_GET_STRING_DESC. I did try the newly
>>> committed (but as yet unpackaged) 3.14.14 but no more luck there.
>>>
>>> I tried to build 3.14.13p1 to see if I can confirm what broke it, but
>>> I've been unable to succeed. I backed out the USB_GET_STRING_DESC
>>> changes and built a new kernel based on sources from around
>>> 2016-05-20, I tried to do the same thing with the ports tree but
>>> clearly I've missed something, because I never make it further than:
>>>
>>> make[5]: Entering directory
>>> '/usr/ports/pobj/apcupsd-3.14.13/apcupsd-3.14.13/src/drivers/usb/bsd'
>>>   CXX   src/drivers/usb/bsd/hidutils.c
>>> if test ! -d .obj; then mkdir -p .obj; fi
>>> c++ -x c++ -I/usr/local/include
>>> -I/usr/ports/pobj/apcupsd-3.14.13/apcupsd-3.14.13/src/libusbhid
>>> -I/usr/ports/pobj/apcupsd-3.14.13/apcupsd-3.14.13/include  -O2 -pipe
>>> -fno-exceptions -fno-rtti -Wall -pthread -c -o .obj/hidutils.o hidutils.c
>>> hidutils.c: In function 'const char* hidu_get_string(int, int)':
>>> hidutils.c:354: error: 'USB_GET_STRING_DESC' was not declared in this scope
>>> ../../../../autoconf/targets.mak:141: recipe for target '.obj/hidutils.o'
>>> failed
>>> gmake[5]: *** [.obj/hidutils.o] Error 1
>>> gmake[5]: Leaving directory
>>> '/usr/ports/pobj/apcupsd-3.14.13/apcupsd-3.14.13/src/drivers/usb/bsd'
>>> ../../../../autoconf/targets.mak:55: recipe for target 'all' failed
>>> gmake[4]: *** [all] Error 2
>>> gmake[4]: Leaving directory
>>> '/usr/ports/pobj/apcupsd-3.14.13/apcupsd-3.14.13/src/drivers/usb/bsd'
>>> ../../../autoconf/targets.mak:105: recipe for target 'bsd_DIR' failed
>>> gmake[3]: *** [bsd_DIR] Error 2
>>> gmake[3]: Leaving directory
>>> '/usr/ports/pobj/apcupsd-3.14.13/apcupsd-3.14.13/src/drivers/usb'
>>> ../../autoconf/targets.mak:105: recipe for target 'usb_DIR' failed
>>> gmake[2]: *** [usb_DIR] Error 2
>>> gmake[2]: Leaving directory
>>> '/usr/ports/pobj/apcupsd-3.14.13/apcupsd-3.14.13/src/drivers'
>>> ../autoconf/targets.mak:105: recipe for target 'drivers_DIR' failed
>>> gmake[1]: *** [drivers_DIR] Error 2
>>> gmake[1]: Leaving directory
>>> '/usr/ports/pobj/apcupsd-3.14.13/apcupsd-3.14.13/src'
>>> autoconf/targets.mak:105: recipe for target 'src_DIR' failed
>>> gmake: *** [src_DIR] Error 2
>>> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2675
>>> '/usr/ports/pobj/apcupsd-3.14.13/.build_done')
>>> *** Error 1 in /usr/ports/sysutils/apcupsd
>>> (/usr/ports/infrastructure/mk/bsd.port.mk:2397 'all')
>>>
>>> any clues?
>>
>> Does it work if you use the system libusbhid instead of the bundled one?
>
> I'm not exactly sure how to do this, but I'll take a look at it this
> evening when I'm back from work.
>
> .jh
>

apcupsd was switched from "bsd" driver to "generic-usb" driver after
USB_GET_STRING_DESC removal. In 3.14.14 "generic-usb" is on by default. It
works through libusb from ports.

I've updated my machine to recent amd64 snapshot and updated apcupsd from
packages. Everything works fine.
I've rebuild apcupsd from ports and reinstalled it and it's still works fine:

kirby@humppalaki:ttyp0<apcupsd> %  apcaccess
APC      : 001,045,1057
DATE     : 2016-06-07 14:24:02 +0300
HOSTNAME : humppalaki
VERSION  : 3.14.14 (31 May 2016) openbsd
UPSNAME  : rs500
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2016-06-07 14:23:59 +0300
MODEL    : Back-UPS CS 500
STATUS   : ONLINE
LINEV    : 228.0 Volts
LOADPCT  : 18.0 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 28.4 Minutes
MBATTCHG : 10 Percent
MINTIMEL : 5 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 230.0 Volts
SENSE    : Medium
DWAKE    : 0 Seconds
DSHUTD   : 180 Seconds
LOTRANS  : 180.0 Volts
HITRANS  : 266.0 Volts
RETPCT   : 0.0 Percent
ITEMP    : 29.2 C
ALARMDEL : 30 Seconds
BATTV    : 13.5 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : None
STATFLAG : 0x05000008
MANDATE  : 2011-11-19
SERIALNO : 4B1147P44167
BATTDATE : 2011-11-19
NOMOUTV  : 230 Volts
NOMINV   : 0 Volts
NOMBATTV : 12.0 Volts
NOMPOWER : 300 Watts
FIRMWARE : 808.q10 .I USB FW:q
END APC  : 2016-06-07 14:24:03 +0300

ugen0 at uhub5 port 1 "American Power Conversion Back-UPS CS 500 FW:808.q10 .I
USB FW:q10" rev 1.10/0.06 addr 2


Reply via email to