[Nut-upsdev] PowerCOM BNT-1000AP HID instant commands patch

Andrew Avdeev andrew.avdeev at gmail.com
Sun Apr 28 08:43:07 UTC 2013


Hello,

Got PowerCOM BNT-1000AP, usb id 0d9f:00a6, firmware FW4.A6

nut 2.4.3 on debian stable shows only two instant commands:

beeper.toggle - Toggle the UPS beeper             -- not working
test.battery.start.quick - Start a quick battery test  -- works ok.

No load and shutdown commands.

Trying svn trunk version, with the same results.

Debug output shows the problem:

   0.035558     hid_lookup_path: 00840004 -> UPS
   0.035569     hid_lookup_path: 00840024 -> PowerSummary
   0.035580     hid_lookup_path: 00ff0057 -> not found in lookup table

..skip..

   0.036073     hid_lookup_path: 00840004 -> UPS
   0.036084     hid_lookup_path: 00840024 -> PowerSummary
   0.036095     hid_lookup_path: 00ff0056 -> not found in lookup table

..skip..

   0.054472     hid_lookup_usage: UPS -> 00840004
   0.054476     hid_lookup_usage: PowerSummary -> 00840024
   0.054480     hid_lookup_usage: DelayBeforeStartup -> 00840056
   0.054488     string_to_path: depth = 3
   0.054494     hid_lookup_usage: UPS -> 00840004
   0.054499     hid_lookup_usage: PowerSummary -> 00840024
   0.054503     hid_lookup_usage: DelayBeforeShutdown -> 00840057
   0.054507     string_to_path: depth = 3
   0.054512     hid_lookup_usage: UPS -> 00840004
   0.054517     hid_lookup_usage: PowerSummary -> 00840024
   0.054521     hid_lookup_usage: DelayBeforeShutdown -> 00840057
   0.054525     string_to_path: depth = 3
   0.054531     find_nut_info: unknown info type: load.off.delay
   0.054535     find_nut_info: unknown info type: load.on.delay
   0.054539     find_nut_info: unknown info type: load.off.delay

Appears in firmware FW4.A6 PowerCOM changed DelayBeforeStartup/Shutdown
usage pages to Page 0x00ff.
It's non-standard,  "USB Usage Tables for HID Power Devices" says:
  "Usage pages xFF00 to xFFFF are reserved by HID for vendor-specific
implementation".
May change again..

  Anyway, patch against svn trunk attached.
Beeper.enable/disable also works, but only on battery.

Patched nut upscmd -l output:

Instant commands supported on UPS [pcm]:

beeper.disable - Disable the UPS beeper
beeper.enable - Enable the UPS beeper
beeper.toggle - Toggle the UPS beeper
load.off - Turn off the load immediately
load.on - Turn on the load immediately
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off
test.battery.start.quick - Start a quick battery test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nut-trunk-PCM_HID_BNT-FW4_A6.diff
Type: text/x-diff
Size: 3111 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20130428/9acd64ad/attachment.diff>


More information about the Nut-upsdev mailing list