Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APC Smart-UPS X 750 - some data is missing #1261

Open
kitor opened this issue Jan 12, 2022 · 37 comments · Fixed by #1320
Open

APC Smart-UPS X 750 - some data is missing #1261

kitor opened this issue Jan 12, 2022 · 37 comments · Fixed by #1320
Labels
APC DDL HCL impacts-release-2.7.4 Issues reported against NUT release 2.7.4 (maybe vanilla or with minor packaging tweaks) Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) modbus USB
Milestone

Comments

@kitor
Copy link

kitor commented Jan 12, 2022

Hello,

battery.charge: 66
battery.charge.low: 10
battery.charge.warning: 50
battery.runtime: 65535
battery.runtime.low: 150
battery.type: PbAc
battery.voltage: 52.0
battery.voltage.nominal: 48.0
device.mfr: American Power Conversion 
device.model: Smart-UPS X 750 
device.serial: <serial>
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: APC HID 0.96
driver.version.internal: 0.41
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: COM 03.8 / UPS 03.8
ups.mfr: American Power Conversion 
ups.mfr.date: 2011/11/28
ups.model: Smart-UPS X 750 
ups.productid: 0003
ups.serial:  <serial>
ups.status: OL CHRG
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.vendorid: 051d

Device connected via USB. It is lacking some data like ups load, input/output voltages and so on (visible on older Smart-UPS 1000 RM that I'm replacing).

I found some topics suggesting that it may use modbus, not sure if that's the case here (at least manual don't mention it, nor it is mentioned in menus). Any suggestions?

Below is the descriptor data:

Bus 002 Device 006: ID 051d:0003 American Power Conversion UPS
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x051d American Power Conversion
  idProduct          0x0003 UPS
  bcdDevice            1.06
  iManufacturer           1 American Power Conversion 
  iProduct                2 Smart-UPS X 750  FW:COM 03.8 / UPS 03.8
  iSerial                 3 <serial>
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0029
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x60
      (Missing must-be-set bit!)
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     425
          Report Descriptor: (length is 425)
            Item(Global): Usage Page, data= [ 0x84 ] 132
                            Power Device Page
            Item(Local ): Usage, data= [ 0x04 ] 4
                            UPS
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Local ): Usage, data= [ 0x24 ] 36
                            Power Summary
            Item(Main  ): Collection, data= [ 0x02 ] 2
                            Logical
            Item(Global): Report ID, data= [ 0x01 ] 1
            Item(Local ): Usage, data= [ 0xfe ] 254
                            iProduct
            Item(Local ): String Index, data= [ 0x02 ] 2
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x01 ] 1
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x02 ] 2
            Item(Local ): Usage, data= [ 0xff ] 255
                            iSerialNumber
            Item(Local ): String Index, data= [ 0x03 ] 3
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x03 ] 3
            Item(Local ): Usage, data= [ 0xfd ] 253
                            iManufacturer
            Item(Local ): String Index, data= [ 0x01 ] 1
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x85 ] 133
                            Battery System Page
            Item(Global): Report ID, data= [ 0x04 ] 4
            Item(Local ): Usage, data= [ 0x8f ] 143
                            iOEMInformation
            Item(Local ): String Index, data= [ 0x01 ] 1
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x05 ] 5
            Item(Local ): Usage, data= [ 0x89 ] 137
                            iDeviceChemistry
            Item(Local ): String Index, data= [ 0x04 ] 4
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x06 ] 6
            Item(Local ): Usage, data= [ 0x8b ] 139
                            Rechargeable
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Local ): Usage, data= [ 0x2c ] 44
                            Capacity Mode
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x0e ] 14
            Item(Local ): Usage, data= [ 0x83 ] 131
                            Design Capacity
            Item(Global): Logical Maximum, data= [ 0x64 ] 100
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Local ): Usage, data= [ 0x67 ] 103
                            Full Charge Capacity
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x0c ] 12
            Item(Local ): Usage, data= [ 0x66 ] 102
                            Remaining Capacity
            Item(Main  ): Input, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Local ): Usage, data= [ 0x66 ] 102
                            Remaining Capacity
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Report ID, data= [ 0x10 ] 16
            Item(Local ): Usage, data= [ 0x8d ] 141
                            Capacity Granularity 1
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Local ): Usage, data= [ 0x8e ] 142
                            Capacity Granularity 2
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x0f ] 15
            Item(Local ): Usage, data= [ 0x8c ] 140
                            Warning Capacity Limit
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x11 ] 17
            Item(Local ): Usage, data= [ 0x29 ] 41
                            Remaining Capacity Limit
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Report ID, data= [ 0x09 ] 9
            Item(Local ): Usage, data= [ 0x85 ] 133
                            Manufacturer Date
            Item(Global): Report Size, data= [ 0x10 ] 16
            Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 ] 65535
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Report ID, data= [ 0x0d ] 13
            Item(Local ): Usage, data= [ 0x68 ] 104
                            Run Time To Empty
            Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 ] 65535
            Item(Global): Unit, data= [ 0x01 0x10 ] 4097
                            System: SI Linear, Unit: Seconds
            Item(Global): Unit Exponent, data= [ 0x00 ] 0
                            Unit Exponent: 0
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x68 ] 104
                            Run Time To Empty
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x84 ] 132
                            Power Device Page
            Item(Global): Report ID, data= [ 0x12 ] 18
            Item(Local ): Usage, data= [ 0x57 ] 87
                            Delay Before Shutdown
            Item(Global): Logical Minimum, data= [ 0xff 0xff ] 65535
            Item(Global): Logical Maximum, data= [ 0xff 0x7f ] 32767
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Report ID, data= [ 0x13 ] 19
            Item(Local ): Usage, data= [ 0x55 ] 85
                            Delay Before Reboot
            Item(Global): Report Size, data= [ 0x18 ] 24
            Item(Global): Logical Minimum, data= [ 0xff 0xff 0xff 0xff ] -1
            Item(Global): Logical Maximum, data= [ 0x18 0xc5 0x13 0x00 ] 1295640
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x85 ] 133
                            Battery System Page
            Item(Global): Report ID, data= [ 0x08 ] 8
            Item(Local ): Usage, data= [ 0x2a ] 42
                            Remaining Time Limit
            Item(Global): Logical Maximum, data= [ 0x64 0x05 0x00 0x00 ] 1380
            Item(Global): Logical Minimum, data= [ 0x78 0x00 ] 120
            Item(Main  ): Input, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Local ): Usage, data= [ 0x2a ] 42
                            Remaining Time Limit
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x84 ] 132
                            Power Device Page
            Item(Global): Report ID, data= [ 0x0a ] 10
            Item(Local ): Usage, data= [ 0x40 ] 64
                            Config Voltage
            Item(Global): Report Size, data= [ 0x10 ] 16
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 ] 65535
            Item(Global): Unit, data= [ 0x21 0xd1 0xf0 0x00 ] 15782177
                            System: SI Linear, Unit: Centimeter^2*Gram*Seconds^-3*Ampere^-1
            Item(Global): Unit Exponent, data= [ 0x05 ] 5
                            Unit Exponent: 5
            Item(Main  ): Feature, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x0b ] 11
            Item(Local ): Usage, data= [ 0x30 ] 48
                            Voltage
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Report ID, data= [ 0x14 ] 20
            Item(Local ): Usage, data= [ 0x5a ] 90
                            Audible Alarm Control
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Logical Minimum, data= [ 0x01 ] 1
            Item(Global): Logical Maximum, data= [ 0x03 ] 3
            Item(Global): Unit, data= [ 0x00 ] 0
                            System: None, Unit: (None)
            Item(Global): Unit Exponent, data= [ 0x00 ] 0
                            Unit Exponent: 0
            Item(Main  ): Input, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Local ): Usage, data= [ 0x5a ] 90
                            Audible Alarm Control
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x02 ] 2
                            Present Status
            Item(Main  ): Collection, data= [ 0x02 ] 2
                            Logical
            Item(Global): Report ID, data= [ 0x07 ] 7
            Item(Global): Usage Page, data= [ 0x85 ] 133
                            Battery System Page
            Item(Local ): Usage, data= [ 0x44 ] 68
                            Charging
            Item(Global): Report Size, data= [ 0x01 ] 1
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0x01 ] 1
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x44 ] 68
                            Charging
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x45 ] 69
                            Discharging
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x45 ] 69
                            Discharging
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0xd0 ] 208
                            AC Present
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0xd0 ] 208
                            AC Present
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0xd1 ] 209
                            Battery Present
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0xd1 ] 209
                            Battery Present
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x42 ] 66
                            Below Remaining Capacity Limit
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x42 ] 66
                            Below Remaining Capacity Limit
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x84 ] 132
                            Power Device Page
            Item(Local ): Usage, data= [ 0x68 ] 104
                            Shutdown Requested
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x68 ] 104
                            Shutdown Requested
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x69 ] 105
                            Shutdown  Imminent
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x69 ] 105
                            Shutdown  Imminent
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x85 ] 133
                            Battery System Page
            Item(Local ): Usage, data= [ 0x43 ] 67
                            Remaining Time Limit Expired
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x43 ] 67
                            Remaining Time Limit Expired
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x84 ] 132
                            Power Device Page
            Item(Local ): Usage, data= [ 0x73 ] 115
                            Communication Lost
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x73 ] 115
                            Communication Lost
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x85 ] 133
                            Battery System Page
            Item(Local ): Usage, data= [ 0x4b ] 75
                            Need Replacement
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x4b ] 75
                            Need Replacement
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x84 ] 132
                            Power Device Page
            Item(Local ): Usage, data= [ 0x65 ] 101
                            Overload
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x65 ] 101
                            Overload
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x85 ] 133
                            Battery System Page
            Item(Local ): Usage, data= [ 0xdb ] 219
                            Voltage Not Regulated
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0xdb ] 219
                            Voltage Not Regulated
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Usage Page, data= [ 0x86 0xff ] 65414
                            (null)
            Item(Local ): Usage, data= [ 0x80 ] 128
                            (null)
            Item(Main  ): Input, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Local ): Usage, data= [ 0x80 ] 128
                            (null)
            Item(Main  ): Feature, data= [ 0xa2 ] 162
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Volatile Bitfield
            Item(Global): Report Count, data= [ 0x03 ] 3
            Item(Main  ): Input, data= [ 0x01 ] 1
                            Constant Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Main  ): Feature, data= [ 0x01 ] 1
                            Constant Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): End Collection, data=none
            Item(Global): Usage Page, data= [ 0x86 0xff ] 65414
                            (null)
            Item(Global): Report ID, data= [ 0x89 ] 137
            Item(Local ): Usage, data= [ 0xfd ] 253
                            (null)
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Main  ): Input, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report ID, data= [ 0x90 ] 144
            Item(Local ): Usage, data= [ 0xfc ] 252
                            (null)
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Main  ): Output, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0002
  (Bus Powered)
  Remote Wakeup Enabled
@jimklimov
Copy link
Member

jimklimov commented Jan 12, 2022 via email

@kitor
Copy link
Author

kitor commented Jan 12, 2022

Packaged release 2.7.4 (which your "screenshots" imply) was a few years

Interesting, as this is Debian Stable (or to be exact, Proxmox VE 7.0.x).
I'll build latest release and report back.

@jimklimov
Copy link
Member

jimklimov commented Jan 12, 2022 via email

@kitor
Copy link
Author

kitor commented Feb 12, 2022

Finally found some time to check that out. Likely a rookie mistake, but after building with

./configure -': ./configure --with-user=nut --with-group=nut --with-usb
make
make install

I went to /usr/local/ups/bin and tried to execute ./usbhid-ups -s ups -x port=auto

Network UPS Tools - Generic HID driver 0.45 (2.7.4-4613-ge1218569)
USB communication driver (libusb 0.1) 0.42
interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of this message)
No matching HID UPS found

@jimklimov
Copy link
Member

jimklimov commented Feb 13, 2022 via email

@kitor
Copy link
Author

kitor commented Feb 13, 2022

Logs:

# ./usbhid-ups -s ups -x port=auto -DDDDDDDD
Network UPS Tools - Generic HID driver 0.45 (2.7.4-4613-ge1218569)
USB communication driver (libusb 0.1) 0.42
   0.000000	[D1] debug level is '8'
   0.005450	[D5] send_to_all: SETINFO device.type "ups"
   0.006061	[D2] Initializing an USB-connected UPS with library libusb-0.1 (or compat) (NUT subdriver name='USB communication driver (libusb 0.1)' ver='0.42')
   0.006561	[D1] upsdrv_initups (non-SHUT)...
   0.024062	[D3] usb_busses=0x5622c0ad99c0
//skipped other devices
   0.050910	[D2] Checking device (051D/0003) (001/003)
   0.053250	[D2] - VendorID: 051d
   0.053853	[D2] - ProductID: 0003
   0.053947	[D2] - Manufacturer: American Power Conversion 
   0.054146	[D2] - Product: Smart-UPS X 750  FW:COM 03.8 / UPS 03.8
   0.054231	[D2] - Serial Number: AS1149110011  
   0.054428	[D2] - Bus: 001
   0.054516	[D2] - Device: 003
   0.054689	[D2] - Device release number: 0106
   0.054948	[D2] Trying to match device
   0.055032	[D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.055239	interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of this message)
   0.055329	[D3] match_function_regex: matching a device...
   0.055527	[D2] Device matches
   0.055639	[D2] failed to claim USB device: could not claim interface 0: Device or resource busy
   0.058693	[D2] detached kernel driver from USB device...
   0.058782	[D3] nut_usb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   0.060013	[D3] HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 a9 01
   0.060055	[D2] Warning: HID descriptor, method 1 failed
   0.060082	[D3] HID descriptor length (method 1) -87
   0.060108	[D4] i=0, extra[i]=09, extra[i+1]=21
   0.060139	[D3] HID descriptor, method 2: (9 bytes) => 09 21 00 01 21 01 22 a9 01
   0.060163	[D2] Warning: HID descriptor, method 2 failed
   0.060186	[D3] HID descriptor length (method 2) -87
   0.060209	[D2] Unable to retrieve any HID descriptor
//skipped other devices
   0.061053	[D2] libusb0: No appropriate HID device found
   0.061085	No matching HID UPS found
# lsusb | grep UPS
Bus 001 Device 003: ID 051d:0003 American Power Conversion UPS
# ls -lah /dev/bus/usb/001/003 
crw-rw-r-- 1 root nut 189, 2 Feb 13 23:05 /dev/bus/usb/001/003
# usbhid-dump -a 1:3
001:003:000:DESCRIPTOR         1644789921.728014
 05 84 09 04 A1 01 09 24 A1 02 85 01 09 FE 79 02
 75 08 95 01 15 00 26 FF 00 B1 22 85 02 09 FF 79
 03 B1 22 85 03 09 FD 79 01 B1 22 05 85 85 04 09
 8F 79 01 B1 22 85 05 09 89 79 04 B1 22 85 06 09
 8B B1 22 09 2C B1 22 85 0E 09 83 25 64 B1 22 09
 67 B1 22 85 0C 09 66 81 22 09 66 B1 A2 85 10 09
 8D B1 22 09 8E B1 22 85 0F 09 8C B1 22 85 11 09
 29 B1 A2 85 09 09 85 75 10 27 FF FF 00 00 B1 A2
 85 0D 09 68 27 FF FF 00 00 66 01 10 55 00 81 A2
 09 68 B1 A2 05 84 85 12 09 57 16 FF FF 26 FF 7F
 B1 A2 85 13 09 55 75 18 17 FF FF FF FF 27 18 C5
 13 00 B1 A2 05 85 85 08 09 2A 27 64 05 00 00 16
 78 00 81 22 09 2A B1 A2 05 84 85 0A 09 40 75 10
 15 00 27 FF FF 00 00 67 21 D1 F0 00 55 05 B1 22
 85 0B 09 30 B1 A2 85 14 09 5A 75 08 15 01 25 03
 65 00 55 00 81 22 09 5A B1 A2 09 02 A1 02 85 07
 05 85 09 44 75 01 15 00 25 01 81 A2 09 44 B1 A2
 09 45 81 A2 09 45 B1 A2 09 D0 81 A2 09 D0 B1 A2
 09 D1 81 A2 09 D1 B1 A2 09 42 81 A2 09 42 B1 A2
 05 84 09 68 81 A2 09 68 B1 A2 09 69 81 A2 09 69
 B1 A2 05 85 09 43 81 A2 09 43 B1 A2 05 84 09 73
 81 A2 09 73 B1 A2 05 85 09 4B 81 A2 09 4B B1 A2
 05 84 09 65 81 A2 09 65 B1 A2 05 85 09 DB 81 A2
 09 DB B1 A2 06 86 FF 09 80 81 A2 09 80 B1 A2 95
 03 81 01 B1 01 C0 C0 06 86 FF 85 89 09 FD 15 00
 26 FF 00 75 08 95 3F 81 02 85 90 09 FC 15 00 26
 FF 00 75 08 95 3F 91 02 C0

If I launch distro provided packages, it is detected (as in first posts). Tests done on two machines, one had distro nut services disabled (and machine rebooted for a good measure), other had distro nut packages removed.

@jimklimov
Copy link
Member

jimklimov commented Feb 14, 2022 via email

@kitor
Copy link
Author

kitor commented Feb 14, 2022

Just a note: There seems to be multiple hardware revisions of this model. There are some with firmware 1.x that are not upgradable, mine is upgradable to 3.8 (as listed here), some can go up to 7.x series. So even though they all identify as Smart UPS 750-X, they have different internal model number.

I believe the same apply to 1000 and 1500W models, as they share the same chassis.

@jimklimov
Copy link
Member

jimklimov commented Feb 14, 2022 via email

@kitor
Copy link
Author

kitor commented Feb 14, 2022

Yes, exactly the same device that works on 2.7.4 from Debian repo is not recognized on version built yesterday from master.
I tried updating the firmware, but as explained above - it turned out that my hw revision can accept up to 3.8, and it was already the revision I had.

@nbriggs
Copy link
Contributor

nbriggs commented Feb 14, 2022 via email

@nbriggs
Copy link
Contributor

nbriggs commented Feb 15, 2022

While there may be fewer warnings... I suspect there will be other new bugs from having changed the buffers from unsigned to signed bytes in the libusb 0.1 case.

@jimklimov
Copy link
Member

Thanks a lot for the analysis and catch; I think the buffer type changes trickled down from libusb-1.0(+0.1) reworks under issue #300 and I believe they were supposed to match API headers of the two library versions, to call their methods with types they expected (and it is a huge mismatched mess there even inside one version).

So, the correction would be to make sure unsigned char (*) is used in sources of NUT drivers and libs, and cast to usb_ctrl_char(buf) anything that squeaks just in libusb API calls?

@nbriggs
Copy link
Contributor

nbriggs commented Feb 15, 2022

I haven't looked that hard at the code (beyond just the negative length), but someone could look at anything in NUT code that does arithmetic on the buffer elements for issues. I'm not sure which way round to cast is the right way -- declare the buffers that will get passed (or received from?) the libusb 0.1 code with what the libusb declarations expect and just cast for the arithmetic (probably a small number of cases...?) or declare the buffers unsigned in the NUT code and cast to what the libusb 0.1 expects when they're passed. I suspect the former would be more obvious. I'd cast to uint8_t for the arithmetic if we're assuming C99 or better with stdint.h available.

@jimklimov
Copy link
Member

jimklimov commented Feb 15, 2022 via email

@jimklimov jimklimov added this to the 2.7.5 milestone Feb 15, 2022
nbriggs added a commit to nbriggs/nut that referenced this issue Feb 28, 2022
…libusb 0.1)

The libusb 0.1 interface definition declares a (signed) char type for
control messages.  The HID descriptor length contained within a control
message is intended to be interpreted as a pair of unsigned bytes so
we must cast to uint8_t when doing the arithmetic rather than trip over
the sign bit.

Closes networkupstools#1261, closes networkupstools#1312.
nbriggs added a commit to nbriggs/nut that referenced this issue Feb 28, 2022
…libusb 0.1)

The libusb 0.1 interface definition declares a (signed) char type for
control messages.  The HID descriptor length contained within a control
message is intended to be interpreted as a pair of unsigned bytes so
we must cast to uint8_t when doing the arithmetic rather than trip over
the sign bit.

Closes networkupstools#1261, closes networkupstools#1312.
nbriggs added a commit to nbriggs/nut that referenced this issue Mar 1, 2022
…libusb 0.1)

The libusb 0.1 interface definition declares a (signed) char type for
control messages.  The HID descriptor length contained within a control
message is intended to be interpreted as a pair of unsigned bytes so
we must cast to uint8_t when doing the arithmetic rather than trip over
the sign bit.

Closes networkupstools#1261, closes networkupstools#1312.
@kitor
Copy link
Author

kitor commented Mar 2, 2022

Hello, why this ticket is closed? It was about missing data, not about the bug that was apparently fixed in master.

@nbriggs
Copy link
Contributor

nbriggs commented Mar 2, 2022

Sorry, I tagged this as closed by the bug fix that was preventing the code from reading any data when using libusb-0.1.

Presumably the fix for your missing data is to check if there are missing mappings from the descriptors to the NUT variables. Perhaps @jimklimov could reopen this.

@jimklimov jimklimov reopened this Mar 2, 2022
@jimklimov
Copy link
Member

Sorry about the automated mess-up :)

@kitor
Copy link
Author

kitor commented Mar 2, 2022

Thank you. I built head (like previously), run usbhid-ups -s ups -x port=auto, then upsd and upsc output is:

battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.runtime: 13574
battery.runtime.low: 150
battery.type: PbAc
battery.voltage: 54.5
battery.voltage.nominal: 48.0
device.mfr: American Power Conversion 
device.model: Smart-UPS X 750 
device.serial: <serial>
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.version: 2.7.4-4757-g9e5e34d3
driver.version.data: APC HID 0.98
driver.version.internal: 0.45
driver.version.usb: libusb-0.1 (or compat)
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.firmware: COM 03.8 / UPS 03.8
ups.mfr: American Power Conversion 
ups.mfr.date: 2011/11/28
ups.model: Smart-UPS X 750 
ups.productid: 0003
ups.serial: <serial>
ups.status: OL
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.vendorid: 051d

Thus nothing new, except in driver fields.

Is there any document/guide on hid descriptors? I'm fine even running "hacked up" version as lack of load and input/output voltages screwed my automation a bit :)

@nbriggs
Copy link
Contributor

nbriggs commented Mar 2, 2022

The HID descriptor that the UPS sent is really minimal, I ran an HID decoder over it that knows most of the APC specific usages, plus all the standard usages, and below are all the values that it will report. Percent load, and input/output voltage are not values it seems to be prepared to report. Power device page "ConfigVoltage" and "Voltage" are the battery nominal and actual voltages that you're seeing.

05 84        (GLOBAL) USAGE_PAGE         0x0084 Power Device Page 
09 04        (LOCAL)  USAGE              0x00840004 UPS (Application Collection)  
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x00840004: Page=Power Device Page, Usage=UPS, Type=Application Collection)
09 24          (LOCAL)  USAGE              0x00840024 Power Summary (Logical or Physical Collection)  
A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x00840024: Page=Power Device Page, Usage=Power Summary, Type=Logical or Physical Collection)
09 FE            (LOCAL)  USAGE              0x008400FE i Product (Static Value)  
09 FF            (LOCAL)  USAGE              0x008400FF i Serial Number (Static Value)  
09 FD            (LOCAL)  USAGE              0x008400FD i Manufacturer (Static Value)  
05 85            (GLOBAL) USAGE_PAGE         0x0085 Battery System Page 
09 8F            (LOCAL)  USAGE              0x0085008F i OEMInformation (Static Value)  
09 89            (LOCAL)  USAGE              0x00850089 i Device Chemistry (Static Value)  
09 8B            (LOCAL)  USAGE              0x0085008B Rechargeable (Static Value)  
09 2C            (LOCAL)  USAGE              0x0085002C Capacity Mode (Dynamic Value)  
09 83            (LOCAL)  USAGE              0x00850083 Design Capacity (Static Value)  
09 67            (LOCAL)  USAGE              0x00850067 Full Charge Capacity (Dynamic Value)  
09 66            (LOCAL)  USAGE              0x00850066 Remaining Capacity (Dynamic Value)  
09 66            (LOCAL)  USAGE              0x00850066 Remaining Capacity (Dynamic Value)  
09 8D            (LOCAL)  USAGE              0x0085008D Capacity Granularity 1 (Static Value)  
09 8E            (LOCAL)  USAGE              0x0085008E Capacity Granularity 2 (Static Value)  
09 8C            (LOCAL)  USAGE              0x0085008C Warning Capacity Limit (Static Value)  
09 29            (LOCAL)  USAGE              0x00850029 Remaining Capacity Limit (Dynamic Value)  
09 85            (LOCAL)  USAGE              0x00850085 Manufacturer Date (Static Value)  
09 68            (LOCAL)  USAGE              0x00850068 Run Time To Empty (Dynamic Value)  
09 68            (LOCAL)  USAGE              0x00850068 Run Time To Empty (Dynamic Value)  
05 84            (GLOBAL) USAGE_PAGE         0x0084 Power Device Page 
09 57            (LOCAL)  USAGE              0x00840057 Delay Before Shutdown (Dynamic Value)  
09 55            (LOCAL)  USAGE              0x00840055 Delay Before Reboot (Dynamic Value)  
05 85            (GLOBAL) USAGE_PAGE         0x0085 Battery System Page 
09 2A            (LOCAL)  USAGE              0x0085002A Remaining Time Limit (Dynamic Value)  
09 2A            (LOCAL)  USAGE              0x0085002A Remaining Time Limit (Dynamic Value)  
05 84            (GLOBAL) USAGE_PAGE         0x0084 Power Device Page 
09 40            (LOCAL)  USAGE              0x00840040 Config Voltage (Static Value or Dynamic Value)  
09 30            (LOCAL)  USAGE              0x00840030 Voltage (Dynamic Value)  
09 5A            (LOCAL)  USAGE              0x0084005A Audible Alarm Control (Dynamic Value)  
09 5A            (LOCAL)  USAGE              0x0084005A Audible Alarm Control (Dynamic Value)  
09 02            (LOCAL)  USAGE              0x00840002 Present Status (Logical Collection)  
A1 02            (MAIN)   COLLECTION         0x02 Logical (Usage=0x00840002: Page=Power Device Page, Usage=Present Status, Type=Logical Collection)
05 85              (GLOBAL) USAGE_PAGE         0x0085 Battery System Page 
09 44              (LOCAL)  USAGE              0x00850044 Charging (Dynamic Flag)  
09 44              (LOCAL)  USAGE              0x00850044 Charging (Dynamic Flag)  
09 45              (LOCAL)  USAGE              0x00850045 Discharging (Dynamic Value)  
09 45              (LOCAL)  USAGE              0x00850045 Discharging (Dynamic Value)  
09 D0              (LOCAL)  USAGE              0x008500D0 AC Present (Dynamic Flag)  
09 D0              (LOCAL)  USAGE              0x008500D0 AC Present (Dynamic Flag)  
09 D1              (LOCAL)  USAGE              0x008500D1 Battery Present (Dynamic Flag)  
09 D1              (LOCAL)  USAGE              0x008500D1 Battery Present (Dynamic Flag)  
09 42              (LOCAL)  USAGE              0x00850042 Below Remaining Capacity Limit (Dynamic Flag)  
09 42              (LOCAL)  USAGE              0x00850042 Below Remaining Capacity Limit (Dynamic Flag)  
05 84              (GLOBAL) USAGE_PAGE         0x0084 Power Device Page 
09 68              (LOCAL)  USAGE              0x00840068 Shutdown Requested (Dynamic Flag)  
09 68              (LOCAL)  USAGE              0x00840068 Shutdown Requested (Dynamic Flag)  
09 69              (LOCAL)  USAGE              0x00840069 Shutdown Imminent (Dynamic Flag)  
09 69              (LOCAL)  USAGE              0x00840069 Shutdown Imminent (Dynamic Flag)  
05 85              (GLOBAL) USAGE_PAGE         0x0085 Battery System Page 
09 43              (LOCAL)  USAGE              0x00850043 Remaining Time Limit Expired (Dynamic Flag)  
09 43              (LOCAL)  USAGE              0x00850043 Remaining Time Limit Expired (Dynamic Flag)  
05 84              (GLOBAL) USAGE_PAGE         0x0084 Power Device Page 
09 73              (LOCAL)  USAGE              0x00840073 Communication Lost (Dynamic Flag)  
09 73              (LOCAL)  USAGE              0x00840073 Communication Lost (Dynamic Flag)  
05 85              (GLOBAL) USAGE_PAGE         0x0085 Battery System Page 
09 4B              (LOCAL)  USAGE              0x0085004B Need Replacement (Dynamic Flag)  
09 4B              (LOCAL)  USAGE              0x0085004B Need Replacement (Dynamic Flag)  
05 84              (GLOBAL) USAGE_PAGE         0x0084 Power Device Page 
09 65              (LOCAL)  USAGE              0x00840065 Overload (Dynamic Flag)  
09 65              (LOCAL)  USAGE              0x00840065 Overload (Dynamic Flag)  
05 85              (GLOBAL) USAGE_PAGE         0x0085 Battery System Page 
09 DB              (LOCAL)  USAGE              0x008500DB Voltage Not Regulated (Dynamic Flag)  
09 DB              (LOCAL)  USAGE              0x008500DB Voltage Not Regulated (Dynamic Flag)  

06 86FF        (GLOBAL) USAGE_PAGE         0xFF86 APC
85 89          (GLOBAL) REPORT_ID          0x89 (137)
09 FD          (LOCAL)  USAGE              0xFF8600FD <-- Warning: Undocumented usage
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0)
26 FF00        (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field
95 3F          (GLOBAL) REPORT_COUNT       0x3F (63) Number of fields
81 02          (MAIN)   INPUT              0x00000002 (63 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap

85 90          (GLOBAL) REPORT_ID          0x90 (144)
09 FC          (LOCAL)  USAGE              0xFF8600FC <-- Warning: Undocumented usage
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0)
26 FF00        (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field
95 3F          (GLOBAL) REPORT_COUNT       0x3F (63) Number of fields
91 02          (MAIN)   OUTPUT             0x00000002 (63 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap

@kitor
Copy link
Author

kitor commented Apr 10, 2022

I'll have a chance during next weekend.

@kitor
Copy link
Author

kitor commented Apr 18, 2022

Packet capture from Win7 in attachment. apc.zip

Screen capture as "data reference": https://www.youtube.com/watch?v=_aYcPjheZMM
I started packet capture before starting APC service, so hopefully all the handshakes are in there.
I changed some in-UPS settings back and forward, but I didn't touch outlets switching as device is deployed on prod.

Hope that is good reference, if not I can setup Linux VM and capture traffic there.

@nbriggs
Copy link
Contributor

nbriggs commented Apr 18, 2022

I’m offline for the next 3 weeks, so I hope someone else can look at this.

@kitor
Copy link
Author

kitor commented Jul 1, 2022

By a chance, did anyone manage to take a peek at this data?

@jimklimov jimklimov modified the milestones: 2.8.1, 2.8.2 Jan 6, 2023
@jimklimov jimklimov added impacts-release-2.7.4 Issues reported against NUT release 2.7.4 (maybe vanilla or with minor packaging tweaks) Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) labels Aug 29, 2023
@jimklimov
Copy link
Member

@nbriggs : Hello again, did/would you have a chance to revise the data dump above? :)

jimklimov added a commit to jimklimov/nut-ddl that referenced this issue Aug 31, 2023
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 31, 2023
@nbriggs
Copy link
Contributor

nbriggs commented Aug 31, 2023

@jimklimov - I didn't look at it (I assumed that there'd be someone else who might take on the dump decoding in a more timely manner), but I have some time over the next week or so so I will see if I can figure out what was going on in the raw USB capture and report back whether there's anything of interest.

@jimklimov
Copy link
Member

Sounds great, thanks a lot!

@kitor
Copy link
Author

kitor commented Sep 1, 2023

Hey, just a reminder that there's a screen capture of me gathering that dump: https://www.youtube.com/watch?v=_aYcPjheZMM
So you should have a pretty good reference point.

In the meantime I also got a stand alone Smart-UPS 750 (SMT750I). If I'm correct, SMT and SMX series are siblings (released about the same time, share almost identical local LCD interface). SMT are "tower" while SMX are rack mounted and support external battery packs.
It reports exactly the same set of data as SMX750I:

battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.runtime: 4320
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 27.1
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion 
device.model: Smart-UPS 750
device.serial: AS1316113420  
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.version: 2.8.0
driver.version.data: APC HID 0.98
driver.version.internal: 0.47
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: UPS 09.8 / ID=18
ups.mfr: American Power Conversion 
ups.mfr.date: 2013/04/19
ups.model: Smart-UPS 750
ups.productid: 0003
ups.serial: AS1316113420  
ups.status: OL
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.vendorid: 051d

jimklimov added a commit to jimklimov/nut that referenced this issue Sep 1, 2023
jimklimov added a commit to jimklimov/nut-ddl that referenced this issue Sep 1, 2023
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@nbriggs
Copy link
Contributor

nbriggs commented Sep 1, 2023

Yes, noted. I have extracted the USB data from the PCAP file, but now I have to look at decoding those with reference to the HID report descriptor that the UPS sent. I think a possible first step will be to remove duplicate request/response pairs and then determine if there are any reports that don't correspond to the known report types (or lengths?) in the report descriptor that therefore might contain the extra information that PowerChute sees.

@nbriggs
Copy link
Contributor

nbriggs commented Sep 9, 2023

Note to let you know that my free tie got preempted - I'm probably not going to be able to work on this for about another month.

@jimklimov
Copy link
Member

jimklimov commented Sep 10, 2023

Awww, schucks! Thanks for the update, and we do hope to see you soon! :)

FWIW, I planed to also populate some scripts/usb_exploration area in NUT sources to track bits of know-how about making heads or tails of USB HID info, sort of like the investigations you did for LogMin/LogMax debacle and the tools involved. However I found I can't really write too much about it based on issue comment history alone - so some notes, example scripts, etc. from de-facto experts like you would be very welcome :)

The docs/hid-subdrivers.txt already has a head start about rexx and hidrdd mentions (following up from #1618 / #1653) - so maybe that should get revised and expanded where possible.

alexwbaule pushed a commit to alexwbaule/nut that referenced this issue Oct 4, 2023
…tools#1261]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Alex W Baulé <alexwbaule@gmail.com>
alexwbaule pushed a commit to alexwbaule/nut that referenced this issue Oct 4, 2023
…pstools#1261]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Alex W Baulé <alexwbaule@gmail.com>
@jimklimov
Copy link
Member

@kitor : would you be able to check if this UPS would actually respond better to the new apc_modbus driver shipped since NUT v2.8.1? Note that at this time you would need a custom build of libmodbus with USB support for that, check https://github.com/networkupstools/nut/wiki/APC-UPS-with-Modbus-protocol

@jimklimov jimklimov modified the milestones: 2.8.2, 2.8.3 Apr 4, 2024
@kitor
Copy link
Author

kitor commented Apr 4, 2024

Thanks for notification. I'll try it in next few days and get back to you with result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APC DDL HCL impacts-release-2.7.4 Issues reported against NUT release 2.7.4 (maybe vanilla or with minor packaging tweaks) Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) modbus USB
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants