BLE Mesh Transport
Summary: Bluetooth Low Energy as a mesh carrier, phone bridge relay, and WiFi downgrade path. Fills the gap between LoRa (long range, very low throughput) and WiFi (high throughput, needs infrastructure).
Status: Research complete — 4-phase roadmap drafted. Implementation not started.
Motivation
Styrene’s transport stack currently covers:
| Transport | Range | Throughput | Infrastructure |
|---|---|---|---|
| WiFi (802.11s + BATMAN-adv) | ~50m indoor | Mbps | Mesh routers or direct |
| LoRa (via RNode) | 1-15 km | 150-2400 bps | None |
| TCP/IP (internet) | Global | Mbps-Gbps | Internet access |
BLE fills the middle ground:
| Transport | Range | Throughput | Infrastructure |
|---|---|---|---|
| BLE 5.0 | ~100m outdoor, ~30m indoor | ~125 KB/s (1 Mbps PHY) | None |
More importantly, BLE enables phone bridge — using a smartphone as a relay between the Reticulum mesh and the wider network, without requiring the phone to run a full RNS transport node.
Phone Bridge Architecture
[Fleet Device] ←— BLE GATT —→ [Phone] ←— TCP/IP —→ [Internet / Hub]
styrened Relay App rns.styrene.io:4242
The phone acts as a transparent bridge: BLE on one side, TCP on the other. The phone doesn’t need to understand RNS — it just shuttles bytes between a BLE GATT characteristic and a TCP socket.
Implementation Sketch
Fleet device side: bless GATT daemon advertising a Styrene service UUID. styrened’s transport layer connects to this as a serial-like interface.
Phone side: Flutter (or native) app that:
- Scans for Styrene BLE service UUID
- Connects and subscribes to GATT notifications
- Opens TCP connection to configured RNS transport node
- Relays bytes bidirectionally
Hardware Matrix
| Device | BLE Version | Notes |
|---|---|---|
| Raspberry Pi 4 | BLE 5.0 | Built-in, well-supported |
| Raspberry Pi Zero 2W | BLE 5.0 | Built-in, constrained RAM |
| nRF52840 USB dongle | BLE 5.0 | Dedicated, excellent range |
| ESP32-S3 | BLE 5.0 | Companion MCU option |
| Most smartphones | BLE 5.0+ | Bridge relay |
Power Characteristics
BLE is designed for power-constrained devices:
| Mode | Current Draw | Duration |
|---|---|---|
| Advertising | ~15 mA | Continuous |
| Connected (idle) | ~5 mA | Between packets |
| Transmitting | ~15-20 mA | Per packet burst |
| Deep sleep | ~1-5 µA | Between connections |
Compare to WiFi: ~100-300 mA continuous. BLE is 10-50x more power efficient for intermittent messaging.
4-Phase Roadmap
Phase 1: Phone Bridge
Basic relay app + bless GATT daemon on fleet device. Prove bytes flow from styrened through BLE through phone to internet.
Phase 2: BLEInterface for RNS
Native BLEInterface class in Reticulum‘s interface hierarchy, alongside TCPInterface, UDPInterface, AutoInterface. Uses BLE as a serial-like transport for RNS packets.
Phase 3: Adaptive Transport
styrened automatically discovers and uses BLE when WiFi is unavailable. Transport selection: WiFi preferred → BLE fallback → LoRa last resort.
Phase 4: BLE Mesh Backbone
Multiple BLE devices forming a mesh (BLE Mesh or custom relay protocol). Extends range beyond single-hop BLE.
BLE vs BATMAN-adv
BLE mesh and BATMAN-adv solve different problems:
| Aspect | BLE Mesh | BATMAN-adv |
|---|---|---|
| Range per hop | ~30-100m | ~50-200m (WiFi) |
| Throughput | ~125 KB/s | Mbps |
| Power | µW-mW | 100+ mW |
| Infrastructure | None | WiFi radios |
| Use case | Phone bridge, low-power sensors | Fleet backbone |
They complement each other. BATMAN-adv is the primary mesh; BLE is for constrained scenarios.
Open Questions
- Phase 1 implementation — bless GATT daemon + Flutter relay app (vs native Android/iOS)
- nRF52840 USB dongle — evaluation for Pi hardware (dedicated BLE radio, frees onboard WiFi)
- BLEInterface class design — how to integrate with RNS transport hierarchy
- Android BLE background limits — phone bridge needs to survive Android’s aggressive background task killing
- Encryption — BLE link encryption vs. relying on RNS E2E encryption (RNS encryption is sufficient; BLE encryption is optional defense-in-depth)
References
- bless — Python BLE GATT server
- Reticulum Interface Documentation
- grapheneos-mobile-platform — Hardened Android for phone bridge
- LoRa — Long-range alternative transport
- BATMAN-adv — Primary mesh backbone