PROTOCOL NOTES / 03
Discovery & topology
Discover candidates without confusing them with active paths.
Android and iOS software implemented · Apple Wi-Fi Aware, Bluetooth LE and mixing tested on hosts and emulators only · Physical qualification pending
Advertisements suggest routes; they do not authorize them
Signed discovery advertisements contain the ride tag, peer public key, root index, ancestry, root pulse, serial, capability flags, and cumulative cost. Signatures and ride tags identify relevant information, while freshness and ancestry checks reject stale or known-cyclic choices. A structural failure rejects an advertisement. A path that contains the receiver is valid route information but excludes the sender as a parent: a child’s advertisement always contains its parent.
Capability flags say what a phone can do: Wi-Fi Aware child capacity, Apple platform, Wi-Fi Aware availability, NAN Pairing, Bluetooth LE link and host capability, and a Bluetooth LE link limit of one to four. A change of any flag re-signs the advertisement at once.
Every ride publishes the same Wi-Fi Aware service, _rideweave._tcp, so the service can be declared in advance on every platform. Each advertisement is published sealed with AES-128-GCM under a key derived from the ride token, so only invitation holders can read the identity and route state in it, and advertisements of other rides nearby fail authentication and are ignored.
Apple Wi-Fi Aware discovery exposes no service-specific information, so an Apple device learns a peer’s advertisement over the link itself, through the advert link object after TLS and hello. Bluetooth LE hosts publish the same advertisement, encrypted under a key derived from the ride token, in a GATT characteristic. Each discovery channel (Wi-Fi Aware service discovery, Bluetooth LE GATT reads, and advert on each link) keeps its own handle, freshness and serial.
Advertisements refresh every second while the topology is still settling and every 3 seconds once it is settled, and immediately when the root, path, capacity or cost bucket changes.
Discovery handles are opaque platform references. They can change without changing a rider’s cryptographic identity. A desired parent is only a candidate until transport, identity, and protocol activation have completed.
One active parent, several possible roles
A rider has at most one active parent and one standby parent. Active child links form branches. Standby candidates carry coordination and probes, not ordinary voice. After a handoff, the old edge drains before scoped teardown. The advertised path changes only after the matching activation acknowledgment.
A fresh link and a fresh root are different facts
Discovery information expires after 6 seconds; unchanged root pulse information expires after 4.5 seconds. A healthy direct parent can refresh its route during a discovery gap. Relayed heartbeats cannot masquerade as proof of a direct neighbor’s health.
Route cost adds, for each link along the path, half its measured network round trip plus a loss penalty. A different route to the same root must stay more than 20% cheaper for 10 seconds, or at least 50% cheaper for 2 seconds, before the rider switches, and a new parent is then held for 1.5 seconds. A suspect or failed parent gets no such protection: a healthy alternative is prepared at once.
A Bluetooth LE edge is the last resort
Route selection scores each candidate over every feasible link kind and keeps the cheapest. A Bluetooth LE edge costs the measured adjacent cost plus 400, and at least 600, so any comparable Wi-Fi Aware path wins. A phone does not select or keep a Bluetooth LE parent while a healthy Wi-Fi Aware neighbor that could be its parent advertises the same root, and that switch skips the usual hysteresis. Islands joined by several Bluetooth LE-capable riders therefore converge on one Bluetooth LE edge.
Some kinds are usable only over an existing link: an Android phone reaches an Apple device over Wi-Fi Aware only through a link the Apple device opened, and a Bluetooth LE host cannot open a channel itself. Transport direction never decides topology direction: on every link the prospective child is the endpoint that sends handoff_prepare.
Partitions have local recovery
A partition can temporarily form another root and later merge when eligible routes become available. Known ancestry checks and transactional changes reduce cycles, but they are not a proof of instantaneous global acyclicity under arbitrary message delays. Network capacity can force a break-before-make transition, but only when the current parent is no longer healthy or the replacement leads to a different root; a cost-only improvement waits instead of closing a healthy parent.
Two components that only Bluetooth LE can join merge through a Bluetooth LE link: a central that finds a host with a higher root opens one after a random delay of up to 2 seconds, if the roots still differ.
Authority: Native protocol; transactional handoff; Bluetooth LE links. Public examples are synthetic. This guide is maintained against the private implementation; it does not imply access to its source.