fix: claim a silent verified pad instead of failing the Direct probe - #158
Merged
Conversation
The attach probe treated ~320ms of endpoint silence as proof the chosen parser was wrong and released the device to the framework. That held because every verified table entry streams reports at rest. Event-driven pads like the Amazon Luna Controller (wired USB, 1949:041A) send nothing until a control changes, so a Direct claim on an idle pad always failed, and with the model on the verified fast lane (#153) the plug-in auto-claim would fail the same way. The probe now reports three outcomes instead of a bool. A decoded report, or a recognized wireless link event, claims at any trust level. Traffic that never decodes always releases, since bytes in the wrong shape are positive evidence of a wrong parser. Pure silence claims only a model in the hardware-verified kKnown table; imported and descriptor-sniffed models still require a decoded report because the probe is their only verification. This mirrors the reference stacks for this device class: the Linux xpad driver (5.13+) and SDL both classify the Luna by ID alone, are event-driven end to end, and have no idle-traffic requirement or wake packet. The steady-state poll loop is already silence-tolerant (interrupt URBs stay pending until data arrives), so a claimed idle pad is healthy. Behavior for every currently verified model is unchanged.
15 tasks
MichaelWilsonSNC
added a commit
to MichaelWilsonSNC/dish-android
that referenced
this pull request
Aug 16, 2026
…rNorth#158 (tri-state Direct probe)
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.
Description
The USB Direct attach probe treated ~320ms of endpoint silence as proof the chosen parser was wrong and released the device back to the framework. That assumption held for every current verified table entry because wired XInput-class pads stream reports at rest. The Amazon Luna Controller (wired USB,
1949:041A, #153) is event-driven: it sends nothing until a button, stick, or trigger changes, so switching an idle Luna to Direct failed unless the user happened to be moving a stick during the probe window, and putting the model on the verified fast lane would make the plug-in auto-claim fail the same way.probeEndpoint(wasprobeDecodable) now distinguishes three outcomes, andprobePermitsClaiminusb_parsersdecides per trust level:kKnowntable. Imported and descriptor-sniffed models still require a decoded report, because for them the probe is the only verification.This mirrors what the reference stacks do with this device class: the Linux xpad driver (5.13+) and SDL both classify the Luna by ID alone and are event-driven end to end, with no idle-traffic requirement. Neither has a wake or init packet we could send instead; none exists for this protocol family.
The steady-state poll loop is already silence-tolerant (interrupt URBs stay pending until data arrives; only ENODEV exits), so a claimed idle pad is healthy. Behavior for every currently verified model is unchanged, since they all stream at rest.
Prepares for #153, which puts the Luna on the verified fast lane.
Type of Change
How Has This Been Tested?
Native host suite 321/321 passing, including three new
ProbeRulecases covering the outcome/trust truth table.:app:externalNativeBuildDebugcompiles clean on both ABIs. clang-format 22.1.4 clean on all touched files.Hardware verification on an actual Luna is requested in #153 from @MichaelWilsonSNC, who has the device: idle plug-in auto-claim, idle Standard-to-Direct toggle, and toggle while active.
Checklist
CHANGELOG.md)