PROTOCOL NOTES / 12

22 · Parent change from a BLE edge to Wi-Fi Aware with make-before-break

Participants: iPhone, iPad, Pixel

Implemented software · Tested on hosts and emulators only · Physical qualification pending

Starting state

Sealed ride. Pixel (Android, roster index 0 and root, BLE host, no NAN Pairing) holds two BLE edges: E1 to iPad and E2 to iPhone, both Apple devices being its children. iPad and iPhone are paired but out of Wi-Fi Aware range of each other. iPhone hears iPad inside Pixel's mix on E2, and iPad hears iPhone inside Pixel's mix on E1.

Ordered events

  1. iPhone → iPad

    Back in Wi-Fi Aware range, connect to the paired publisher, TLS, greeting linkKind aware and hello

  2. iPad → iPhone

    advert with root 0, a path through iPad and child capacity bit 0

  3. iPhone → iPhone

    A healthy Wi-Fi Aware candidate with the same root forbids keeping the BLE parent, so switch without hysteresis

  4. iPhone → iPad

    handoff_prepare and UDP probes, iPad answers handoff_ready

  5. iPhone → iPad

    Local commit stops the iPhone mix on E2 and sends handoff_activate, iPad answers handoff_ack

  6. iPhone → Pixel

    handoff_retire on E2, Pixel drains E2 for 500 ms and stops its mix toward iPhone

  7. iPad → Pixel

    iPad mix on E1 now carries the iPhone voice, speaker set with iPhone, mixer set iPad

  8. Pixel → iPad

    Tail frames of the iPhone mix still queued on E2 enter the Pixel mix on E1 with mixer set Pixel and iPhone

  9. iPad → iPhone

    Forward the Pixel mix over Wi-Fi Aware, iPhone discards frames whose speaker set has its own index

  10. iPhone → Pixel

    When its 500 ms drain ends iPhone closes E2 as retired, as Pixel does, without peer cooldown

Fields and messages

Advert capability bit 0 and root; handoff tuple attempt, generation, revision; 4-byte mix header with speaker set and mixer set; descriptors of the iPhone mix (kind mix, edge Pixel), the Pixel mixes for E1 and E2 and the iPad mix.

Authorization and invariants

Wi-Fi Aware preference: no BLE parent is kept while a neighbor over a verified healthy Wi-Fi Aware link is an eligible candidate (fresh route, no cycle, not in cooldown) with the same root, without hysteresis; child capacity gates only new Wi-Fi Aware paths; the child stops its mix on E2 at local commit; Pixel mixes the iPhone mix toward iPad only because its speaker set lacks iPad and its mixer set lacks Pixel and iPad; iPad never mixes frames received over E1; a receiver discards a mix frame whose speaker set contains its own index; iPad, decoding iPhone directly and inside the Pixel mix within 1,000 ms, counts an anomaly and plays both; no individual voice crosses a BLE edge.

Timers

Probes 1 s; activation acknowledgment 1 s; drain 500 ms; path establishment 25 s; the 100 ms BLE egress deadline bounds the overlap; E2 is closed by both ends when the 500 ms drain ends.

Resource lifetime

iPhone voice key, SSRC and replay unchanged; the iPhone and Pixel mix sources for E2 persist for the ride and are reused if E2 forms again; E1 mix sources unchanged; the mix rules keep no per-edge state or timer.

What the rider sees

Pixel shows iPhone speaking from the speaker set of the iPad mix; diagnostics count discarded own-index frames at iPhone and the anomaly at iPad.

Failure branches

Activation failure rolls back to Pixel over E2 with a newer generation; loss of the Wi-Fi Aware link enters ordinary repair and a BLE parent becomes eligible again; if the Wi-Fi Aware link becomes suspect or iPad's route goes stale before the prepare, the preference no longer applies and iPhone keeps E2; frames already queued on E2 are heard twice at Pixel only until the 100 ms deadline expires them; the retired E2 is an intentional close, so no peer cooldown applies.

Resulting state

iPhone is iPad's child over Wi-Fi Aware and E1 is the only BLE edge; iPad's mix on E1 carries iPhone's voice; E2 is drained and closed by both ends when the 500 ms drain ends; nobody heard itself, no mix circulated, and no per-edge mix state or timer was involved.

Evidence boundary

Implemented software; host tests only. Three engines holding two BLE edges converge on one BLE edge once a Wi-Fi Aware link joins them, with media crossing; direct and mixed copies of one voice are counted as a mix anomaly and own voice in a mix is discarded; production make-before-break transactions run in the handoff tests. Physical overlap and audible echo are unqualified.

← All scenarios

Authority: RWCP v2 reviewed scenario catalogue, scenario 22. Public examples are synthetic. This guide is maintained against the private implementation; it does not imply access to its source.