AirPlay.V2.Pairing (AirPlay v0.2.0)

Copy Markdown View Source

AirPlay 2 transient pairing over RTSP (/pair-setup), porting AirPlayClientV2.PairSetup1/PairSetup2. No PIN / Apple account: SRP-6a with username "Pair-Setup", password "3939". On success the SRP session key keys the ChaCha20-Poly1305 control + audio channel.

Flow:

  1. POST /pair-setup TLV{State:1, Method:0, Flags:0x10} → device returns TLV{PublicKey(B), Salt}.
  2. POST /pair-setup TLV{State:3, PublicKey(A), Proof(M1)} → 200 = paired.

pair/2 returns {:ok, %{rtsp, session_key}} (RTSP stays open for SETUP) or {:error, reason}.

Summary

Functions

pair(host, opts \\ [])

@spec pair(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}