PROTOCOL NOTES / 06
Bluetooth LE links
Join phones that Wi-Fi Aware cannot join, with the same protection.
Implemented software · Tested on hosts and emulators only · Physical qualification pending
A last-resort link with the same protocol
A Bluetooth LE link joins phones that Wi-Fi Aware cannot join: an Apple device and an Android phone without NAN Pairing, or an Android phone without Wi-Fi Aware. It is one LE credit-based L2CAP channel that carries both the reliable neighbor stream and the neighbor datagrams. TLS 1.3, the greeting, hello, signed control, hop keys, the media envelope and readiness probes are exactly those of a Wi-Fi Aware link.
The channel is opened without Bluetooth pairing or bonding and without link-layer encryption; RWCP’s own TLS, signed control and hop authentication protect it. A pair of phones holds at most one Bluetooth LE link. Every Bluetooth LE edge that forwards media carries one bridge mix per direction instead of separate voices.
Bluetooth LE links are implemented software, tested on hosts and emulators only. Physical range, throughput, coexistence with headset calls, background behavior and battery are unqualified.
An encrypted ride service
Each ride has its own 128-bit Bluetooth service UUID: a fixed prefix followed by six bytes of the ride tag. A host advertises it without a device name and serves one read-only GATT characteristic. Its value is the L2CAP channel number (PSM) and the current signed advertisement, encrypted with AES-128-GCM under a key derived from the ride token. Only invitation holders can read a host’s identity, route state or PSM; a host whose value fails decryption is ignored for 60 seconds.
A scanner verifies the decrypted advertisement exactly like a Wi-Fi Aware one before it uses the PSM. It re-reads every 3 seconds while the host offers a different root, or while the scanner is not its own root and has no healthy parent link, and otherwise every 15 seconds; a host the scanner can never connect to (an Android phone reading an iPhone) is re-read at most once a minute. Once linked, advert messages replace reads. The UUID is fresh for each ride and fixed for its duration: an observer can link one phone’s advertising within a ride but learns no identity from it.
Who connects to whom
One endpoint is the central: it connects and is the TLS client. The other is the host: it advertises, listens for the L2CAP channel and is the TLS server.
| Pair | Central | Requirement |
|---|---|---|
| Apple ↔ Android | The Apple device | Apple has bit 4; Android has bit 5 |
| Apple ↔ Apple, Android ↔ Android | The lower peer ID (lowercase hexadecimal comparison) | The other endpoint has bit 5 |
| Same platform, higher peer ID not host capable | The higher peer ID | The lower peer ID has bit 5 |
The Apple device connects to an Android phone because Android advertises in the background and iOS can scan for a specific UUID in the background, whereas Android cannot see a backgrounded iOS advertiser. Two leaves, phones limited to one Bluetooth LE link and without Wi-Fi Aware, never link to each other: neither could then reach a third phone.
A central opens a link when route selection wants the host as parent; when the host’s component has a higher root, after a random delay of up to 2 seconds and with one such link per remote root; when the central is a joiner and the host a member; or when the central can offer the host a route at most half its advertised cost. The central closes an idle link after 10 seconds and the host after 20 seconds. Losing an idle link is a release, not a failure.
Form links in the lobby
Android advertises and scans in the background under its foreground service. A backgrounded iOS advertiser is visible only to iOS scanners, so links are normally formed in the lobby with the app in the foreground and then survive in the background. An Apple device with no remaining link and no reachable host asks the rider to bring the app to the foreground.
Two background behaviors must be confirmed by qualification before mixed rides rely on them with screens locked: iOS-to-iOS discovery of a backgrounded iOS advertiser, and Wi-Fi Aware links staying up in the background with audio running.
One channel, three frame kinds
The channel is a byte stream of frames: a 2-byte length, a 1-byte kind and a body, at most 2,048 bytes in total. Stream frames carry up to 512 bytes of the TLS stream and are never dropped. A datagram frame carries exactly one media envelope or readiness probe. Ack frames return a cumulative byte count. TLS records on Bluetooth LE carry at most 1,024 plaintext bytes, so a ping never waits behind a 16 KB record.
One window covers stream and datagram bytes: 100 ms of the measured delivery rate, and at least 1,536 bytes. Stream frames may exceed it by 1,024 bytes, so control keeps moving while media fills the window. A queued media frame is dropped after 100 ms in the link queue, or when its age plus half the link round trip reaches the 180 ms media-age limit. Receivers ack within 20 ms or after 1,024 bytes and read the channel continuously.
Control that crosses the edge
Flooded control must not consume the capacity the mix needs. feedback crosses a Bluetooth LE link only when the neighbor wrote it itself, and is not relayed onward. source_status never crosses; far-side riders see speakers through the mix speaker set. A heartbeat crosses when its muted or active value changes, and otherwise at most every 3 seconds per source. Roster, descriptors, sync, join, leave and direct controls cross unchanged. Queued control on a Bluetooth LE link is bounded at 32,768 bytes.
Cost, limits and loss
A Bluetooth LE edge costs the adjacent cost plus 400, and at least 600, so it is used only when it is the only way to join two parts of the ride or the Wi-Fi Aware alternative is much worse. A phone advertises a limit of one to four Bluetooth LE links; Android 10 and older advertise one, because two concurrent channels wedge that Bluetooth stack. At its limit a host stops advertising and closes its listener.
Closing or losing the channel is a hard transport loss and starts scoped repair, unless the link was idle. A new channel runs a new TLS handshake. Bluetooth calls never run on the UI thread; a call blocked for 5 seconds is reported and treated as failed. Diagnostics record window, delivery rate, acknowledgments and drops per link, never Bluetooth device identifiers or addresses.
What the evidence covers
Spike measurements found 100–126 kbit/s per direction at a 15 ms connection interval, bounded delay with a small window, clean single mixed streams during a headset call, and a stack defect with two concurrent channels on Android 10. They are design input, not qualification. Host tests over throttled in-memory pipes are the first verification of framing, window, acks, deadlines and the control load of twelve riders. Physical range, mobility, coexistence with headset calls and battery remain unqualified.
Authority: Bluetooth LE links; transport; wire reference. Public examples are synthetic. This guide is maintained against the private implementation; it does not imply access to its source.