Skip to content

Proposal: servers announce their pairing methods in server/hello #333

Closed as not planned

Description

@wildekek

Problem

A client can't tell in advance which pairing method a server will use. client/hello lists the client's supported_pair_methods, but nothing the client receives before pairing says which of them the server supports: server/init carries only server_id and version, server/hello only name, languages and role support, and the _sendspin-server._tcp TXT record only path and name. The server picks a method only when the operator starts pairing, in server/activate.

So a client with a screen that offers both the pairing token and a dynamic pairing code has to show instructions for both at once: "Pair this Mac in Music Assistant. If it asks for a token, copy it here." In practice users copy the token, go to the server, and are asked for a code instead.

(Context: I'm building a macOS app that is a source@v1 client for Music Assistant and shows the dynamic pairing code on screen.)

Proposal

An optional field in server/hello, mirroring the client's:

"supported_pair_methods": ["dynamic_pairing_code", "pairing_psk"]
  • Identifiers as in pairing.md (pairing_psk, static_pairing_code, dynamic_pairing_code), listing the methods the server can run with this client.
  • server/hello already arrives on the Sentinel-keyed session, before pairing, so the client learns it in time without anything new in cleartext.
  • A server whose choice depends on the operator still lists every method it can run; the client then knows the set, not the pick.

What clients gain

  • Instructions that fit: "Start pairing in Music Assistant; the code appears here", with no token button when the server never asks for one.
  • No guessing from server names or versions.

Compatibility

Purely additive: an absent field means "unknown", which is today's behaviour, and clients already ignore fields they don't know.

Happy to turn this into a PR against messaging.md and pairing.md if it sounds reasonable.

Activity

  1. balloob commented on Oct 22, 2026

    @balloob
    Contributor

    Servers need to support all pairing methods. The client should only implement one code one (dynamic or static), never both. This is also mentioned in the impelmentation guide: https://www.sendspin-audio.com/build/guide/client/pairing/#choose-the-code-method-for-your-hardware

  2. wildekek commented on Oct 22, 2026

    @wildekek
    Author

    Thanks, that's very logical indeed. Fixed in 0.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions