Stan Gammons
2014-Sep-12 01:48 UTC
[Nut-upsuser] Nut 2.7.2 on OpenBSD 5.6 with APC USB UPS
I have an APC USB UPS that was working on OpenBSD 5.5 with NUT 2.7.1
When I installed the latest 5.6 snapshot with NUT 2.7.2 the UPS no
longer sends status messages when it loses line power. I asked over on
the OpenBSD ports list and so far haven't had any luck getting this to
work again. I disabled upd at boot as was suggested and that didn't
change anything except stopping the random upd detached messages.
# usbdevs -vd
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
ATI(0x1002), rev 1.00
uhub0
port 1 powered
port 2 powered
port 3 powered
port 4 powered
port 5 powered
port 6 powered
Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
ATI(0x1002), rev 1.00
uhub1
port 1 powered
port 2 powered
port 3 powered
port 4 powered
port 5 powered
port 6 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000),
ATI(0x1002), rev 1.00
uhub2
port 1 powered
port 2 powered
port 3 addr 2: full speed, power 100 mA, config 1, Dell USB Keyboard
Hub(0x1004), Dell(0x413c), rev 48.01
uhub7
port 1 addr 3: low speed, power 90 mA, config 1, Dell USB Keyboard
Hub(0x2006), Dell(0x413c), rev 48.00
uhidev0
uhidev1
port 2 powered
port 3 powered
Controller /dev/usb3:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000),
ATI(0x1002), rev 1.00
uhub3
port 1 addr 2: low speed, self powered, config 1, Smart-UPS 1500
FW:601.3.D USB FW:1.5(0x0002), American Power Conversion(0x051d), rev
0.06, iSerialNumber AS0614322014
uhidev2
port 2 powered
port 3 powered
Controller /dev/usb4:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000),
ATI(0x1002), rev 1.00
uhub4
port 1 powered
port 2 powered
port 3 powered
Controller /dev/usb5:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000),
ATI(0x1002), rev 1.00
uhub5
port 1 powered
port 2 powered
port 3 powered
Controller /dev/usb6:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000),
ATI(0x1002), rev 1.00
uhub6
port 1 powered
port 2 powered
Here's the output of upsc with the UPS plugged in
# upsc apcusb at localhost
battery.charge: 93
battery.charge.low: 10
battery.charge.warning: 50
battery.mfr.date: 2006/04/01
battery.runtime: 2220
battery.runtime.low: 120
battery.temperature: 30.6
battery.type: PbAc
battery.voltage: 27.4
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Smart-UPS 1500
device.serial: AS0614322014
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.7.2
driver.version.data: APC HID 0.95
driver.version.internal: 0.38
input.sensitivity: high
input.transfer.high: 127
input.transfer.low: 106
input.transfer.reason: input voltage out of range
input.voltage: 121.6
output.frequency: 60.0
output.voltage: 121.6
output.voltage.nominal: 120.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 601.3.D
ups.firmware.aux: 1.5
ups.load: 32.5
ups.mfr: American Power Conversion
ups.mfr.date: 2006/04/01
ups.model: Smart-UPS 1500
ups.productid: 0002
ups.serial: AS0614322014
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.timer.start: -1
ups.vendorid: 051d
#
Here's the output of upsc with the AC unplugged for 10 seconds. As you
can see the input voltage dropped to 0, but ups.status remains online.
# upsc apcusb at localhost
battery.charge: 95
battery.charge.low: 10
battery.charge.warning: 50
battery.mfr.date: 2006/04/01
battery.runtime: 2280
battery.runtime.low: 120
battery.temperature: 30.1
battery.type: PbAc
battery.voltage: 24.3
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Smart-UPS 1500
device.serial: AS0614322014
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.7.2
driver.version.data: APC HID 0.95
driver.version.internal: 0.38
input.sensitivity: high
input.transfer.high: 127
input.transfer.low: 106
input.transfer.reason: input voltage out of range
input.voltage: 0.0
output.frequency: 60.0
output.voltage: 119.6
output.voltage.nominal: 120.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 601.3.D
ups.firmware.aux: 1.5
ups.load: 32.5
ups.mfr: American Power Conversion
ups.mfr.date: 2006/04/01
ups.model: Smart-UPS 1500
ups.productid: 0002
ups.serial: AS0614322014
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.timer.start: -1
ups.vendorid: 051d
Any ideas why this stopped working or what else I can try to get this to
work again? Go back to OpenBSD 5.5 is the option I'm looking at at this
point.
Stan
Charles Lepple
2014-Sep-12 02:43 UTC
[Nut-upsuser] Nut 2.7.2 on OpenBSD 5.6 with APC USB UPS
On Sep 11, 2014, at 9:48 PM, Stan Gammons <sg063015 at gmail.com> wrote:> I have an APC USB UPS that was working on OpenBSD 5.5 with NUT 2.7.1 When I installed the latest 5.6 snapshot with NUT 2.7.2 the UPS no longer sends status messages when it loses line power. I asked over on the OpenBSD ports list and so far haven't had any luck getting this to work again. I disabled upd at boot as was suggested and that didn't change anything except stopping the random upd detached messages.Looking at the diffs between NUT 2.7.1 and 2.7.2 (including the OpenBSD patches), I don't see any changes in NUT that might cause this. Your ProductID of 0002 is old enough not to have the broken interrupt pipe firmware, but that expects the OS to handle USB Interrupt In transfers properly. Otherwise, it will take up to 30 seconds (pollfreq) to re-fetch all of the variables that the UPS should provide through the Interrupt In pipe. I would try starting the driver with "-DDD", and capture that to a log: /usr/local/bin/usbhid-ups -DDD -a apcusb 2>&1 | tee /tmp/apcusb.log Let it run for about two minutes, then ^C, compress the log and mail it back to the list. You can also try reducing "pollfreq", although the reason for this was to prevent the UPS from tripping over itself by sending too much data. The "ups.status" bits should be polled in the fast polling cycle (2 seconds versus 30). Hopefully the log will have some error messages to explain why that is apparently not happening. -- Charles Lepple clepple at gmail
Stan Gammons
2014-Sep-12 03:04 UTC
[Nut-upsuser] Nut 2.7.2 on OpenBSD 5.6 with APC USB UPS
On 09/11/14 21:43, Charles Lepple wrote:> On Sep 11, 2014, at 9:48 PM, Stan Gammons <sg063015 at gmail.com> wrote: > >> I have an APC USB UPS that was working on OpenBSD 5.5 with NUT 2.7.1 When I installed the latest 5.6 snapshot with NUT 2.7.2 the UPS no longer sends status messages when it loses line power. I asked over on the OpenBSD ports list and so far haven't had any luck getting this to work again. I disabled upd at boot as was suggested and that didn't change anything except stopping the random upd detached messages. > Looking at the diffs between NUT 2.7.1 and 2.7.2 (including the OpenBSD patches), I don't see any changes in NUT that might cause this. > > Your ProductID of 0002 is old enough not to have the broken interrupt pipe firmware, but that expects the OS to handle USB Interrupt In transfers properly. Otherwise, it will take up to 30 seconds (pollfreq) to re-fetch all of the variables that the UPS should provide through the Interrupt In pipe.I see a libusb_get_interrupt message in the log. Could that be the problem?> > I would try starting the driver with "-DDD", and capture that to a log: > > /usr/local/bin/usbhid-ups -DDD -a apcusb 2>&1 | tee /tmp/apcusb.log > > Let it run for about two minutes, then ^C, compress the log and mail it back to the list. > > You can also try reducing "pollfreq", although the reason for this was to prevent the UPS from tripping over itself by sending too much data. The "ups.status" bits should be polled in the fast polling cycle (2 seconds versus 30). Hopefully the log will have some error messages to explain why that is apparently not happening. >Here's the log file. Hopefully it will attach Ok. Stan -------------- next part -------------- A non-text attachment was scrubbed... Name: apcusb.tar.gz Type: application/gzip Size: 16641 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140911/1a100adc/attachment-0001.bin>