[Nut-upsuser] Battery test feature of APC Back-UPS RS series

Jean Delvare khali at linux-fr.org
Sat May 16 14:41:10 UTC 2009


Hi Arnaud,

On Sat, 16 May 2009 13:11:31 +0200, Arnaud Quette wrote:
> no need ATM. just fire the driver using "usbhid-ups -D -a ..." and post back
> the tree dumped.

Here you go:

debug level is '1'
upsdrv_initups...
Using subdriver: APC HID 0.93
Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x02, Offset: 0, Size: 8, Value: 2.000000
Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 3.000000
Path: UPS.PowerSummary.iOEMInformation, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 3.000000
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x05, Offset: 0, Size: 8, Value: 4.000000
Path: UPS.PowerSummary.Rechargeable, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x06, Offset: 8, Size: 8, Value: 2.000000
Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID: 0x0e, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, ReportID: 0x0e, Offset: 8, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x0c, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x0c, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, ReportID: 0x10, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature, ReportID: 0x10, Offset: 8, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, ReportID: 0x0f, Offset: 0, Size: 8, Value: 50.000000
Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 10.000000
Path: UPS.PowerSummary.ManufacturerDate, Type: Feature, ReportID: 0x09, Offset: 0, Size: 16, Value: 14201.000000
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x0d, Offset: 0, Size: 16, Value: 1830.000000
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x0d, Offset: 0, Size: 16, Value: 1830.000000
Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x12, Offset: 0, Size: 16, Value: -1.000000
Path: UPS.PowerSummary.DelayBeforeReboot, Type: Feature, ReportID: 0x13, Offset: 0, Size: 24, Value: 0.000000
Path: UPS.PowerSummary.RemainingTimeLimit, Type: Feature, ReportID: 0x08, Offset: 0, Size: 16, Value: 120.000000
Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 16, Value: 24.000000
Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x0b, Offset: 0, Size: 16, Value: 27.430000
Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x14, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input, ReportID: 0x07, Offset: 0, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x07, Offset: 0, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input, ReportID: 0x07, Offset: 1, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x07, Offset: 1, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input, ReportID: 0x07, Offset: 2, Size: 1, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x07, Offset: 2, Size: 1, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.BatteryPresent, Type: Input, ReportID: 0x07, Offset: 3, Size: 1, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.BatteryPresent, Type: Feature, ReportID: 0x07, Offset: 3, Size: 1, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x07, Offset: 4, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x07, Offset: 4, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ShutdownRequested, Type: Input, ReportID: 0x07, Offset: 5, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ShutdownRequested, Type: Feature, ReportID: 0x07, Offset: 5, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Input, ReportID: 0x07, Offset: 6, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Feature, ReportID: 0x07, Offset: 6, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type: Input, ReportID: 0x07, Offset: 7, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type: Feature, ReportID: 0x07, Offset: 7, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type: Input, ReportID: 0x07, Offset: 8, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type: Feature, ReportID: 0x07, Offset: 8, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Input, ReportID: 0x07, Offset: 9, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Feature, ReportID: 0x07, Offset: 9, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.Overload, Type: Input, ReportID: 0x07, Offset: 10, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.Overload, Type: Feature, ReportID: 0x07, Offset: 10, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.VoltageNotRegulated, Type: Input, ReportID: 0x07, Offset: 11, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.VoltageNotRegulated, Type: Feature, ReportID: 0x07, Offset: 11, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ff860080, Type: Input, ReportID: 0x07, Offset: 12, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ff860080, Type: Feature, ReportID: 0x07, Offset: 12, Size: 1, Value: 0.000000
Path: UPS.Battery.Test, Type: Input, ReportID: 0x16, Offset: 0, Size: 8, Value: 6.000000
Path: UPS.Battery.Test, Type: Feature, ReportID: 0x16, Offset: 0, Size: 8, Value: 6.000000
Path: UPS.Battery.APCBattCapBeforeStartup, Type: Feature, ReportID: 0x17, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.Battery.ff86001a, Type: Feature, ReportID: 0x1b, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.Battery.ff86001b, Type: Feature, ReportID: 0x1c, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.Battery.APCBattReplaceDate, Type: Feature, ReportID: 0x45, Offset: 0, Size: 24, Value: 599297.000000
Path: UPS.Battery.ManufacturerDate, Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 14201.000000
Path: UPS.Battery.RemainingCapacity, Type: Feature, ReportID: 0x18, Offset: 0, Size: 16, Value: 100.000000
Path: UPS.Battery.RemainingTimeLimit, Type: Feature, ReportID: 0x1a, Offset: 0, Size: 16, Value: 120.000000
Path: UPS.Battery.RunTimeToEmpty, Type: Feature, ReportID: 0x19, Offset: 0, Size: 16, Value: 1830.000000
Path: UPS.Battery.Temperature, Type: Feature, ReportID: 0x1e, Offset: 0, Size: 16, Value: 302.300000
Path: UPS.Battery.ConfigVoltage, Type: Feature, ReportID: 0x1f, Offset: 0, Size: 16, Value: 24.000000
Path: UPS.Battery.Voltage, Type: Feature, ReportID: 0x1d, Offset: 0, Size: 16, Value: 27.430000
Path: UPS.Battery.ff860024, Type: Feature, ReportID: 0x47, Offset: 0, Size: 8, Value: 251.000000
Path: UPS.Battery.ff860018, Type: Feature, ReportID: 0x48, Offset: 0, Size: 32, Value: -1592617470.000000
Path: UPS.Input.Voltage, Type: Feature, ReportID: 0x20, Offset: 0, Size: 32, Value: 240.000000
Path: UPS.Input.ConfigVoltage, Type: Feature, ReportID: 0x46, Offset: 0, Size: 8, Value: 230.000000
Path: UPS.Input.ff860052, Type: Feature, ReportID: 0x21, Offset: 0, Size: 8, Value: 8.000000
Path: UPS.Input.ff860061, Type: Feature, ReportID: 0x22, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.Input.ff860024, Type: Feature, ReportID: 0x42, Offset: 0, Size: 8, Value: 119.000000
Path: UPS.Output.PercentLoad, Type: Feature, ReportID: 0x2c, Offset: 0, Size: 16, Value: 36.000000
Path: UPS.Output.ConfigActivePower, Type: Feature, ReportID: 0x52, Offset: 0, Size: 16, Value: 540.000000
Path: UPS.Output.Frequency, Type: Feature, ReportID: 0x2a, Offset: 0, Size: 16, Value: 50.000000
Path: UPS.Output.Voltage, Type: Feature, ReportID: 0x2b, Offset: 0, Size: 16, Value: 230.000000
Path: UPS.Output.ConfigVoltage, Type: Feature, ReportID: 0x2d, Offset: 0, Size: 16, Value: 230.000000
Path: UPS.Output.HighVoltageTransfer, Type: Feature, ReportID: 0x23, Offset: 0, Size: 16, Value: 264.000000
Path: UPS.Output.LowVoltageTransfer, Type: Feature, ReportID: 0x24, Offset: 0, Size: 16, Value: 194.000000
Path: UPS.Output.APCDelayBeforeStartup, Type: Feature, ReportID: 0x25, Offset: 0, Size: 16, Value: 0.000000
Path: UPS.Output.APCShutdownAfterDelay, Type: Feature, ReportID: 0x26, Offset: 0, Size: 16, Value: 0.000000
Path: UPS.Output.DelayBeforeShutdown, Type: Feature, ReportID: 0x27, Offset: 0, Size: 16, Value: -1.000000
Path: UPS.Output.DelayBeforeStartup, Type: Feature, ReportID: 0x28, Offset: 0, Size: 16, Value: 0.000000
Path: UPS.Output.DelayBeforeReboot, Type: Feature, ReportID: 0x29, Offset: 0, Size: 24, Value: 0.000000
Path: UPS.Output.APCDelayBeforeReboot, Type: Feature, ReportID: 0x40, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.Output.APCDelayBeforeShutdown, Type: Feature, ReportID: 0x41, Offset: 0, Size: 16, Value: -1.000000
Path: UPS.iProduct, Type: Feature, ReportID: 0x2e, Offset: 0, Size: 8, Value: 5.000000
Path: UPS.iSerialNumber, Type: Feature, ReportID: 0x2f, Offset: 0, Size: 8, Value: 2.000000
Path: UPS.iManufacturer, Type: Feature, ReportID: 0x30, Offset: 0, Size: 8, Value: 3.000000
Path: UPS.iName, Type: Feature, ReportID: 0x31, Offset: 0, Size: 8, Value: 6.000000
Path: UPS.APC_UPS_FirmwareRevision, Type: Feature, ReportID: 0x34, Offset: 0, Size: 8, Value: 7.000000
Path: UPS.APC_USB_FirmwareRevision, Type: Feature, ReportID: 0x37, Offset: 0, Size: 8, Value: 8.000000
Path: UPS.APCPanelTest, Type: Feature, ReportID: 0x32, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.ManufacturerDate, Type: Feature, ReportID: 0x35, Offset: 0, Size: 16, Value: 14201.000000
Path: UPS.ff860027, Type: Feature, ReportID: 0x3e, Offset: 0, Size: 32, Value: 0.000000
Path: UPS.ff860028, Type: Feature, ReportID: 0x3f, Offset: 0, Size: 32, Value: 0.000000
Path: UPS.AudibleAlarmControl, Type: Feature, ReportID: 0x36, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PresentStatus.Charging, Type: Input, ReportID: 0x33, Offset: 0, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.Charging, Type: Feature, ReportID: 0x33, Offset: 0, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.Discharging, Type: Input, ReportID: 0x33, Offset: 1, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.Discharging, Type: Feature, ReportID: 0x33, Offset: 1, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.ACPresent, Type: Input, ReportID: 0x33, Offset: 2, Size: 1, Value: 1.000000
Path: UPS.PresentStatus.ACPresent, Type: Feature, ReportID: 0x33, Offset: 2, Size: 1, Value: 1.000000
Path: UPS.PresentStatus.BatteryPresent, Type: Input, ReportID: 0x33, Offset: 3, Size: 1, Value: 1.000000
Path: UPS.PresentStatus.BatteryPresent, Type: Feature, ReportID: 0x33, Offset: 3, Size: 1, Value: 1.000000
Path: UPS.PresentStatus.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x33, Offset: 4, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x33, Offset: 4, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.ShutdownRequested, Type: Input, ReportID: 0x33, Offset: 5, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.ShutdownRequested, Type: Feature, ReportID: 0x33, Offset: 5, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.ShutdownImminent, Type: Input, ReportID: 0x33, Offset: 6, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.ShutdownImminent, Type: Feature, ReportID: 0x33, Offset: 6, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.RemainingTimeLimitExpired, Type: Input, ReportID: 0x33, Offset: 7, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.RemainingTimeLimitExpired, Type: Feature, ReportID: 0x33, Offset: 7, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.CommunicationLost, Type: Input, ReportID: 0x33, Offset: 8, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.CommunicationLost, Type: Feature, ReportID: 0x33, Offset: 8, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.NeedReplacement, Type: Input, ReportID: 0x33, Offset: 9, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.NeedReplacement, Type: Feature, ReportID: 0x33, Offset: 9, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.Overload, Type: Input, ReportID: 0x33, Offset: 10, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.Overload, Type: Feature, ReportID: 0x33, Offset: 10, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.VoltageNotRegulated, Type: Input, ReportID: 0x33, Offset: 11, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.VoltageNotRegulated, Type: Feature, ReportID: 0x33, Offset: 11, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.ff860080, Type: Input, ReportID: 0x33, Offset: 12, Size: 1, Value: 0.000000
Path: UPS.PresentStatus.ff860080, Type: Feature, ReportID: 0x33, Offset: 12, Size: 1, Value: 0.000000
Path: UPS.ff860001.ff860023, Type: Feature, ReportID: 0x60, Offset: 0, Size: 16, Value: 0.000000
Path: UPS.ff860001.ff860026, Type: Feature, ReportID: 0x61, Offset: 0, Size: 8, Value: 134.000000
Path: UPS.ff860001.ff860025, Type: Feature, ReportID: 0x62, Offset: 0, Size: 32, Value: 50462976.000000
Path: UPS.PowerConverter.ff860024, Type: Feature, ReportID: 0x51, Offset: 0, Size: 8, Value: 124.000000
Detected a UPS: American Power Conversion/Back-UPS BR  800 FW:9.o4 .I USB FW:o4 

> check for a string path that matches battery.test.

I see the following:

Path: UPS.Battery.Test, Type: Input, ReportID: 0x16, Offset: 0, Size: 8, Value: 6.000000
Path: UPS.Battery.Test, Type: Feature, ReportID: 0x16, Offset: 0, Size: 8, Value: 6.000000

but as far as I can see this is already mapped to ups.test.result,
which shows in the output of upsc as:

ups.test.result: No test initiated

> if it's not UPS.BatterySystem.Battery.Test, then you win and just have to
> add it to drivers/apc-hid.c
> otherwise, we'll have to dig...

-- 
Jean Delvare



More information about the Nut-upsuser mailing list