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

CPS HID: Many unknown readings #2729

Open
jimklimov opened this issue Dec 18, 2024 · 0 comments
Open

CPS HID: Many unknown readings #2729

jimklimov opened this issue Dec 18, 2024 · 0 comments
Labels
CyberPower (CPS) Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) USB
Milestone

Comments

@jimklimov
Copy link
Member

Offloading from #2718 (comment) :

There are quite a few entries (for different Reports) in https://github.com/user-attachments/files/18149734/usbhid-ups_DDDDDD_d1_a_ups.txt.gz like:

   0.030167	[D4] Entering libusb_get_report
   0.030435	[D2] nut_libusb_get_report: Overflow
   0.030456	[D1] Can't retrieve Report 2d: Success
   0.030469	[D5] hid_lookup_path: 00840004 -> UPS
   0.030482	[D5] hid_lookup_path: ff01001d -> not found in lookup table
   0.030494	[D5] hid_lookup_path: ff01001b -> not found in lookup table
   0.030506	[D5] hid_lookup_path: ff01001f -> not found in lookup table
   0.030518	[D1] Path: UPS.ff01001d.ff01001b.ff01001f, Type: Feature, ReportID: 0x2d, Offset: 2, Size: 1

or in #1973 (comment) like:

   0.233154     [D1] Can't retrieve Report 29: Value too large for defined data type
   0.233264     [D1] Path: UPS.ff01001d.ff01001b.ff010017, Type: Output, ReportID: 0x29, Offset: 8, Size: 8
   0.239493     [D2] libusb_get_report: error sending control message: Value too large for defined data type
   0.239632     [D1] Can't retrieve Report 2d: Value too large for defined data type
   0.239748     [D1] Path: UPS.ff01001d.ff01001b.ff010010, Type: Feature, ReportID: 0x2d, Offset: 0, Size: 1
   0.240556     [D2] libusb_get_report: error sending control message: Value too large for defined data type

...where on one hand, we do not even know the mapping of numeric HID path components to their logical roles/names, and on another - something overflows. I did not investigate what happens, but we might expect a number by default and get a string (too large for a buffer) or something else - just guessing based on it being an unknown report, and that we SETINFO strings (mfr, model, etc.) just after those.

Also more specifically about string fetches (which I think #2604 should have solved, unless this dialog is broken in some other way):

   0.032835	[D2] Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 4
   0.033137	[D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.084018	[D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.134874	[D2] nut_libusb_get_string: Overflow
   0.134914	[D5] send_to_all: SETINFO battery.type ""
...

   0.135121	[D2] Path: UPS.PowerSummary.iOEMInformation, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 3
   0.136103	[D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.187014	[D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.237877	[D2] nut_libusb_get_string: Overflow
   0.237918	[D5] send_to_all: SETINFO battery.mfr.date ""
@jimklimov jimklimov added CyberPower (CPS) USB Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) labels Dec 18, 2024
@jimklimov jimklimov added this to the 2.8.4 milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CyberPower (CPS) Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) USB
Projects
None yet
Development

No branches or pull requests

1 participant