Skip to content

ADD: Dualsense output report over bluetooth#2436

Draft
MorganHoarau wants to merge 11 commits into
developfrom
fix/isxb-1477/dualsense-no-output-over-bt
Draft

ADD: Dualsense output report over bluetooth#2436
MorganHoarau wants to merge 11 commits into
developfrom
fix/isxb-1477/dualsense-no-output-over-bt

Conversation

@MorganHoarau

@MorganHoarau MorganHoarau commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Description

ISXB-1477

The Input System always sent the USB output report (ID 0x02) to DualSense controllers regardless of transport (USB or BlueTooth).

Complication: Over Bluetooth the controller expects a different output report (ID 0x31, 78 bytes, CRC32-trailed). Sending the USB report over Bluetooth produced garbage output (significant FPS drops, no rumble) and the light bar could not be driven.

Resolution:

  • Route output to USB (0x02 / 48 B) or Bluetooth (0x31 / 78 B with computed CRC32) based on the detected transport.
  • Detect Bluetooth from the input stream (reportId=0x01 size 78 "simple mode", or 0x31) — the HID descriptor isn't populated at FinishSetup on Windows.
  • Use fixed wire report sizes instead of hidDescriptor.outputReportSize (returns the 547 B max across all vendor reports, causing oversized buffers to be rejected).
  • Gate the one-time Bluetooth light bar reset on a ~6 s window from controller detection so it never fires during the connection animation (which wedges the firmware); send the color after a short inter-report gap. Rumble stays responsive while the LED waits, and the latest requested color overwrites any pending one (no out-of-order / double send).

Depends on the engine-side Windows HID fix (https://github.cds.internal.unity3d.com/unity/unity/pull/110321). Related: ISX-2532, ISXB-787.

Testing status & QA

Manual, physical DualSense on Windows (Bluetooth + USB):

  • Bluetooth rumble and light bar verified, both fresh power-on and already-connected controllers.
  • Light bar reset correctly deferred past the connection animation, no firmware wedge, no app restart required.
  • USB rumble + light bar re-verified (USB output report size changed from outputReportSize to a fixed 48 B) - no regression.
  • No automated coverage: requires physical Bluetooth hardware.

No performance impact. The change removes the garbage-output path responsible for the FPS drop being fixed; steady-state output is one HID report per call, as before.

Overall Product Risks

Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.

  • Complexity: LOW - Scoped to the DualSense HID device. The Bluetooth path is additive; the USB path changed only in report sizing and was re-verified. Must land together with the paired engine-side native change.
  • Halo Effect: LOW - The shared SetMotorSpeedsAndLightBarColor / output path is DualSense-only; no effect on other devices.

Comments to reviewers

Please describe any additional information such as what to focus on, or historical info for the reviewers.

Documentation Impact

  • CHANGELOG.md
  • Documentation~/SupportedDevices.md: notes 5 and 11 updated (DualSense Bluetooth rumble/light bar now supported; light bar color persists after app exit).
  • IDualShockHaptics.SetLightBarColor: XMLDoc <remarks> noting color persistence.

I didn't found other doc page referencing the prior "unsupported over Bluetooth" limitation.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

@MorganHoarau

Copy link
Copy Markdown
Collaborator Author

Still WIP because it's a platform agnostic implementation. I'm waiting to receive a MacOS to test on different platform and make sure the native side is working properly.

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.

1 participant