Repository navigation
Description
For the longest time a common challenge with any HID driver that offloads work to HIDCLASS.SYS (and xinputhid.sys) is exchanging data with the device (driver) that is not defined in the report descriptor (e.g. custom feature requests, multiple collections and alike) and may cause compatibility issues.
A custom collection with multiple feature reports is not always possible; the XInput mode depends on a standard report descriptor that does not use Report IDs and therefore can not be modified without breaking compatibility.
We currently have a mixture of "reading from JSON" for data input and "writing to status properties" to fetch status, which works but is clunky, timing sensitive and gets verbose to extend and maintain fast.
I've started implementing a shared memory region in the driver that is accessible from any other user-mode application and acts as an IPC mechanism for pre-defined messages that get exchanged between app (client) and the driver in a HTTP-like request-response fashion. With this method, it does not matter which HID device mode is active; the data exchange bypasses the HID stack and happens via shared memory and synchronization objects (events, mutexes) and allows for write operations from non-elevated processes.
IPC use-cases
A collection of command ideas to use this mechanism with:
- On-demand Bluetooth pairing to any custom address (similar to the legacy "SIXAXIS Pair Tool") at any point during runtime
- Toggle volatile runtime settings (like alternate rumble switching)
- Allow any non-HID app to read the raw unmodified HID input report
- Allow any non-HID app to update LEDs and send rumble commands
- Allows for overriding the XInput player ID with whatever value matches best
-
Allow any non-HID app to submit custom USB control requests (great for motion calibration R&D) - Allow for any app to send pairing requests to arbitrary MAC addresses (to offer the same feature as the old SixaxisPairTool)
Activity
nefarius commentedon Sep 5, 2026
Status update on the IPC work:
Elevation is gone (already on master). PR #431 dropped the old
OpenProcess/DuplicateHandlepath againstWUDFHost. The driver now publishes a named per-slot eventGlobal\DsHidMiniHidReportEvent{slot}with the same Authenticated-Users DACL as the other IPC objects, so a non-elevated client can open it withEventWaitHandle.OpenExistingand wait for reports.Raw input reports are now multi-consumer. The per-slot event is switching from auto-reset (one waiter wins) to manual-reset, and each HID slot carries a seqlock (
SequenceNumber: odd = write in progress, even = stable). Every waiting app is woken on the same report, readers retry on a torn snapshot, and disconnect zeros the slot then signals so blocked clients seeSlotIndex == 0instead of hanging until timeout. This is onfeat/ipc-multi-consumer-input-reports.Still open from the original checklist:
DSHM_IPC_MSG_CMD_DEVICE_SET_PLAYER_INDEXis wired end-to-end in the SDK, but the driver handler still returnsSTATUS_NOT_IMPLEMENTED)SetHostAddress/PAIR_TO)IPC remains gated behind the
IPCEnabledregistry value under the driver parameters key and is not in any released driver build yet. The SDK can now be packed in CI; publishingNefarius.DsHidMini.IPCto nuget.org is on-demand viasdk-v*tags and OIDC trusted publishing (publish-to-nuget.yml).nefarius commentedon Sep 9, 2026
Status update on the remaining IPC checklist:
Player index, rumble, and volatile alternate rumble are implemented on
feat/ipc-runtime-output-commands(PR #509).DSHM_IPC_MSG_CMD_DEVICE_SET_PLAYER_INDEXno longer returnsSTATUS_NOT_IMPLEMENTED. Slots 1–7 use the console LED combinations (5 = 1+4, 6 = 2+4, 7 = 3+4). Automatic LED authority is handed to the application so battery refreshes do not overwrite the slot; configured Driver authority returnsSTATUS_ACCESS_DENIED. The reply command tag was also corrected (SET_PLAYER_INDEXinstead ofPAIR_TO).SetRumble/DSHM_IPC_MSG_CMD_DEVICE_SET_RUMBLEsends motor strengths through the existing rescale, keep-alive, and Navigation-suppression path.SetAlternateRumbleMode/DSHM_IPC_MSG_CMD_DEVICE_SET_ALTERNATE_RUMBLE_MODEtogglesRumbleControlState.AltMode.IsEnabledonly (underOutputReport.Lock). JSON is not updated; a config hot-reload restores the file value.These controls are volatile and available to any non-elevated authenticated client, same as the other IPC objects. SDK APIs stay source-compatible for
SetPlayerIndex.Still open from the original checklist:
Pairing (
SetHostAddress/PAIR_TO) and multi-consumer raw input reports were already done. IPC remains gated behind theIPCEnabledregistry value under the driver parameters key and is not in any released driver build yet.