[PR #222] [MERGED] scpair: Bunch of fixes #247

Closed
opened 2026-10-22 05:08:13 +00:00 by roman · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/safijari/openpuck/pull/222
Author: @Leseratte10
Created: 8/8/2026
Status: ✅ Merged
Merged: 8/12/2026
Merged by: @safijari

Base: main ← Head: machine2


📝 Commits (3)

  • 4857cba scpair: Steam Machine bugfixes
  • 5a1a945 Add support for wireless controllers to scpair
  • a429139 Cleanup, allow pairing a wireless controller

📊 Changes

1 file changed (+419 additions, -113 deletions)

View changed files

📝 ReversePuck/scpair.py (+419 -113)

📄 Description

Here's a bunch of new features I added to scpair.py:

  • Extracts the serial number from the Puck itself instead of relying on the USB protocol.
  • Extracts and displays the firmware version of a puck or controller.
  • Allows you to reboot a Puck to the bootloader, and allows you to reboot a controller normally, reboot it to wireless, reboot it to bootloader or power it off.
  • Also shows controllers (and their serial number and firmware) when they are connected wirelessly through a Puck. On the Valve Puck, this (displaying the correct serial number) also works when the pairing slot has been renamed and contains a different string; this will always show the serial of the physical device that's actually connected to. On an OpenPuck, this will only work once #230 is merged.

Displaying wireless controllers already works, and so does rebooting / powering it off. Pairing and writing to a wireless controller should work, but will probably only be useful once #227 is fixed by #230.

Here's things I noticed / questions I have:

OpenPuck devices claim to use firmware 6A18D053 which is an official (Valve firmware) version number from May 29th. This comes from the ATTR83 array in identity.cpp. This object is a key-value list. One byte for the key (4 = firmware version), then four bytes little endian for the data, then repeat. (#230 also updates that value to the most recent firmware version).

And a question regarding OpenPuck: OpenPuck's BCD value gets set to either 0x211, 0x212 or 0x213 in SteamPuckController::begin(). Is there a reason you picked these values?

Both my Steam Controller Puck and my Steam Machine's internal receiver have that set to "2", but the Steam Machine has code to handle receivers with BCD values other than 2 and treats them differently. Is that intended? I had to add a specific check for these values to make the code work with an OpenPuck.

(Please don't merge this yet, I'd like to first solve the "mystery" with the BCD version / get your feedback to my questions and issues above.)


🔄 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/222 **Author:** [@Leseratte10](https://github.com/Leseratte10) **Created:** 8/8/2026 **Status:** ✅ Merged **Merged:** 8/12/2026 **Merged by:** [@safijari](https://github.com/safijari) **Base:** `main` ← **Head:** `machine2` --- ### 📝 Commits (3) - [`4857cba`](https://github.com/safijari/openpuck/commit/4857cbabd14601af7b0b21a27e943140696edde5) scpair: Steam Machine bugfixes - [`5a1a945`](https://github.com/safijari/openpuck/commit/5a1a945c036e5047fb20f6bead996ec594a7465d) Add support for wireless controllers to scpair - [`a429139`](https://github.com/safijari/openpuck/commit/a4291392439df4505765837194a77809491a9d47) Cleanup, allow pairing a wireless controller ### 📊 Changes **1 file changed** (+419 additions, -113 deletions) <details> <summary>View changed files</summary> 📝 `ReversePuck/scpair.py` (+419 -113) </details> ### 📄 Description Here's a bunch of new features I added to scpair.py: - Extracts the serial number from the Puck itself instead of relying on the USB protocol. - Extracts and displays the firmware version of a puck or controller. - Allows you to reboot a Puck to the bootloader, and allows you to reboot a controller normally, reboot it to wireless, reboot it to bootloader or power it off. - Also shows controllers (and their serial number and firmware) when they are connected wirelessly through a Puck. On the Valve Puck, this (displaying the correct serial number) also works when the pairing slot has been renamed and contains a different string; this will always show the serial of the physical device that's actually connected to. On an OpenPuck, this will only work once #230 is merged. Displaying wireless controllers already works, and so does rebooting / powering it off. Pairing and writing to a wireless controller should work, but will probably only be useful once #227 is fixed by #230. Here's things I noticed / questions I have: OpenPuck devices claim to use firmware 6A18D053 which is an official (Valve firmware) version number from May 29th. This comes from the `ATTR83` array in identity.cpp. This object is a key-value list. One byte for the key (4 = firmware version), then four bytes little endian for the data, then repeat. (#230 also updates that value to the most recent firmware version). And a question regarding OpenPuck: OpenPuck's BCD value gets set to either 0x211, 0x212 or 0x213 in `SteamPuckController::begin()`. Is there a reason you picked these values? Both my Steam Controller Puck and my Steam Machine's internal receiver have that set to "2", but the Steam Machine has code to handle receivers with BCD values other than 2 and treats them differently. Is that intended? I had to add a specific check for these values to make the code work with an OpenPuck. (Please don't merge this yet, I'd like to first solve the "mystery" with the BCD version / get your feedback to my questions and issues above.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
roman 2026-10-22 05:08:13 +00:00
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#247
No description provided.