[PR #326] ReversePuck: pairing commands to read, write and erase each slot over USB #289

Open
opened 2026-10-26 11:09:47 +00:00 by roman · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/safijari/openpuck/pull/326
Author: @MisterAnderson91
Created: 10/25/2026
Status: 🔄 Open

Base: main ← Head: reversepuck-pairing-commands


📝 Commits (1)

  • 7c1572c ReversePuck: read, write and delete pairing slots by number

📊 Changes

2 files changed (+78 additions, -8 deletions)

View changed files

📝 ReversePuckFirmware/ctrl_usb.cpp (+74 -8)
📝 ReversePuckFirmware/ctrl_usb.h (+4 -0)

📄 Description

ReversePuck pairing commands, for SC Hammer compatibility: pairing tools can read, write and erase each of the dongle's 8 pairing slots over USB, and tell a ReversePuck apart from a real Steam Controller.

SC Hammer (a GUI for moving, swapping and pairing Steam Controller pairings) has already been updated for this: v0.2.0 recognises a ReversePuck through rp/info and shows and manages all 8 slots. It works as soon as this is merged and the dongle is flashed. With current firmware SC Hammer just treats the dongle as an ordinary two-slot controller, as before.

One of three independent ReversePuck PRs (firmware fixes, pairing commands, Deck app + AppImage). They touch separate files and can be merged in any order.

Summary

  • 7c1572c Pairing commands to read, write and erase all 8 slots

Details

ReversePuck: read, write and delete pairing slots by number (ctrl_usb.cpp/.h)
Pairing tools could only read pairing slot 0 (0xA3), and every 0xEE write went to whichever slot find-or-alloc picked. This adds, over USB only:

  • 0xED keyed read for esb/bond, esb/bond_2 and new rp/bond/0..7. Empty slots return length 0, like a real controller.
  • 0xED "rp/info" → R P <version> <NBOND>, so tools can tell a ReversePuck from a real controller (a real one answers an unknown key with nothing).
  • 0xEE/0xEF with rp/bond/N write exactly slot N. Steam's esb/bond writes keep find-or-alloc, so Steam pairing is unchanged.
  • 0xF0 deletes the named slot.

Testing

Hardware: Steam Deck OLED with a ReversePuck (Pro Micro nRF52840) and an OpenPuck on 0.9.51.

  • SC Hammer 0.2.0 on the Deck reads all 8 slots from the dongle, and both sides of its pairing with the OpenPuck match.
  • Write, move, swap and erase were tested against SC Hammer's simulated ReversePuck, which answers these commands the way this firmware does; not yet on the real dongle.
  • SC Hammer still reads a real Steam Controller through esb/bond/esb/bond_2 as before (its tests, with simulated controllers).
  • make check (clang-format 18) passes, and make reversepuck builds.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/safijari/openpuck/pull/326 **Author:** [@MisterAnderson91](https://github.com/MisterAnderson91) **Created:** 10/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `reversepuck-pairing-commands` --- ### 📝 Commits (1) - [`7c1572c`](https://github.com/safijari/openpuck/commit/7c1572cc120210581c55381938e5262bd731c83e) ReversePuck: read, write and delete pairing slots by number ### 📊 Changes **2 files changed** (+78 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `ReversePuckFirmware/ctrl_usb.cpp` (+74 -8) 📝 `ReversePuckFirmware/ctrl_usb.h` (+4 -0) </details> ### 📄 Description ReversePuck pairing commands, for [SC Hammer](https://github.com/MisterAnderson91/sc-hammer) compatibility: pairing tools can read, write and erase each of the dongle's 8 pairing slots over USB, and tell a ReversePuck apart from a real Steam Controller. SC Hammer (a GUI for moving, swapping and pairing Steam Controller pairings) has already been updated for this: [v0.2.0](https://github.com/MisterAnderson91/sc-hammer/releases/tag/v0.2.0) recognises a ReversePuck through `rp/info` and shows and manages all 8 slots. It works as soon as this is merged and the dongle is flashed. With current firmware SC Hammer just treats the dongle as an ordinary two-slot controller, as before. One of three independent ReversePuck PRs (firmware fixes, pairing commands, Deck app + AppImage). They touch separate files and can be merged in any order. ## Summary - 7c1572c Pairing commands to read, write and erase all 8 slots ## Details **ReversePuck: read, write and delete pairing slots by number** (`ctrl_usb.cpp/.h`) Pairing tools could only read pairing slot 0 (`0xA3`), and every `0xEE` write went to whichever slot find-or-alloc picked. This adds, over USB only: - `0xED` keyed read for `esb/bond`, `esb/bond_2` and new `rp/bond/0..7`. Empty slots return length 0, like a real controller. - `0xED "rp/info"` → `R P <version> <NBOND>`, so tools can tell a ReversePuck from a real controller (a real one answers an unknown key with nothing). - `0xEE`/`0xEF` with `rp/bond/N` write exactly slot N. Steam's `esb/bond` writes keep find-or-alloc, so Steam pairing is unchanged. - `0xF0` deletes the named slot. ## Testing Hardware: Steam Deck OLED with a ReversePuck (Pro Micro nRF52840) and an OpenPuck on 0.9.51. - SC Hammer 0.2.0 on the Deck reads all 8 slots from the dongle, and both sides of its pairing with the OpenPuck match. - Write, move, swap and erase were tested against SC Hammer's simulated ReversePuck, which answers these commands the way this firmware does; not yet on the real dongle. - SC Hammer still reads a real Steam Controller through `esb/bond`/`esb/bond_2` as before (its tests, with simulated controllers). - `make check` (clang-format 18) passes, and `make reversepuck` builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
safijari/openpuck#289
No description provided.