Skip to content

Feature request: bcmxcp_usb driver to support more than one UPS #597

@kyuferev

Description

@kyuferev

Hi.
Right now according to official documentation bcmxcp_usb driver supports only one UPS at a time. Unfortunately I have lots of Eaton PW9120 6000i in my disposal and a task to monitor all of them.

According to this comment there is (or was?) a plan/idea to implement a serial number differentiantion between multiple UPSes. At the same time usbhid-ups driver already has this functionality.

I've been poking around this issue for quite some time now and haven't found any working solution (except for obvious 1 UPS = 1 Raspberry Pi). Is there a way to implement this feature for bcmxcp_usb driver or maybe modify usbhid-ups driver to work with Eaton PW9120 6000i? Or maybe I'm missing something and there is some kind of a quick workaround for this issue?

FYI:

# lsusb -v -s 001:009

Bus 001 Device 009: ID 06da:0002 Phoenixtec Power Co., Ltd UPS
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x06da Phoenixtec Power Co., Ltd
  idProduct          0x0002 UPS
  bcdDevice            0.06
  iManufacturer           4 Phoenixtec Power
  iProduct               38 UPS USB Interface (V2.00)
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               20mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  09 21 00 01 21 01 22 51 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              20
Device Status:     0x0000
  (Bus Powered)
# upsc <ups-name>
Init SSL without certificate database
ambient.temperature: 23
ambient.temperature.high: 40
battery.charge: 100
battery.charger.status: floating
battery.runtime: 1344
battery.runtime.low: 2
battery.voltage: 284.0
device.mfr: Eaton
device.model: PW9120 6000i
device.part: 1018290         
device.serial: RV442A0674      
device.type: ups
driver.name: bcmxcp_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.internal: 0.31
input.bypass.voltage: 227
input.frequency: 50.0
input.frequency.high: 52
input.frequency.low: 48
input.frequency.nominal: 50
input.transfer.boost.high: 176
input.transfer.high: 276
input.transfer.low: 160
input.transfer.trim.low: 253
input.voltage: 225
input.voltage.nominal: 220
output.current:  6.7
output.current.nominal: 27.0
output.frequency: 50.0
output.frequency.nominal: 50
output.phases: 1
output.voltage: 222
output.voltage.nominal: 220
ups.alarm: UPS_CABINET_OVER_TEMP TRANSFORMER_OVER_TEMP CABINET_DOOR_OPEN_VOLT_PRESENT AUTOMATIC_STARTUP_PENDING MODEM_CONNECTION_ESTABLISHED
ups.beeper.status: enabled
ups.firmware: Cont:05.20 Inve:05.20
ups.load:  23.8
ups.mfr: Eaton
ups.model: PW9120 6000i
ups.power: 1430
ups.power.nominal: 6000
ups.realpower: 1354
ups.serial: RV442A0674      
ups.status: ALARM OL
ups.test.result: Done and passed
# upsdrvctl start <second bcmxcp_usb ups-name>
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - BCMXCP UPS driver 0.31 (2.7.4)
USB communication subdriver 0.22
Communications with UPS lost: Error executing command
Could not communicate with the ups: Device or resource busy
CLOSING

Driver failed to start (exit status=1)
# /lib/nut/bcmxcp_usb -a <second bcmxcp_usb ups-name> -DDD
Network UPS Tools - BCMXCP UPS driver 0.31 (2.7.4)
USB communication subdriver 0.22
   0.000000     debug level is '3'
   0.003664     entering nutusb_open()
   0.005690     device 010 opened successfully
   0.005974     Can't claim POWERWARE USB interface: could not claim interface 0: Device or resource busy
   0.006213     Can't reset POWERWARE USB endpoint: could not clear/halt ep 129: Device or resource busy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Phoenixtec (USB 0x06DA/0xFFFF)This USB chip VID/PID is used in many devices, some with different protocols - detection may be hardUSBUSB-duplicate-devicesTrack bugs and issues about monitoring several devices that seem identical to NUT or libusbdocumentationfeature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions