Skip to content

fix(hid): read the Tt eSPORTS Iris config reports - #60

Merged
snekxs merged 2 commits into
OpenMouse-Project:mainfrom
kagaminehaku:fix/thermaltake-feature-reads
Nov 12, 2026
Merged

snekxs merged 2 commits into
OpenMouse-Project:mainfrom
kagaminehaku:fix/thermaltake-feature-reads

Conversation

@kagaminehaku

@kagaminehaku kagaminehaku commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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 build --release succeeds (x86_64-pc-windows-gnu).
  • 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.

Macroscope summarized 2b7be34.

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility with Thermaltake devices when receiving feature reports that do not have a declared size.
    • Thermaltake devices can now use a fallback report size in this case, helping report reception work more reliably.
    • Other device handling remains unchanged.

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.
@github-actions github-actions Bot added type: bug PR title category: bug area: native Native bridge and platform services labels Oct 30, 2026
@github-actions github-actions Bot added the area: devices HID access and device drivers label Oct 30, 2026
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Explain Change →

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.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: snekxs

Merge Risk: Minimal · up to 2b7be

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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

Commits

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.

@macroscopeapp

macroscopeapp Bot commented Oct 30, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved at 0c519c3

Macroscope's review found this PR approvable — Adds a bounded feature-report read fallback for Thermaltake devices whose descriptors omit report sizes, enabling Iris configuration reads. Existing declared sizes and report-write behavior are unchanged.

Notes:

  • The correctness review was unavailable. Eligibility was assessed without its result.
  • Your repo's Minimum Blocking Severity is Off, so correctness findings do not automatically block approval.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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.


Review info
Run configuration
Commits

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.

HighestFidelity added a commit to HighestFidelity/OpenMouse-Bridge that referenced this pull request Nov 12, 2026
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>
@snekxs
snekxs merged commit 49fa3f8 into OpenMouse-Project:main Nov 12, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: devices HID access and device drivers area: native Native bridge and platform services type: bug PR title category: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants