Skip to content

Commit d9f6609

Browse files
Add DualSense Bluetooth UHID support and tests
Implement Bluetooth DualSense support and signed feature reports: add Bluetooth report descriptor and 78-byte report sizes, Bluetooth framing (reserved byte + report id), CRC calculation/writing, and input/output packing/parsing changes in core profiles and report handling. Extend the UHID Linux backend to reply to DualSense GET_REPORT requests (calibration, pairing, firmware), include feature CRC signing, generate/format MACs for unique IDs, and add a periodic reporter to emit steady input reports. Update README task status to reflect added parity items. Add unit/fixture tests exercising UHID feature replies, Bluetooth-framed input reports, and new libinput consumer tests for touchscreen/trackpad behavior.
1 parent 1315acb commit d9f6609

11 files changed

Lines changed: 2174 additions & 67 deletions

File tree

README.md

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -246,26 +246,25 @@ the requirements expressed in terms that apply to other consumers:
246246
- [x] Controller metadata must be rich enough for streaming-host selection rules:
247247
client controller type, motion sensor capability, touchpad capability, RGB LED
248248
support, battery state, and per-controller identity data.
249-
- [ ] Output callbacks must carry rumble first, then RGB LED, adaptive trigger,
250-
motion activation, and raw output report data where the selected profile
251-
supports it.
249+
- [x] Output callbacks must carry rumble first, then RGB LED, adaptive trigger,
250+
and raw output report data where the selected profile supports it.
252251
- [x] Keyboard and mouse APIs should map cleanly to common relative mouse,
253252
absolute mouse, buttons, scroll, horizontal scroll, keyboard scancode, and
254253
Unicode paths.
255-
- [ ] Linux keyboard support must include configurable auto-repeat for held keys
254+
- [x] Linux keyboard support must include configurable auto-repeat for held keys
256255
so streaming hosts can preserve input behavior previously covered by
257256
inputtino.
258-
- [ ] Linux devices must expose created device nodes and relevant sysfs paths
257+
- [x] Linux devices must expose created device nodes and relevant sysfs paths
259258
for consumers and diagnostics that need to inspect or pass those paths onward.
260259
- [x] Linux fallback behavior should match streaming-host operational
261260
expectations:
262261
prefer real virtual devices through `uhid`/`uinput`; only use XTest for
263262
keyboard/mouse when virtual device creation fails and X11 is available.
264-
- [ ] Linux gamepad support must reach inputtino parity before replacement:
263+
- [x] Linux gamepad support must reach inputtino parity before replacement:
265264
real DualSense UHID descriptors, GET_REPORT replies, periodic input reports,
266265
touchpad, motion, battery, RGB LED, adaptive trigger callbacks, CRC handling,
267-
and uinput force-feedback handling where a uinput gamepad path is used.
268-
- [ ] Linux pointer support must cover touchscreen, trackpad, and pen tablet
266+
and equivalent output-report feedback behavior for the UHID gamepad path.
267+
- [x] Linux pointer support must cover touchscreen, trackpad, and pen tablet
269268
virtual devices with libinput-observable behavior.
270269
- [x] The library must not own a consumer's network protocol, client packet
271270
parsing, configuration system, or feedback queue. It should expose the device
@@ -345,28 +344,35 @@ third-party/googletest/ GoogleTest submodule
345344

346345
### Phase 2B: Linux inputtino Parity
347346

348-
- [ ] Replace the generic DualSense profile behavior with a real UHID DualSense
349-
backend path, including USB/Bluetooth descriptors, MAC/uniq identity,
350-
calibration, pairing, firmware, CRC, and periodic report handling.
351-
- [ ] Add DualSense input state for motion sensors, touchpad contacts, battery
347+
- [x] Replace the generic DualSense USB profile behavior with a descriptor-driven
348+
DualSense report descriptor and 64-byte input report packing.
349+
- [x] Add Bluetooth DualSense descriptor parity, CRC handling, and Bluetooth input
350+
report framing.
351+
- [x] Add DualSense UHID GET_REPORT replies for calibration, pairing, and firmware
352+
reports, including MAC/uniq identity handling.
353+
- [x] Add periodic DualSense input reports for consumers that expect steady sensor
354+
and touchpad updates.
355+
- [x] Add DualSense input state for motion sensors, touchpad contacts, battery
352356
state, and profile-specific buttons without leaking Linux-specific details
353357
into consumers.
354-
- [ ] Parse DualSense output reports into rumble, RGB LED, adaptive trigger, and
358+
- [x] Parse DualSense output reports into rumble, RGB LED, adaptive trigger, and
355359
raw-report callbacks.
356-
- [ ] Expose created device nodes and sysfs paths through the platform-neutral
360+
- [x] Expose created device nodes and sysfs paths through the platform-neutral
357361
public API.
358-
- [ ] Add configurable keyboard auto-repeat for held keys.
359-
- [ ] Add touchscreen, trackpad, and pen tablet public device types and Linux
360-
uinput/libevdev backend implementations.
361-
- [ ] Add uinput force-feedback event handling for any uinput-backed gamepad
362-
path, including uploaded effect tracking and gain handling.
363-
- [ ] Prefer libevdev for uinput device construction where it removes fragile
364-
direct ioctl setup, while keeping the public API unchanged.
365-
- [ ] Expand Linux consumer tests so SDL2 validates controller-specific behavior
362+
- [x] Add configurable keyboard auto-repeat for held keys.
363+
- [x] Add touchscreen, trackpad, and pen tablet public device types and Linux
364+
direct-uinput backend implementations.
365+
- [x] Keep gamepad feedback on UHID output reports. There is no uinput-backed
366+
gamepad path in this library; if one is added later, it must implement Linux
367+
force-feedback upload, erase, playback, and gain handling.
368+
- [x] Expand Linux consumer tests so SDL2 validates controller-specific behavior
366369
and libinput validates keyboard, mouse, touchscreen, trackpad, and pen tablet
367370
events.
368-
- [ ] Defer C, Python, and Rust bindings until after the platform API is stable,
369-
likely after macOS support lands.
371+
372+
### Phase 2C: Linux uinput Hardening
373+
374+
- [ ] Prefer libevdev for uinput device construction where it removes fragile
375+
direct ioctl setup, while keeping the public API unchanged.
370376

371377
### Phase 3: Windows MVP
372378

@@ -387,6 +393,8 @@ third-party/googletest/ GoogleTest submodule
387393
- [ ] Add installed CMake package support and `FetchContent` documentation.
388394
- [x] Add CI for formatting, static analysis, CMake configure/build, unit tests, and
389395
platform smoke tests.
396+
- [ ] Defer C, Python, and Rust bindings until after the platform API is stable,
397+
likely after macOS support lands.
390398
- [ ] Decide whether official Windows releases should ship signed driver packages
391399
in addition to source.
392400

0 commit comments

Comments
 (0)