Skip to content

Conversation

@YeaSeb
Copy link

@YeaSeb YeaSeb commented Nov 24, 2025

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.

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
@YeaSeb YeaSeb marked this pull request as draft November 25, 2025 04:05
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
@YeaSeb YeaSeb marked this pull request as ready for review November 25, 2025 17:11
@Mystfit Mystfit self-assigned this Dec 25, 2025
@Mystfit Mystfit requested a review from Copilot December 25, 2025 19:53
Copy link

Copilot AI left a 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
Copy link

Copilot AI Dec 25, 2025

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.

Suggested change
- [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

Copilot uses AI. Check for mistakes.
Repository owner deleted a comment from Copilot AI Dec 25, 2025
@LeeNX
Copy link

LeeNX commented Dec 26, 2025

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!

@Mystfit
Copy link
Owner

Mystfit commented Jan 6, 2026

@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.

Copy link
Author

@YeaSeb YeaSeb left a 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.

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.

3 participants