Skip to content

fix(windows): enumerate problem devices by USB enumerator, not setup class#1157

Merged
zackees merged 1 commit into
mainfrom
fix/1152-problem-device-enum
Jul 23, 2026
Merged

fix(windows): enumerate problem devices by USB enumerator, not setup class#1157
zackees merged 1 commit into
mainfrom
fix/1152-problem-device-enum

Conversation

@zackees

@zackees zackees commented Jul 23, 2026

Copy link
Copy Markdown
Member

Refs #1152 / meta #1149. The BOOTSEL PICOBOOT interface (driverless, CM_PROB_FAILED_INSTALL 28) has no Windows setup class, so the class-scoped SetupDi query never returned it and the daemon recovery composer could not target it. Enumerate by the USB enumerator with DIGCF_ALLCLASSES; instance-prefix and problem-code filters unchanged. Live-verified on the attached wedged board (serial 5303284720C4641C): the RP2 Boot node now appears in the port-scan diagnostic. Serial lib tests green; pinned-format clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of present USB devices with Windows-reported problems.
    • USB problem scans now include a broader set of connected device entries for more reliable results.

…class

present_usb_problem_devices() queried GUID_DEVCLASS_USB with
DIGCF_PRESENT, but a driverless devnode (the RP2040 BOOTSEL PICOBOOT
interface stuck at CM_PROB_FAILED_INSTALL 28) has no setup class and
was invisible — hiding exactly the problem interface the #1152 typed
recovery request must target. Enumerate by the USB enumerator with
DIGCF_ALLCLASSES instead; the existing instance-prefix filter and
problem-code gate are unchanged. Live-verified on the attached wedged
board: the RP2 Boot node (problem 28) now appears in the port-scan
diagnostic and in the recovery composer facts.

Refs #1152 #1149

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5671785d-3a4d-469b-9849-6ce5e2f02df1

📥 Commits

Reviewing files that changed from the base of the PR and between 9284e60 and 00e05a9.

📒 Files selected for processing (1)
  • crates/fbuild-serial/src/ports.rs

📝 Walkthrough

Walkthrough

The Windows USB problem-device scan now enumerates present devices through the "USB" enumerator with all device classes, replacing the USB device-class GUID query. Existing instance-ID and problem-code filtering remains in place.

Changes

Windows USB enumeration

Layer / File(s) Summary
USB problem-device scan
crates/fbuild-serial/src/ports.rs
The Windows SetupAPI call now uses the "USB" enumerator with `DIGCF_PRESENT

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

Possibly related PRs

  • FastLED/fbuild#1011: Both changes adjust Windows USB device enumeration and problem-device handling.
  • FastLED/fbuild#1150: Both changes modify Windows serial-port health enumeration in crates/fbuild-serial/src/ports.rs.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1152-problem-device-enum

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

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit d0255fe into main Jul 23, 2026
10 of 14 checks passed
@zackees
zackees deleted the fix/1152-problem-device-enum branch July 23, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant