-
Notifications
You must be signed in to change notification settings - Fork 18
Dualsense edge emulation for BLE-CompositeHID #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
adapted code from hhd and other sources to the CompositeHID library.
Created Dualsense_Edge_Controller.ino with various serial commands for testing
Added emulated dualsense features
Missed some cleanup, added more detailed text for serial driven testing of individual inputs.
Better handling of reports not intended for LED. Might move all that code to it's own event as part of the library after the fact, for now it works in the sketch.
Removed a couple of macros I was previously trying for assigning values to the nimbledevice config, those files are unmodified in this branch so it doesn't make sense to keep them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds DualSense Edge controller emulation support to the BLE-CompositeHID library, enabling gyro, touchpad, LED control, and additional buttons (L4/R4/L5/R5 paddles plus mute) beyond the standard DualSense controller. The implementation includes a complete example sketch demonstrating all features.
Key Changes
- Full DualSense Edge controller emulation with gyroscope, accelerometer, and touchpad support
- LED control including player LEDs, mute LED, and RGB lightbar
- Support for 4 additional paddle buttons (L4, R4, L5, R5) and a mute button not present on standard DualSense controllers
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/dualsenseExamples/Dualsense_Edge_Controller/Dualsense_Edge_Controller.ino | Complete example sketch demonstrating all DualSense Edge features with interactive testing menu |
| README.md | Documentation update listing DualSense Edge gamepad features and capabilities |
| DualsenseGamepadDevice.h | Header defining device interface, button/input constants, data structures, and callbacks |
| DualsenseGamepadConfiguration.h | Configuration classes for device setup and host configuration |
| DualsenseDescriptors.h | HID descriptors, vendor/product IDs, calibration data, and firmware info for DualSense Edge |
| DualsenseGamepadConfigurations.cpp | Implementation of configuration methods for host setup and report generation |
| DualSenseGamepadDevice.cpp | Core device implementation with input handling, CRC calculation, and BLE report transmission |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - [ ] LED support (pull requests welcome) | ||
|
|
||
| ## Dualsense Edge gamepad features | ||
| - [x] All buttons and joystick axes available, including 4 extra buttons (paddles1-2 and fn1-2) mute and touchpad |
Copilot
AI
Dec 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in spacing: "paddles1-2" should use consistent formatting like "paddles 1-2" or "paddles 1 and 2" to match the style of "fn1-2" in the same line.
| - [x] All buttons and joystick axes available, including 4 extra buttons (paddles1-2 and fn1-2) mute and touchpad | |
| - [x] All buttons and joystick axes available, including 4 extra buttons (paddles 1-2 and fn1-2) mute and touchpad |
examples/dualsenseExamples/Dualsense_Edge_Controller/Dualsense_Edge_Controller.ino
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
This looks to be a very nice PR, thanks @YeaSeb ... Would be nice to have an LED / Rumble example too. I might use some of this to work on lemmingDev#43 @YeaSeb keep up the awesome work! |
|
@YeaSeb Getting "An unknown item was found in the report descriptor " when attempting to connect to the example sketch using a Lolin ESP32 S3 Pro on Windows 11. I'll try it on Linux as well to verify. |
… connections to windows
YeaSeb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm, tried this on a windows VM and steam was able to recognize the controller. It seems like this hasn't affected linux functionality at all.
This enables gyro, touchpad and led support all under the same HID device.
It also adds 4 additional buttons: Fn1 (L4), Fn2 (R4), Lb (L5), Rb(R5) that the original dualsense doesn't have, as well as a mute button.
I took code and references from many sources, like from hhd, bluetoothHID, gp2040-ce and the linux kernel.
Everything I tested works but I haven't tested possibly everything in here, some button masks as well as output report mappings might be wrong. Also, I only tested this code on linux, so more testing is needed and captures are welcome.
I recommend erasing flash for flashing this, I discovered some reliability Issues if I didn't sometimes.