Skip to content

Prefer complete HID descriptor for EcoFlow devices - #3568

Draft
user01010111 wants to merge 1 commit into
networkupstools:masterfrom
user01010111:fix/ecoflow-report-descriptor-length
Draft

Prefer complete HID descriptor for EcoFlow devices#3568
user01010111 wants to merge 1 commit into
networkupstools:masterfrom
user01010111:fix/ecoflow-report-descriptor-length

Conversation

@user01010111

Copy link
Copy Markdown

Summary

  • prefer the longer candidate when EcoFlow USB devices using 3746:ffff report conflicting HID descriptor lengths
  • retain the shorter candidate as a fallback if the longer read is rejected
  • apply the same behavior to the libusb 0.1 and libusb 1.0 backends
  • bump both USB transport versions and document the change in the 2.8.6 release notes

Root 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 of CommunicationLost and Overload, 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:ffff VID/PID. Other devices keep the current ordering.

Validation

  • built usbhid-ups against libusb 1.0 from current master
  • make check -j4: 6 passed, 0 failed
  • compiled drivers/libusb0.c with the configured libusb 0.1 headers and -Werror
  • tested one polling cycle on an EcoFlow River 3 Plus (3746:ffff, bcdDevice 1.00):
    • method 1: 403 bytes
    • method 2: 376 bytes
    • selected: 403 bytes
    • parsed items: 56, compared with 51 using the packaged driver
    • CommunicationLost, Overload, and both forms of ShutdownImminent were present and mapped
    • the test driver exited successfully and the packaged NUT service was restored in OL state

Actual 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.

Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

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.

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.5050-master completed (commit bb0cb5ee01 by @)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants