Skip to content

v0.8.0-rc0: XInput, SInput touchpad, docs & OS compatibility overhaul #346

Closed

Description

@lemmingDev

What's new

  • XInput mode: Xbox One S (for sub 6.5 Linux kernels) / Series X (for modern Windows/Linux/Mac) emulation over BLE with rumble
  • SInput touchpad: Fully featured including player LED, rumble, gyro, dual touchpad support (1-2 pads, 1-2 fingers)
  • SInput gamepad type & face style config
  • 4 new examples: SInputFullGamepad, SInputIMU, SInputTouchpad, XInputSeriesX
  • Full documentation: README rewrite, docs/GenericMode, docs/SInputMode, docs/XInputMode
  • OS compatibility: Detailed Windows/Linux/macOS sections per mode
  • Steam integration: Dedicated section with per-mode compatibility table

What changed

  • clampAxis() now pass-through (allows -32768)
  • sendReport() split into sendSInputReport(), sendXInputReport(), sendGenericReport()
  • const on all BleGamepadConfiguration getters
  • specialButtonBitPosition() precomputed in begin()
  • end() implemented with resource cleanup
  • Mode-aware config auto-correction in setGamepadMode()
  • Bug fixes: delete[], uint64_t->uint8_t, signed overflow, || misuse

Testing

Tested on multi-gamepad branch. All 9 examples compile with 0 warnings.

Feedback requested

  • Test on real hardware with Steam (SInput + XInput modes)
  • Test on macOS with GCController
  • Test on Linux with xpad driver (XInput) and SDL3 (SInput)
  • Any issues with the new touchpad API?

Branch: multi-gamepad

Activity

  1. lemmingDev commented on Aug 30, 2026

    @lemmingDev
    OwnerAuthor

    This PR builds on top of the excellent work by @LeeNX on the original SInput implementation (PR #341). Their research, pull requests, and ongoing help with issues were instrumental in getting SInput off the ground — huge thanks for all of that.

    This is quite a large PR overall, so a heads-up that there's been some refactoring behind the scenes to make it easier to add new controller types going forward. The core sendReport() was split into mode-specific paths (sendSInputReport(), sendXInputReport(), sendGenericReport()), and the config auto-corrects its defaults based on the selected mode. The idea is that adding something like XInput (included here) or potentially a future DualSense mode doesn't require bolting unrelated code onto existing paths — each mode gets its own clean implementation while sharing the common BLE/HID infrastructure.

    Summary of what's in this PR:

    • XInput mode — Xbox One S / Series X emulation with rumble
    • SInput touchpad — Dual touchpad (1-2 pads, 1-2 fingers)
    • SInput gamepad type & face style config
    • New examples — SInputFullGamepad, SInputIMU, SInputTouchpad, XInputSeriesX
    • Full documentation — README rewrite, per-mode docs (Generic, SInput, XInput) with OS compatibility and Steam integration guides
    • Bug fixes & cleanup — clampAxis() pass-through, delete[] fixes, const getters, end() implementation, uint64_t->uint8_t type fixes, etc.

    Would appreciate testing feedback — especially on Steam (both SInput and XInput), macOS via GCController, and Linux with xpad/SDL3. Thanks!

  2. lemmingDev commented on Aug 30, 2026

    @lemmingDev
    OwnerAuthor

    Updated: Examples rewrite + axes default change

    All examples have been rewritten and the axes default has been restored to -32768 to 32767 (was changed to 0-32767 in v5, restored in v0.8.0).

    New SInput examples (8 focused per-feature)

    Each example demonstrates ONE feature with thorough comments, a minimal button heartbeat, and hardware wiring notes:

    Example Feature Lines
    SInputRumble Rumble/vibration reception + motor wiring ~80
    SInputPlayerLED Player LED assignment + onboard LED ~80
    SInputRGB RGB LED via 3 discrete PWM pins ~80
    SInputRGB_NeoPixel RGB LED via WS2812/NeoPixel strip ~85
    SInputIMU Gyro + accelerometer (simulated + MPU6050 commented) ~110
    SInputTouchpad Dual touchpad with simulated circular data ~100
    SInputBattery Battery level ramp + power state ~90
    SInputFullGamepad ALL features combined ~180

    Updated XInput examples

    Both XInputGamepad and XInputSeriesX have been rewritten with thorough inline comments covering:

    • Axis mapping (X/Y = left stick, Z/Rz = right stick, Rx/Ry = triggers)
    • Button count and hat switch config
    • PID differences (0x02FD vs 0x0B13)
    • Rumble motor wiring
    • Platform-specific notes (Windows/Linux/macOS)

    Compile results

    All 10 new/updated examples compile with 0 warnings on ESP32:

    Example Flash RAM
    SInputRumble 47% 11%
    SInputPlayerLED 48% 11%
    SInputRGB 48% 11%
    SInputRGB_NeoPixel 49% 11%
    SInputIMU 48% 11%
    SInputTouchpad 48% 11%
    SInputBattery 47% 11%
    SInputFullGamepad 48% 11%
    XInputGamepad 48% 11%
    XInputSeriesX 48% 11%

    Generic examples also compile clean (TestFeatureReports has a pre-existing FEATURE_REPORT_LEN redefinition warning unrelated to these changes).

    Branch: multi-gamepad (force-pushed)

  3. LeeNX commented on Aug 30, 2026

    @LeeNX
    Collaborator

    Wow @lemmingDev !

    That is awesome!

    Just a few notes on docs, we should point out how Generic vs XInput vs SInput is found by host OS, I am not sure everybody would know that it is via VID:PID and that changing that might not work on a host. I did not see if we throw any warnings if changed.

    Second, please hold off on merging and releasing. I am about to put up a PR that gives basic hardware-in-the-loop testing. I will donate a Raspberry Pi 3B+ and two MCUs (ESP32 and ESP32-C3) for basic CI/Unit type testing, that will run in my homeLab and will be contactable in CI workflow over TailScale VPN node. Just want to finish testing in my fork and see what I need to put out for other people test in a similar way.

  4. lemmingDev commented on Aug 30, 2026

    @lemmingDev
    OwnerAuthor

    Thanks for the feedback @LeeNX

    Point 1
    I've now updated the docs to reflect your advice and put a check in the code if the vid/pid are changed on SInput/XInput.
    I could just override the ability for that to happen. That would be easy enough

    Point 2
    Sounds great. You've ben talking about doing it for years!
    A lot of love shown for the library over the past week or so...

    Scope
    I could add Dual Sense in, but I don't really think its worth doing since https://github.com/Mystfit/ESP32-BLE-CompositeHID already does it

    I think XInput and SInput support will close out most of the issues/requests people had with the library.

    Thoughts?

    Can you think of anything further to do?

  5. LeeNX commented on Aug 30, 2026

    @LeeNX
    Collaborator

    Thanks for the feedback @LeeNX

    Totally welcome.

    Point 1 I've now updated the docs to reflect your advice and put a check in the code if the vid/pid are changed on SInput/XInput. I could just override the ability for that to happen. That would be easy enough

    Just something I think could trip up a new user. I remember that SDL had some env overrides to enable VID:PID for a subsystem, but I did not see this for SInput, at least not yet. A warning or docs should be enough.

    Point 2 Sounds great. You've ben talking about doing it for years! A lot of love shown for the library over the past week or so...

    Another project might have use for some of these parts, so they worth putting in place.

    Scope I could add Dual Sense in, but I don't really think its worth doing since https://github.com/Mystfit/ESP32-BLE-CompositeHID already does it

    I don't think Dual Sense offers anything that SInput or XInput currently does not support. If somebody else wants to it and it does not add too much code or size, maybe , but I think there is plenty to work though at the moment.

    I think XInput and SInput support will close out most of the issues/requests people had with the library.

    Totally agree.

    Thoughts?

    Comments quotes above.

    Can you think of anything further to do?

    I think you covered everything that I can think of.

  6. lemmingDev commented on Aug 30, 2026

    @lemmingDev
    OwnerAuthor

    This branch has a few issues. AM working through to resolve the SInput and XInput stuff

    I'll post when they're sorted

  7. lemmingDev commented on Aug 31, 2026

    @lemmingDev
    OwnerAuthor

    SInput now actually works - Power level, Player Led, rumble tested etc working - more testing needed
    XInput now compiles, but is being detected as generic pad - More tweaking and testing needed <- Now fixed and working

  8. lemmingDev commented on Sep 1, 2026

    @lemmingDev
    OwnerAuthor

    So - it's mostly all working now - need testing

  9. LeeNX commented on Sep 2, 2026

    @LeeNX
    Collaborator

    Let me try and finish off the HIL tester and see if we can get that in with a stable release today. Just looking to merge #347 with any changes need for the CI to run on real hardware.

  10. lemmingDev commented on Sep 4, 2026

    @lemmingDev
    OwnerAuthor

    Yeah - best to get that sorted before these thousands of new lines are thrown into the mix

  11. lemmingDev commented on Sep 11, 2026

    @lemmingDev
    OwnerAuthor

    this branch is superseded by the new NuS brach described here: #352

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions