Repository navigation
feat(input): add ESP32-S3 USB bridge gamepad backend - #5973
Open
cheetahdotcat wants to merge 1 commit into
Open
cheetahdotcat wants to merge 1 commit into
cheetahdotcat wants to merge 1 commit into
Conversation
Add gamepad_driver = esp32_bridge (Windows). Gamepads, keyboard, and mouse are published through libvirtualhid's ESP32-S3 bridge backend: a board on the host's USB port that enumerates as standard USB devices. - esp32_bridge_port selects the COM port; empty auto-detects. On first start with a bridge attached and no driver chosen, Sunshine selects it. - Capability probes and the driver status endpoint no longer create a second runtime in bridge mode (the serial port can only be opened once); pen and touch are not advertised because the bridge has no such devices. - The bridge requires pairing: on first connection the user presses BOOT on the bridge. /api/esp32-bridge/status reports the connection and pairing state, shown on the home page while pairing is pending and on the troubleshooting page.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Adds
gamepad_driver = esp32_bridge(Windows). Gamepads, keyboard, and mouse are published through libvirtualhid's ESP32-S3 bridge backend. The bridge is a board on the host's USB port that enumerates as standard USB devices.Depends on LizardByte/libvirtualhid#201. The submodule currently points at that PR's commit. It will be bumped to the merged commit before this is ready.
gamepad_driver = esp32_bridge, plusesp32_bridge_port(empty auto-detects)./api/esp32-bridge/statusendpoint.Screenshot
Home, pairing pending:

Troubleshooting, pairing pending:

Troubleshooting, connected:

Issues Fixed or Closed
None.
Roadmap Issues
None.
Testing
New tests:
test_config.cpp: bridge auto-selection only without an existing preference.test_virtualhid_input.cpp: backend selection and no pen/touch advertised in bridge mode.test_confighttp.cpp: authenticated/api/esp32-bridge/status, and driver status in bridge mode without a second runtime.Home.test.js: pairing, disconnected, and missing notices, plus polling stopping on unmount.Troubleshooting.test.js: bridge state rows, and no bridge query for other drivers.Runs:
Manual: on Windows 11 with an ESP32-S3, Sunshine detected the bridge (COM63), connected, and created the keyboard/mouse slot. The pairing UI has not been tried on Windows hardware yet.
Type of Change
Checklist
AI Usage
See our AI usage policy.
Model: Claude Opus 5.5 (
claude-opus-5-5) via Claude Code, used for implementation, tests, and drafting this description. The author reviewed the changes and tested them on hardware.