-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
HID Report Descriptor patcher #169
Comments
+1 |
Potentially relevant: http://hidedit.org http://hidedit.org/ Does not include some of the UPS-related usage tables, and does not seem to have a way to import hex. |
Update on hidedit: turns out it does read in hex descriptors internally (should be able to interpret NUT debug logs with only a little more effort). However, it seems to be interpreting all numbers as big-endian rather than the USB standard little-endian, and it does not interpret signed numbers correctly. |
Starting to address some of the hidedit issues here: https://github.com/clepple/hidedit |
Another point of info: with CyberPower CP1500PFCLCD (and probaly others from the reports I've seen) this also affects parameters written by upsrw (e.g. battery.charge.low, battery.runtime.low, etc...). |
I am also experiencing what appears to be the same issue with a CyberPower CP1500EPFCLCD, but only with one or two variables - input.voltage may possibly be very slightly incorrect, but output.voltage is definitely reported completely incorrectly. This in particular is the exact same issue as #581 and probably the same as #439 and likely the same as #815. |
Ditto to all above through #581 , #439 , #815 , and the note at https://networkupstools.org/ddl/Cyber_Power_Systems/CP1500PFCLCD.html , with my CP1500PFCLCD and its output.voltage reading hovering around 135 ~ 136 V in NUT packages version 2.7.4, even though a kill-a-watt taking output measurements reads 119.6 ~ 120 V. Hope the patched HID descriptor helps in future versions or a patch to this one. Thanks! |
Has there been any progress on this? How would one start to help resolving this? |
@clepple I would like to work on it. I was thinking about following solution
It is simplified version. final version should check product id or product name to apply fix only to specific devices. If there are multiple values stored in one report, then we need to use type and offset The main downside of this solution is that it requires hardcoding all of these fixes. |
I am having the same problem. How is this coming along? |
PR #2718 is presumed to fix the broken CPS input/output voltage reports discussed in this issue. Earlier PR #1245 is presumed to have fixed the broken CPS transfer voltage reports discussed in #439 in more detail. Generally speaking, a series of improvements made in NUT v2.8.0 up till (upcoming) v2.8.3 have made possible the detection of presumed invalid encodings for LogMin/LogMax values, as well as mitigation in form of There is an idea floating around to devise a way for such fixes to be in external files, so users might apply them without recompiling a new NUT version. In that regard, DMF comes to mind as the transport. I hope to mainstream it as part of NUT v2.8.4, and it would deliver the core logic of loadable mapping tables and LUA scripted functions, and one example of applied logic for SNMP mappings with a leaner driver binary and a separate collection of XML files for the mapping data. The next stop was expected to be USB or QX mappings, as those codebases are mostly structured to easily plug this approach into them. I don't know how welcoming it would be to something as low-level'ish (and maybe performance critical in a loop) as investigation and tweak of every report descriptor, but we'd have a chance to at least experiment with that. Not closing this issue, so we have an anchor for future development in this area. |
Many UPSes have bugs in their HID Report Descriptors, and it can be hard to work around them without peppering the HID code with special cases. What we need is a way to match a known buggy HID descriptor, and swap it out for a patched one.
The text was updated successfully, but these errors were encountered: