Repository navigation
The parameters "usb_hid_rep_index = 1" and "usb_hid_desc_index = 1" are incorrectly handled if the driver 'usbhid-ups' does not start in debug mode. #3340
Copy link
Copy link
Open
Labels
DDLHCLUSBUSB non-zero interface numbersMost UPSes serve USB interactions on interface 0 which is default. Recent "composite devices" differMost UPSes serve USB interactions on interface 0 which is default. Recent "composite devices" differVertiv/Liebertbugimpacts-release-2.8.4Issues reported against NUT release 2.8.4 (maybe vanilla or with minor packaging tweaks)Issues reported against NUT release 2.8.4 (maybe vanilla or with minor packaging tweaks)
Description
Hello Gentlemen
I'm not a programmer, but I know how to compile Linux software. I own a Vertiv Edge 3kVA UPS that I'm trying to use with NUT UPS 2.8.4. After numerous attempts and searches, I've come to the following conclusion: if the parameter "debug_min = 1" is not set, the parameters "usb_hid_rep_index = 1" and "usb_hid_desc_index = 1" are ignored, and the reported data is incorrect.
Below is a file with the essential configuration and results.
#ups.conf
[ups]
driver = "usbhid-ups"
port = "auto"
vendorid = "10AF"
productid = "0002"
product = "Vertiv Edge"
serial = "2014010030ED18C"
vendor = "Vertiv Co."
usb_hid_rep_index = 1
usb_hid_desc_index = 1
pollonly = 1
debug_min = 1
#Bad data without debug_min
battery.charge: 100
battery.charge.warning: 20
battery.runtime: 6480
battery.type: PbAc
device.mfr: Vertiv Co.
device.model: Vertiv Edge
device.serial: 2014010030ED18C
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.name: usbhid-ups
driver.parameter.interrupt_pipe_no_events_tolerance: -1
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.pollonly: 1
driver.parameter.port: auto
driver.parameter.product: Vertiv Edge
driver.parameter.productid: 0002
driver.parameter.serial: 2014010030ED18C
driver.parameter.synchronous: auto
driver.parameter.usb_hid_desc_index: 1
driver.parameter.usb_hid_rep_index: 1
driver.parameter.vendor: Vertiv Co.
driver.parameter.vendorid: 10AF
driver.state: quiet
driver.version: 2.8.4
driver.version.data: Belkin/Liebert HID 0.22
driver.version.internal: 0.67
driver.version.usb: libusb-1.0.26 (API: 0x01000109)
input.frequency: 50.0
input.voltage: 231.5
input.voltage.nominal: 230
output.frequency: 50.0
output.voltage: 231.6
output.voltage.nominal: 230
ups.mfr: Vertiv Co.
ups.model: Vertiv Edge
ups.productid: 0002
ups.serial: 2014010030ED18C
ups.status: OB
ups.vendorid: 10af
#Good data with debug_min (almost good execpt few fields)
battery.capacity: 3000
battery.charge: 100
battery.charge.warning: 20
battery.runtime: 6420
battery.type:
battery.voltage: 82.0
battery.voltage.nominal: 72
device.mfr: Vertiv Co.
device.model: Vertiv Edge
device.serial: 2014010030ED18C
device.type: ups
driver.debug: 6
driver.flag.allow_killpower: 0
driver.name: usbhid-ups
driver.parameter.interrupt_pipe_no_events_tolerance: -1
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.pollonly: 1
driver.parameter.port: auto
driver.parameter.product: Vertiv Edge
driver.parameter.productid: 0002
driver.parameter.serial: 2014010030ED18C
driver.parameter.synchronous: auto
driver.parameter.usb_hid_desc_index: 1
driver.parameter.usb_hid_rep_index: 1
driver.parameter.vendor: Vertiv Co.
driver.parameter.vendorid: 10AF
driver.state: dumping
driver.version: 2.8.4
driver.version.data: Belkin/Liebert HID 0.22
driver.version.internal: 0.67
driver.version.usb: libusb-1.0.26 (API: 0x01000109)
input.frequency: 50.0
input.voltage: 232.2
input.voltage.nominal: 230
output.frequency: 50.0
output.voltage: 232.3
output.voltage.nominal: 230
ups.mfr: Vertiv Co.
ups.model: Vertiv Edge
ups.productid: 0002
ups.serial: 2014010030ED18C
ups.status: OL CHRG
ups.vendorid: 10af
I hope it will be useful
Best regards
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DDLHCLUSBUSB non-zero interface numbersMost UPSes serve USB interactions on interface 0 which is default. Recent "composite devices" differMost UPSes serve USB interactions on interface 0 which is default. Recent "composite devices" differVertiv/Liebertbugimpacts-release-2.8.4Issues reported against NUT release 2.8.4 (maybe vanilla or with minor packaging tweaks)Issues reported against NUT release 2.8.4 (maybe vanilla or with minor packaging tweaks)
Type
Projects
- StatusShow more project fieldsTodo
Activity
jimklimov commentedon Mar 5, 2026
Thanks, this sounds suspiciously similar to #3247 / #3116 ...
Comparing your two outputs, the "bad" version includes
battery.type: PbAcwhile it is empty in the "good" version. I wouldn't rule out however, that "PbAc" is in fact a default value setting (likeups.status: OBuntil recently), and maybe in the "good" case the driver did read something from the device even if it could not interpret that.Previously there were bugs like
upsdebugx(1, "Some flag: %d", counter++)where thecounter++part never got evaluated when debugging is off. I think those cases were all found at the time, but can't help but wonder if anything similar happens here.jimklimov commentedon Mar 5, 2026
Also, since you get some apparently non-default data (like specific voltage numbers) in both cases, I can't confirm that
If they were ignored, I think the driver would not have received the report descriptors with UPS HID data points.
libusb1: auto-select interface 1 for Liebert PSI5 / PowerSure PST
jimklimov commentedon Mar 10, 2026
Looking at investigation for PR #3345, got also a new question: did you verify that BOTH "usb_hid_rep_index=1" and "usb_hid_desc_index=1" settings are needed?
@philipperollin : Comparing to that PR, would having just "usb_hid_rep_index=1" suffice to get some reasonable readings from the UPS?
philipperollin commentedon Mar 11, 2026
Dear Jim,
First, I started from scratch, going back to basics.
My various research efforts had confused my understanding of exactly what I had done.
My OS is:
I'm now using the tar archive "nut-2.8.4.tar.gz" instead of "git https://github.com/networkupstools/nut/" because the latter doesn't work at all.
Here's the ups.conf file that gives me the best results. I'm removing "pollonly" because it doesn't detect mains voltage loss.
The three parameters "usb_hid_rep_index = 1, usb_hid_desc_index = 1, usb_hid_ep_in=2" are required together.
If I set the debug parameter, I also get the field "battery.capacity: 3000" and I lose the value of "battery.type:"
I plan to work with the traces I've retrieved, namely the Wireshark usbmon dump when Vertiv's native "powerassist" software is used, the Wireshark usbmon dump when NUT is used, and the usbhid-ups traces with debugging enabled. I can share them with you if you'd like.
My 2cts
jimklimov commentedon Mar 11, 2026
Thanks, the interaction with debug is odd. I hope to have time to drill into it, but maybe not very soon.
You meant
git clone https://github.com/networkupstools/nut/, or did you really miss theclonepart?philipperollin commentedon Mar 11, 2026
I did not miss the clone part ;-)
regards
philipperollin commentedon Jun 2, 2026
Hello,
in order to close this request, here is ups.conf file I use with my Vertiv Edge device EDGE_3000IRT2U without any trouble with at least 2.8.4.
[ups]
driver = "usbhid-ups"
port = "auto"
vendorid = "10AF"
productid = "0002"
product = "Vertiv Edge"
serial = "2014010030ED18C"
vendor = "Vertiv Co."
usb_hid_rep_index = 1
usb_hid_desc_index = 1
maxreport
Best regards
jimklimov commentedon Jun 2, 2026
Thanks!