DualSense over Bluetooth is detected as USB: d-pad Up stuck, buttons scrambled #173

Closed
opened 2026-11-30 20:04:22 +00:00 by github-bot · 0 comments
Owner

@⁠leonyarov on GitHub · 2026-11-30 20:00 UTC · original

Summary

A DualSense on Bluetooth gets bt=false from the raw-HID pad code (VICTORY_HID_PADS, PR #59). The pad is never switched to its full Bluetooth report. Its simple 0x01 report is then parsed with the USB layout. The sticks work, but every button and trigger is read from the wrong byte. The worst symptom is d-pad Up held all the time.

Environment

  • Launcher 0.8.2.0, source at 7281175102
  • Windows 11 (build 26300)
  • DualSense (054c:0ce6) on Bluetooth, no DS4Windows/HidHide running, Steam running but not handling the pad
  • VICTORY_HID_PADS at its default (on); no XInput pad connected

Log

INFO victory_hle::modules::gameinput::hid::devices: a Sony pad on raw HID path=\\?\hid#{00001124-0000-1000-8000-00805f9b34fb}_vid&0002054c_pid&0ce6#...#{4d1e55b2-f16f-11cf-88cb-001111000030} kind=DualSense bt=false

Root cause

  1. Bluetooth detection (hid.rs#L403): path.to_uppercase().contains("BTHENUM") never matches. On Windows, a Bluetooth pad's HID interface path is \\?\hid#{00001124-0000-1000-8000-00805f9b34fb}_vid&0002054c_pid&... (the Bluetooth HID service UUID). BTHENUM appears only in the parent device's instance id. As a result, the feature read and the init output report are skipped, and the pad stays in simple mode.
  2. Parse (hid.rs#L143): 0x01 if data.len() >= 64 is supposed to mean USB, but length can't tell the two apart. Windows returns every input report padded to the device's InputReportByteLength, which is 78 for a Bluetooth DualSense. So the 10-byte Bluetooth simple report (id lx ly rx ry b0 b1 b2 l2 r2) passes the check and is read with USB offsets.
  3. Rumble: with bt=false, the USB output report 0x02 is sent to a Bluetooth pad, so there is no rumble.

Raw reports read from the pad (read-only, before anything switched it):

id=0x01 len=78 bytes=01-7D-7C-7D-81-08-00-28-00-00-00-00-00-CC

After a HidD_GetFeature(0x05) the same pad sends 0x31, and the existing 0x31 branch reads it correctly:

id=0x31 len=78 bytes=31-41-7E-7C-7D-81-00-00-01-08-00-00-00-19

What the misread does (simple report read with USB offsets)

Byte read as Actually is Effect
left trigger b0 (hat + face buttons) at rest LT = 0x08 (~3%); □ ✕ ○ △ give LT ~9/16/28/53% instead of buttons
right trigger b1 (L1 R1 Create Options L3 R3) these give partial RT (R3 = 50%)
b0 (hat + face) L2 analog L2 = 0 at rest → hat(0) = d-pad Up always held; squeezing L2 cycles d-pad directions and face buttons
b1 R2 analog squeezing R2 toggles LB/RB/View/Menu/stick clicks
b2 padding (0) touchpad click lost

Suggested fix

// open(): a Bluetooth HID path carries the Bluetooth HID service UUID, not BTHENUM.
let lower = path.to_ascii_lowercase();
let bt = lower.contains("bthenum") || lower.contains("{00001124-0000-1000-8000-00805f9b34fb}");

Also pass bt into parse. Take the 0x01 USB branch only when !bt. On Bluetooth, read 0x01 as the simple report (sticks at 1..5, buttons at 5/6/7, L2/R2 at 8/9), or drop it until the 0x31 reports start. A unit test with a 78-byte, zero-padded Bluetooth 0x01 report would cover this. A DualShock 4 on Bluetooth probably goes through the same misdetection (not tested).

Workarounds until fixed

  • Connect the pad by USB cable, or
  • Read feature report 0x05 from the pad once after it connects (any tool that calls HidD_GetFeature). The pad then sends 0x31 until it is turned off, and Foxhound reads it correctly. Rumble still doesn't work over Bluetooth.
**@⁠leonyarov** on GitHub · 2026-11-30 20:00 UTC · [original](https://github.com/readmet3xt-lab/foxhound/issues/173) ### Summary A DualSense on Bluetooth gets `bt=false` from the raw-HID pad code (`VICTORY_HID_PADS`, PR #59). The pad is never switched to its full Bluetooth report. Its simple `0x01` report is then parsed with the USB layout. The sticks work, but every button and trigger is read from the wrong byte. The worst symptom is d-pad Up held all the time. ### Environment - Launcher 0.8.2.0, source at 7281175102a5c5347380e3fb550962dfe6b73986 - Windows 11 (build 26300) - DualSense (`054c:0ce6`) on Bluetooth, no DS4Windows/HidHide running, Steam running but not handling the pad - `VICTORY_HID_PADS` at its default (on); no XInput pad connected ### Log ``` INFO victory_hle::modules::gameinput::hid::devices: a Sony pad on raw HID path=\\?\hid#{00001124-0000-1000-8000-00805f9b34fb}_vid&0002054c_pid&0ce6#...#{4d1e55b2-f16f-11cf-88cb-001111000030} kind=DualSense bt=false ``` ### Root cause 1. **Bluetooth detection** ([hid.rs#L403](https://github.com/readmet3xt-lab/foxhound/blob/7281175102a5c5347380e3fb550962dfe6b73986/crates/victory-hle/src/modules/gameinput/hid.rs#L403)): `path.to_uppercase().contains("BTHENUM")` never matches. On Windows, a Bluetooth pad's HID interface path is `\\?\hid#{00001124-0000-1000-8000-00805f9b34fb}_vid&0002054c_pid&...` (the Bluetooth HID service UUID). `BTHENUM` appears only in the parent device's instance id. As a result, the feature read and the init output report are skipped, and the pad stays in simple mode. 2. **Parse** ([hid.rs#L143](https://github.com/readmet3xt-lab/foxhound/blob/7281175102a5c5347380e3fb550962dfe6b73986/crates/victory-hle/src/modules/gameinput/hid.rs#L143)): `0x01 if data.len() >= 64` is supposed to mean USB, but length can't tell the two apart. Windows returns every input report padded to the device's `InputReportByteLength`, which is 78 for a Bluetooth DualSense. So the 10-byte Bluetooth simple report (`id lx ly rx ry b0 b1 b2 l2 r2`) passes the check and is read with USB offsets. 3. **Rumble:** with `bt=false`, the USB output report `0x02` is sent to a Bluetooth pad, so there is no rumble. Raw reports read from the pad (read-only, before anything switched it): ``` id=0x01 len=78 bytes=01-7D-7C-7D-81-08-00-28-00-00-00-00-00-CC ``` After a `HidD_GetFeature(0x05)` the same pad sends `0x31`, and the existing `0x31` branch reads it correctly: ``` id=0x31 len=78 bytes=31-41-7E-7C-7D-81-00-00-01-08-00-00-00-19 ``` ### What the misread does (simple report read with USB offsets) | Byte read as | Actually is | Effect | |---|---|---| | left trigger | b0 (hat + face buttons) | at rest LT = 0x08 (~3%); □ ✕ ○ △ give LT ~9/16/28/53% instead of buttons | | right trigger | b1 (L1 R1 Create Options L3 R3) | these give partial RT (R3 = 50%) | | b0 (hat + face) | L2 analog | L2 = 0 at rest → `hat(0)` = **d-pad Up always held**; squeezing L2 cycles d-pad directions and face buttons | | b1 | R2 analog | squeezing R2 toggles LB/RB/View/Menu/stick clicks | | b2 | padding (0) | touchpad click lost | ### Suggested fix ```rust // open(): a Bluetooth HID path carries the Bluetooth HID service UUID, not BTHENUM. let lower = path.to_ascii_lowercase(); let bt = lower.contains("bthenum") || lower.contains("{00001124-0000-1000-8000-00805f9b34fb}"); ``` Also pass `bt` into `parse`. Take the `0x01` USB branch only when `!bt`. On Bluetooth, read `0x01` as the simple report (sticks at 1..5, buttons at 5/6/7, L2/R2 at 8/9), or drop it until the `0x31` reports start. A unit test with a 78-byte, zero-padded Bluetooth `0x01` report would cover this. A DualShock 4 on Bluetooth probably goes through the same misdetection (not tested). ### Workarounds until fixed - Connect the pad by USB cable, or - Read feature report `0x05` from the pad once after it connects (any tool that calls `HidD_GetFeature`). The pad then sends `0x31` until it is turned off, and Foxhound reads it correctly. Rumble still doesn't work over Bluetooth.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 20:04:22 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.