Skip to content

pair-setup fails with M4 error 2 on TCL Roku TV (8118X, Roku OS 15.3.4) and macOS (Mac15,14) — code and password modes #30

Description

@jeffjacobsen

Summary

pair-setup fails with M4 error: 2 against every receiver we tested — a TCL Roku TV (both "require code" and password modes, fresh on-screen codes entered promptly) and a Mac Studio (both code and password modes). The connection and code-request steps work (both receivers display pairing codes on request), but the SRP verification is rejected at M4 every time. Since a Roku Stick 4K is confirmed working in the README and #19 implies a Roku Express 4K streams, this looks like a receiver-family-specific gap in pair-setup rather than user error.

Environment

  • Sender: Raspberry Pi 5, Debian 13 (trixie) arm64, labwc (wlroots) + xdg-desktop-portal-wlr, Go 1.25, doubletake f4b3a44 (2026-08-08)
  • Receiver A: TCL Roku TV 32S325 (model number 8118X), Roku OS 15.3.4 build 832, AirPlay enabled
  • Receiver B: Mac Studio (Mac15,14), AirPlay Receiver enabled (srcvers=950.7.1 in its mDNS TXT)

What happens

Receiver A (Roku TV), "Require code — first time only", -pair mode; a 4-digit code appears on the TV, entered within ~25–40 s:

2026/08/08 13:30:55 connected to: 32in TCL Roku TV (model: 8118X, initialVolume: 0.0)
Enter the code shown on the receiver, or its configured password: 2026/08/08 13:31:32 PIN pairing failed: pair-setup: pair-setup M4 error: 2

(Reproduced twice with fresh codes.)

Receiver A with an AirPlay password configured instead (no on-screen code shown, password entered at the prompt):

2026/08/08 13:22:04 connected to: 32in TCL Roku TV (model: 8118X, initialVolume: 0.0)
Enter the code shown on the receiver, or its configured password: 2026/08/08 13:22:04 PIN pairing failed: pair-setup: pair-setup M4 error: 2

Also observed on the TV without -pair (transient first, then PIN attempt) — the second attempt in quick succession gets rate-limited:

2026/08/08 13:21:08 connected to: 32in TCL Roku TV (model: 8118X, initialVolume: 0.0)
2026/08/08 13:21:09 transient pairing failed: pair-setup: pair-setup M4 error: 2, prompting for PIN
Enter the code shown on the receiver, or its configured password: 2026/08/08 13:21:09 PIN pairing failed: pair-setup: pair-setup M2 error: 3

Receiver B (Mac Studio), on-screen code mode (-pair, fresh code entered within ~25 s):

2026/08/08 13:37:42 connected to: Mac Studio (model: Mac15,14, initialVolume: 0.0)
Enter the code shown on the receiver, or its configured password: 2026/08/08 13:38:06 PIN pairing failed: pair-setup: pair-setup M4 error: 2

Receiver B with a configured AirPlay password (verified correct — freshly set for the test): identical M4 error: 2.

With no password configured on the Mac, the code-display trigger is refused there (warning: failed to trigger PIN display: pair-pin-start: HTTP 400), while the Roku TV accepts pair-pin-start and shows its code — so the pre-M1 steps behave as expected on both.

Expected

Pairing completes, as it does on the Roku Stick 4K (3820R2) noted in the README.

Notes

  • Four configurations (2 receivers × code/password modes), all failing at the same message with correct secrets, suggests the SRP proof/parameters in pair-setup don't match what these receiver families expect — Roku TV firmware (8118X-class) and current macOS both.
  • Happy to test patches/branches — the sender environment is a persistent Pi 5 test rig and re-testing is quick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions