Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ https://github.com/networkupstools/nut/milestone/12
other too. [issue #3136]
* Improved high-verbosity debug tracing of NUT `libhid` and `usbhid-ups`
to help make sense of data processing issues (HID paths, strings). [#3201]
* Liebert devices with USB ID `10af:0002` should default to HID Interface 1
(not 0) to serve the HID Power Device Class telemetry. [#3345]
* Further removal of unbounded `strcpy()` and `sprintf()` usage. [#3253]
* For state tree methods, introduced `difftime_st_tree_timespec()` to
abstract platform-dependent definitions of `st_tree_timespec_t`. [PR #3156]
Expand Down
11 changes: 11 additions & 0 deletions drivers/libusb0.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,17 @@ static int nut_libusb_open(usb_dev_handle **udevp,
usb_subdriver.hid_desc_index = 1;
}

/* Liebert PSI5 / PowerSure PST (10af:0002): the HID Power Device
* Class descriptor is on interface 1. Interface 0 exposes only a
* 27-byte vendor-specific report that contains no usable UPS data,
* which caused NUT to incorrectly report the UPS as on battery
* (OB) even when AC power was present.
* See GitHub issues #1252 and #3340. */
if ((curDevice->VendorID == 0x10af) && (curDevice->ProductID == 0x0002)) {
if (!getval("usb_hid_rep_index"))
usb_subdriver.hid_rep_index = 1;
}

upsdebugx(2, "Trying to match device");
for (m = matcher; m; m=m->next) {
ret = matches(m, curDevice);
Expand Down
11 changes: 11 additions & 0 deletions drivers/libusb1.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,17 @@ static int nut_libusb_open(libusb_device_handle **udevp,
usb_subdriver.hid_desc_index = 1;
}

/* Liebert PSI5 / PowerSure PST (10af:0002): the HID Power Device
* Class descriptor is on interface 1. Interface 0 exposes only a
* 27-byte vendor-specific report that contains no usable UPS data,
* which caused NUT to incorrectly report the UPS as on battery
* (OB) even when AC power was present.
* See GitHub issues #1252 and #3340. */
if ((curDevice->VendorID == 0x10af) && (curDevice->ProductID == 0x0002)) {
if (!getval("usb_hid_rep_index"))
usb_subdriver.hid_rep_index = 1;
}

upsdebugx(2, "Trying to match device");
for (m = matcher; m; m=m->next) {
ret = matches(m, curDevice);
Expand Down
Loading