Skip to content

v0.8.0

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Sep 20:31
· 2 commits to master since this release

What's Changed

v0.8.0 is a feature release built around two big additions: Xbox controller
emulation and SInput controller support — plus a cleanup of how the
BLE serial side-channel works.

Xbox controllers (XInput)

The library now emulates Xbox One S and Xbox Series X controllers over BLE
via GamepadMode::XInputOneS (PID 0x02FD) and GamepadMode::XInputSeriesX
(PID 0x0B13):

  • HID report descriptors captured from real controllers: both sticks, 10-bit
    triggers, D-pad, 15 buttons plus Share, and host-to-device rumble
    (Output Report 0x03, including trigger vibration).
  • Simple API for every input — buttons, sticks, triggers, D-pad — with
    Xbox host rumble delivered back through
    isXInputRumbleReceived() and friends.
  • Pick One S for the broadest compatibility (including Linux xpad before
    6.5), Series X for the Share button (Windows 11 22H2+, Linux 6.5+,
    macOS Big Sur and later).
  • Examples: XInputOneS, XInputSeriesX, XInputSeriesXFriendly (every
    input driven by name), and XInputAllTest with host-side test scripts.

SInput controllers (Handheld Legend)

GamepadMode::SInput speaks SInput,
the community BLE gamepad protocol created by Handheld Legend: a fixed VID/PID
and standardized report layout that SDL's hidapi driver understands natively,
turning the ESP32 into a full SDL_GameController — 25 buttons, sticks,
triggers, D-pad, motion (IMU), touchpad, player LEDs, RGB and rumble — with
native recognition in SDL3 games and Steam. Examples cover the full gamepad
plus each feature individually (SInputFullGamepad, SInputIMU,
SInputTouchpad, SInputRGB, SInputRumble, SInputPlayerLED,
SInputBattery), with SDL3 host tests to verify against.

BLE serial (NuS) is now an external library

The hand-rolled BleNUS serial implementation (BleNUS.cpp/BleNUS.h) has
been removed. Everything that talks to a phone/PC terminal — the
NuS*Bridge sketches, the NuSSendReceive tutorial — now runs on
NuS-NimBLE-Serial by Ángel
Fernández Pineda (CC BY 4.0), installed from the Arduino Library Manager
(see docs/NuSCompatibility.md).

Why the switch: both the HID gamepad and the Nordic UART Service live as two
services on one shared NimBLE server, using the library's delayAdvertising
mechanism so they advertise together cleanly. Depending on the maintained
upstream library instead of a vendored copy means bug fixes and improvements
arrive without carrying the code here.

Need a COM port instead of BLE?

The sketches above speak Nordic UART over BLE — but some PC applications
only speak plain serial COM ports and can't do BLE at all. For those, use
nus-bridge: a PC-side bridge
that acts as the BLE central, connects to the ESP32, and relays bytes both
ways between NuS and a virtual COM port your legacy application opens
(Windows virtual-COM pair, Linux pty, plus a no-driver TCP mode and a
system-tray app). Your .exe talks COM; the ESP32 still only sees NuS.

Test it from your phone

This release adds NuS Bridge sketches (NuSGenericBridge,
NuSXInputBridge, NuSSInputBridge, plus the NuSSendReceive tutorial)
built to be driven remotely: flash one, pair the gamepad with your PC, then
connect the NuS Gamepad Companion
app (Flutter, Android/iOS) over BLE and work every button, stick, trigger
and hat from your phone while watching the host react. The app speaks the
sketches' NuS line vocabulary (hello/proto identity, ok/err replies,
event pushes, state snapshots) — it picks the matching Generic, XInput
or SInput controller screen on its own, with a raw terminal for everything
else.

Thanks

Thank you to @LeeNX for driving the project
forward — the SInput and XInput support, the host-test rigs, and a large
share of everything else in this release.

Full Changelog: v0.7.5...v0.8.0