Prefer complete HID descriptor for EcoFlow devices - #3568
Draft
user01010111 wants to merge 1 commit into
Draft
Conversation
Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit 09240dc is temporarily available: NUT-tarballs-PR-3568.zip. |
|
✅ Build nut 2.8.5.5050-master completed (commit bb0cb5ee01 by @)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
3746:ffffreport conflicting HID descriptor lengthsRoot cause
The tested River 3 Plus reports a 403-byte HID report descriptor when it is requested directly, while the HID descriptor embedded in the USB configuration advertises 376 bytes. NUT normally prefers the configuration value because that is correct for several other broken devices.
For this EcoFlow, using 376 bytes truncates the descriptor before the feature form of
ShutdownImminent, the input and feature forms ofCommunicationLostandOverload, and the closing collection records. The device does return all 403 bytes when asked for them.The exception is limited to EcoFlow's existing
3746:ffffVID/PID. Other devices keep the current ordering.Validation
usbhid-upsagainst libusb 1.0 from currentmastermake check -j4: 6 passed, 0 faileddrivers/libusb0.cwith the configured libusb 0.1 headers and-Werror3746:ffff,bcdDevice 1.00):CommunicationLost,Overload, and both forms ofShutdownImminentwere present and mappedOLstateActual overload and communication-loss conditions were not induced. This test confirms that the previously truncated status fields are now parsed and polled.
Relates to #2735.