APC Smart-UPS X 750 - some data is missing
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
Can you please check with a local build of current NUT master branch? Packaged release 2.7.4 (which your "screenshots" imply) was a few years ago, and some fixes might have landed for APC over time, and more importantly for libusb-1.0 support which should be more stable WRT 'Resource temporarily unavailable' messages).
My quick guess is that this model exposes data at different HID points so mapping is missing (at least in your build).
Note APC was also seen to not follow standards for USB data encoding, see e.g. #1208
On Wed, Jan 12, 2022, 17:22 Kajetan Krykwiński @.***> wrote:
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:
device.type: upsdriver.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: 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
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^2GramSeconds^-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 — Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFHAW24MOL6KN2BIQ6DUVWTCRANCNFSM5LZM3XQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
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.
Note, not latest "release" (still is 2.7.4), but the master branch from GitHub.
On Wed, Jan 12, 2022, 17:45 Kajetan Krykwiński @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1261#issuecomment-1011244732, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFCB7X3P5PQGRQ47LELUVWV37ANCNFSM5LZM3XQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
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
Thanks, can you please try to add some -DDDDDD flags to the driver
launch, to report some debugs that might shine a light on this? I'd expect
maybe unsupported VID/PID combo (new model for us, etc.), or device node
busy due to another driver instance, udev, upower etc., or the test running
as a user without permissions to the device node, etc.
On Sat, Feb 12, 2022, 20:32 Kajetan Krykwiński @.***> wrote:
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
BTW: apcupsd can read all the values so it might be a good source to check how those are fetched:
@.***:/opt# apcaccess status APC : 001,027,0656 DATE : 2022-02-12 19:44:45 +0100 HOSTNAME : pve02 VERSION : 3.14.14 (31 May 2016) debian UPSNAME : ups CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2022-02-12 19:44:43 +0100 MODEL : Smart-UPS X 750 STATUS : ONLINE BCHARGE : 100.0 Percent TIMELEFT : 1092.2 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds ALARMDEL : No alarm BATTV : 54.4 Volts NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A STATFLAG : 0x05000008 MANDATE : 2011-11-28 SERIALNO : AS1149110011 NOMBATTV : 48.0 Volts FIRMWARE : COM 03.8 / UPS 03.8
— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1261#issuecomment-1037416634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFFAAAWCLDVKCSKTXLTU22YUFANCNFSM5LZM3XQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
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.
Negative descriptor length looks odd. @nbriggs @clepple : any ideas?
Did some recent improvement to be stricter with the wire protocol make another practical regression with APC? (2.7.4 apparently tolerated this and talked to the device)
On Sun, Feb 13, 2022, 23:09 Kajetan Krykwiński @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1261#issuecomment-1038451781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFFOYGVPR74HHWUMELDU3AT2RANCNFSM5LZM3XQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
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.
Thanks for that heads-up. And just to clarify: was it the same device that worked (at least somewhat) with packaged NUT 2.7.4 in earlier posts, and did not get recognized with the later ones and master-branch builds?
On Mon, Feb 14, 2022, 09:52 Kajetan Krykwiński @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1261#issuecomment-1038808805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFB6P4ZF3HFCZDYXLVDU3C6KLANCNFSM5LZM3XQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
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.
Yeah, it's the descriptor length that's wrong and preventing anything else from working correctly.
HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 a9 01
so it should be doing 0xa9 | (0x01 << 8) and getting 425 (they are to be interpreted as unsigned bytes), but it's coming up with -87 because you've (newly?) declared the usb_ctrl_charbuf as signed characters for libusb 0.1 --
silversword% git blame drivers/usb-common.h [...] 3f8d588d (Jim Klimov 2021-12-19 16:38:04 +0100 411) /* Here MIN/MAX should not matter much, type mostly used for casting / c2029ec6 (Jim Klimov 2021-12-13 14:16:44 +0100 412) typedef char usb_ctrl_charbuf; 3f8d588d (Jim Klimov 2021-12-19 16:38:04 +0100 413) typedef char usb_ctrl_char; 3f8d588d (Jim Klimov 2021-12-19 16:38:04 +0100 414) #define USB_CTRL_CHAR_MIN CHAR_MIN 3f8d588d (Jim Klimov 2021-12-19 16:38:04 +0100 415) #define USB_CTRL_CHAR_MAX CHAR_MAX
-- Nick
On Feb 14, 2022, at 12:35 AM, Jim Klimov @.***> wrote:
Negative descriptor length looks odd. @nbriggs @clepple : any ideas?
Did some recent improvement to be stricter with the wire protocol make another practical regression with APC? (2.7.4 apparently tolerated this and talked to the device)
On Sun, Feb 13, 2022, 23:09 Kajetan Krykwiński @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1261#issuecomment-1038451781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFFOYGVPR74HHWUMELDU3AT2RANCNFSM5LZM3XQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1261#issuecomment-1038800464, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6DAWNYH7TWEGBLIXR3AILU3C5GXANCNFSM5LZM3XQQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.
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.
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?
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.
Yes, by now I think C99+ is a reasonable assumption; there are too many things to fix and de-optimise to build in ANSI mode, beside simple-to-adhere cosmetics like declarations on top of methods and block-comment style, so I left the door open and CI ready, but won't commit to the cause myself (documented as such along the way to NUT 2.7.5).
Hello, why this ticket is closed? It was about missing data, not about the bug that was apparently fixed in master.
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.
Sorry about the automated mess-up :)
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 :)
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
I will disagree, as PowerChute BE reports those:

Of course I understand it may talk in some additional protocol, but does that give any clues where to look?
That by itself doesn't give any clue about what PowerChute may be doing. Can you capture all the USB traffic starting before you start PowerChute? USBTrace, USBPcap or other USB sniffing tools might make it possible to reverse engineer what it's doing. You'd need to get the USB trace and the values that it showed in all the PowerChute reports so that it's possible to correlate the displayed values with any raw data that's visible in the trace, and to see any commands that the PowerChute software sent to the UPS to elicit any private reports.
Sure, I can, next time I'll be on location.
Hello @kitor : any updates on practical testing?
I'll have a chance during next weekend.
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.
I’m offline for the next 3 weeks, so I hope someone else can look at this.
By a chance, did anyone manage to take a peek at this data?
@nbriggs : Hello again, did/would you have a chance to revise the data dump above? :)
@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.