Skip to content

Release v1.4.0 - #23

Merged
mlstr0m merged 12 commits into
mainfrom
agent/funny-dirac-vjofbi
Sep 28, 2026
Merged

mlstr0m merged 12 commits into
mainfrom
agent/funny-dirac-vjofbi

Conversation

@mlstr0m

@mlstr0m mlstr0m commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

This PR prepares v1.4.0:

  • Bumps APP_VERSION to 1.4.0.
  • Adds .github/release-notes/v1.4.0.md.
  • Refreshes the README landing section:
    • A link to the latest release, plus a release badge.
    • A new Install section for the DMG, including the macOS 15+ Gatekeeper steps.
    • DSU and multi-controller support are now mentioned up front.
    • Python is listed as needed only to run from source.
    • The USB row is corrected: the controller stays silent until it receives a proprietary init sequence (Findings from a Pro 2 unit: C/Capture swapped, stick calibration, and USB does work #14), rather than "firmware blocks".

The release covers:

After merging, run Actions → Release → Run workflow with the tag v1.4.0. I checked locally that release.yml's tag/version check passes. The tests pass (147 bridge checks + 52 DSU checks) and ruff is clean.

The branch also carries a merge of its previous head, which was already squash-merged in #22. The diff against main is only the release files and the README.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SGsFjHBorX2mfsanZhFyzs

claude and others added 12 commits September 27, 2026 18:41
Protocol (sources cited in code and README):
- Byte 4 of the input report: Capture is 0x02 and C is 0x10, not the
  reverse. Agreed by ndeadly/switch2_controller_research (hid_reports.md),
  esp-cpp/espp PR #765 (switch2_pro_report.hpp) and the hardware capture
  in issue #14. Also fixes Capture -> DSU Touch.
- Read the factory stick calibration over the command channel
  (649d4ac9-...f005 / replies c765a961-...) and light player LED 1.
  Frame format, SPI addresses 0x130A8/0x130E8 and block layout adapted
  from kennethreitz/switch2bridge-macos@975f329 (issue #14, MIT), based on
  darthcloud/BlueRetro#1249; addresses match SDL's Switch 2 driver.
  Best effort: a silent controller keeps the nominal 2048 range.
- README: 7492866c-...c0f8 is notify-only, document the command channel.

Hardening:
- mappings.json written atomically (temp file + os.replace)
- "dsu.enabled" must be a boolean (bool("false") was True)
- warn when the DSU server is bound to a non-loopback address
- DSU socket: drop SO_REUSEADDR (useless for UDP; on Linux it let a
  second server silently share the port)
- worker -> UI messages taken atomically; stick hysteresis read under lock
- asyncio.get_running_loop(); logging set up at startup, not import

Build: Python 3.10+ (bleak 3 requires it), major-version upper bounds,
py2app moved to requirements-build.txt, CI matrix 3.10/3.12/3.13,
DMG README explains the macOS 15+ Gatekeeper "Open Anyway" flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGsFjHBorX2mfsanZhFyzs
Actions → Release → Run workflow (tag input): checks the tag matches
APP_VERSION and doesn't exist yet, runs the tests, builds the DMG, then
creates the tag and the GitHub release with the DMG attached, using
.github/release-notes/<tag>.md as the body with {{SHA256}} replaced by
the DMG checksum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGsFjHBorX2mfsanZhFyzs
Follow-up to #17:
- the setup_logging tests now point LOG_DIR at a temp dir and detach
  their handler afterwards, instead of creating controller2.log in the
  real ~/Library/Logs/Switch2Bridge and leaving a handler on bridge.log
- Mappings.set_address() had no caller outside its own test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGsFjHBorX2mfsanZhFyzs
- ruff (pyflakes, bugbear, pyupgrade) configured in ruff.toml and run as
  a CI job; fixed its four findings: `raise ... from None` in config
  validation, `socket.timeout` -> `TimeoutError` (alias since 3.10)
- .gitignore: drop duplicated entries, English comments, ignore .ruff_cache
- README: project structure lists .github/ (CI, release workflow, notes)
  and ruff.toml; new Development section (tests, lint, release steps);
  DriverKit is a system extension needing a paid developer account, not
  "kernel-level" / "not possible"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGsFjHBorX2mfsanZhFyzs
The reporter's controller adopted 7492866c-ec3e-4619-8258-32755ffcc0f8 and
has no …f9 at all. So …f8 is now a known candidate, probed before any blind
vendor/SIG scanning, which makes detection immediate on that revision
instead of luck-of-the-ordering.

Being less sure of its role than …f9, it is probe-validated rather than
trusted outright, and characteristics that don't advertise notify/indicate
are skipped everywhere — including a pin or a known UUID that turns out to
be write-only, which now falls through to probing instead of failing the
session.

(cherry picked from commit c349a71)

Ported onto v1.3.0: the README keeps v1.3.0's characteristics table and
limitations (…f8 is notify-only; ndeadly lists it as the Pro Controller
input) and folds in the #15 facts; the code comment no longer calls …f8
the output characteristic.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGsFjHBorX2mfsanZhFyzs
Covers #17 (--config, ble.address, per-config logs), #20, #21 (lint in
CI) and #22 (…f8 known input characteristic).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGsFjHBorX2mfsanZhFyzs
- link to the latest release (plus a release badge) right under the intro,
  and an Install section for the DMG, with the macOS 15+ Gatekeeper flow
- intro and "What this is" mention the DSU analog gamepad, not only the
  keyboard bridge; features list multi-controller support
- Python is only needed to run from source
- USB row: the controller stays silent until it gets a proprietary init
  sequence (#14; also described by caqlayan/procon2-mac), rather than
  "firmware blocks non-Switch connections"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGsFjHBorX2mfsanZhFyzs
@mlstr0m
mlstr0m merged commit 809213e into main Sep 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants