You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(hid): read the Tt eSPORTS Iris config reports - #60
Lets the control panel read the Tt eSPORTS Iris Optical RGB (264a:1019, also sold as a Hatsune Miku Edition) through Bridge.
Why
The Iris keeps its settings behind a config collection (interface 1, LED page 0x08 usage 0x4B) whose 2052-byte feature reports 0x0C and 0x05 are made of constant items only. Windows reports no caps for it, so the descriptor hidapi rebuilds declares none of those reports. send_report already falls back to every path for an undeclared report, but receive_feature_report skips paths that do not declare it, and only Razer and Microsoft have a fallback buffer, so every read failed with "feature report 12 is not declared by this interface".
This adds the same kind of fallback for vendor 0x264A: a 2053-byte buffer (report id plus 2052 bytes).
Tested on hardware
Windows 10, Iris Optical RGB Hatsune Miku Edition (firmware byte 0x80), this branch built with cargo build --release, driven by the Thermaltake driver from OpenMouse-Project/mouse-protocol#269 in the control panel:
Before: every receiveFeatureReport on the config collection failed as above.
After: firmware, active profile and all five profile blocks read with valid checksums; polling rate, DPI stages, active stage, stage count, debounce, angle snapping and profile switching were written and read back; the original profile block was then restored byte for byte.
Checks
rustfmt --edition 2024 --check src/hid.rs is clean.
cargo test and cargo clippy were not run locally; the change is one constant pair and one match arm next to the existing Razer and Microsoft ones.
Note
Add Thermaltake 2053-byte fallback for HID feature-report reads
Adds the Thermaltake (Tt eSPORTS) vendor ID and a 2053-byte feature-report buffer constant in hid.rs. When a device path cannot provide a feature-report buffer length, HidSession now uses this constant for Thermaltake devices. The buffer size includes the report-ID byte, matching the Iris config report descriptor on Windows.
The Iris (264a:1019) config collection declares only constant items, so
Windows reports no caps for it and hidapi's rebuilt descriptor declares
none of its 2052-byte feature reports. Sending already falls back to
every path; reading refused the report. Give vendor 0x264a a fallback
read buffer of 2053 bytes, as Razer and Microsoft already have.
No actionable comments were generated in the recent review.
Walkthrough
The change adds the Thermaltake vendor ID and a 2053-byte feature-report buffer size. For an undeclared report from a Thermaltake device, receive_feature_report uses that buffer size. Other vendor fallback behavior remains unchanged.
Changes: Thermaltake feature reports
Layer / File(s)
Summary
Thermaltake buffer fallback src/hid.rs
The code defines the Thermaltake vendor ID and a 2053-byte feature-report buffer size. When receive_feature_report encounters an undeclared report from a Thermaltake device, it uses that buffer size.
This adds support for reading the Tt eSPORTS Iris configuration reports, and it was tested on real hardware on Windows. No concrete merge-blocking risk was established.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: a fix in the hid module that lets the control panel read configuration reports from the Tt eSPORTS Iris. The raw summary describes a Thermaltake vendor ID and a 2053-b…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a fix in the hid module that lets the control panel read configuration reports from the Tt eSPORTS Iris. The raw summary describes a Thermaltake vendor ID and a 2053-byte fallback feature-report buffer, which is the mechanism behind that fix. The title is specific and matches the PR objectives, so it passes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 0c519c3 and 2b7be34.
Files selected for processing: 1
src/hid.rs
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
src/hid.rs-1045-1045: 1
1045-1045: Minor · Potential issue · Heavy lift
Unverified finding
We couldn't verify this from the code. It is shown for review, not as a verified issue.
The vendor-wide fallback attempts an undeclared report on every open Thermaltake path, and receive_feature_report returns the first successful response without checking that it came from the Iris configuration collection. Another collection may therefore supply the response.
The caller receives incorrect configuration data despite the correct path being available.
This can occur when: A grouped Iris device has multiple open collections, and a non-config path returns a successful empty, short, or unrelated response before the config path is tried.
Reviewing files that changed from the base of the PR and between 30a3290 and 0c519c3.
Files selected for processing: 1
src/hid.rs
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
The Iris config collection holds only constant items, so Windows gives it
no caps and hidapi's rebuilt descriptor declares none of its 2052-byte
feature reports; every read failed as undeclared. Thermaltake 0x264A now
falls back to a 2053-byte buffer, next to the Razer and Microsoft arms.
The fallback arms moved into undeclared_feature_buffer_len() with a test.
The FIDO path block and reader identity check are unchanged.
Ported from OpenMouse-Project#60 by kagaminehaku
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
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.
Lets the control panel read the Tt eSPORTS Iris Optical RGB (
264a:1019, also sold as a Hatsune Miku Edition) through Bridge.Why
The Iris keeps its settings behind a config collection (interface 1, LED page
0x08usage0x4B) whose 2052-byte feature reports0x0Cand0x05are made of constant items only. Windows reports no caps for it, so the descriptor hidapi rebuilds declares none of those reports.send_reportalready falls back to every path for an undeclared report, butreceive_feature_reportskips paths that do not declare it, and only Razer and Microsoft have a fallback buffer, so every read failed with "feature report 12 is not declared by this interface".This adds the same kind of fallback for vendor
0x264A: a 2053-byte buffer (report id plus 2052 bytes).Tested on hardware
Windows 10, Iris Optical RGB Hatsune Miku Edition (firmware byte
0x80), this branch built withcargo build --release, driven by the Thermaltake driver from OpenMouse-Project/mouse-protocol#269 in the control panel:receiveFeatureReporton the config collection failed as above.Checks
rustfmt --edition 2024 --check src/hid.rsis clean.cargo build --releasesucceeds (x86_64-pc-windows-gnu).cargo testandcargo clippywere not run locally; the change is one constant pair and one match arm next to the existing Razer and Microsoft ones.Note
Add Thermaltake 2053-byte fallback for HID feature-report reads
Adds the Thermaltake (Tt eSPORTS) vendor ID and a 2053-byte feature-report buffer constant in hid.rs. When a device path cannot provide a feature-report buffer length,
HidSessionnow uses this constant for Thermaltake devices. The buffer size includes the report-ID byte, matching the Iris config report descriptor on Windows.Macroscope summarized 2b7be34.
Summary by CodeRabbit