Peer-to-peer mesh networking

Mesh networking is a peer-to-peer topology where every device relays traffic for the others, so coverage grows with device density instead of depending on a tower or router. DORS, an offline mesh networking protocol, runs one in production over Bluetooth LE and WiFi Direct on 350,000+ devices.

What is peer-to-peer mesh networking?

In a conventional network, every device talks to infrastructure: a cell tower, a WiFi access point, a server. If that infrastructure fails or saturates, every device attached to it goes silent, regardless of how close the devices are to each other.

A peer-to-peer mesh removes the middle. Devices connect directly to nearby devices, and each device forwards traffic for others. A message from A to E can travel A to B to C to D to E even though A and E were never in radio range. The network's coverage is the union of every device's radio range, and it grows with every device that joins.

Mesh networks are self-healing: when a node leaves, traffic reroutes around it. They are also infrastructure-independent, which makes them the standard answer where towers cannot exist, in disaster zones, underground, in the air, or under deliberate shutdown.

Diagram: a peer-to-peer mesh network failing over from internet to Bluetooth LE and WiFi Direct, relaying an encrypted message between two phones through a relay node with multi-hop routing, acknowledgment, and deduplication.

Failover in one frame: the internet path is down, so unit-07 hands the message to relay-04 over BLE, relay-04 forwards ciphertext over WiFi Direct, and unit-19 acknowledges delivery two hops later. No route was configured and no server was involved.

How DORS implements it

DORS, the transport layer of Offline Protocol, is a production mesh with specific, measurable behavior:

Five transports, one mesh

BLE, WiFi Direct, internet, Reticulum, and Nostr run behind a single API. DORS scores whichever are enabled and moves traffic to the best per message.

Multi-hop with an 8-hop TTL

Messages relay up to 8 hops with acknowledgment, retry, and deduplication at the protocol level. TTL drops to zero to stop infinite circulation.

Battery-aware relay promotion

Well-charged devices take on relay duty; devices low on energy shed it. The mesh balances its own load across the fleet.

Encrypted by default

Sessions use MLS (RFC 9420) with Ed25519 identities. Relay nodes forward ciphertext; keys never leave the device.

Large payloads

Chunked transfer moves files up to 100MB across the mesh with per-chunk acknowledgment and resume.

Proven at scale

350,000+ devices, 80+ countries, 10,000+ active clusters, grown on product pull alone.

Five transports behind one API

Each transport has a different physics, and DORS treats them as a single pool. Bluetooth LE and WiFi Direct carry the local mesh; internet, Reticulum, and Nostr are backhaul and fallback paths for when local radios cannot reach. You enable the ones a deployment needs, and the protocol scores the rest away.

Bluetooth LE
DEFAULT

The energy-efficient backbone of the local mesh. BLE handles peer discovery and small messages at very low power, and every device advertises and scans by default.

WiFi Direct
ANDROID

A high-throughput link for bulk data, including chunked file transfer, when both ends support it. DORS escalates BLE to WiFi Direct under load on Android.

Internet
BACKHAUL

A WebSocket connection to a server, treated as one more transport rather than a dependency. When it is present DORS may use it; losing it triggers failover, not an outage.

Reticulum
LONG RANGE

A resilient long-range fallback over an external Reticulum daemon, weighted for reliability and energy so it carries traffic when local radios cannot reach.

Nostr
RELAY

A fallback over Nostr WebSocket relays with automatic reconnection, weighted for reliability so messages still move when only relay infrastructure is reachable.

How DORS picks a transport

DORS, the Dynamic Offline Relay Switch, scores every available transport in real time and moves traffic to the best one for the message in hand. Each transport is rated on seven live factors, weighted differently per transport, so BLE wins on energy while WiFi Direct wins on throughput and Reticulum wins on resilience.

Signal strength
RSSI on BLE and WiFi links
Proximity
Hop count to the destination
Bandwidth
Throughput the transport can carry
Congestion
Queue depth and backlog
Energy
Battery impact of the transport
Reliability
Historical delivery success rate
Load
Current processing capacity

Scoring alone would make the mesh flap between transports, so DORS holds itself steady. A rival transport must score at least 15 points higher before a switch, a 20-second cooldown spaces switches apart, and an 8-second stability window lets the current transport settle first. Under load DORS escalates BLE to WiFi Direct, and on poor signal, around -85 dBm, it switches away from a failing link.

// Defaults that keep transport switching stable
const dors = {
  switchHysteresis: 15.0,    // min score gap to switch
  switchCooldownSecs: 20,    // spacing between switches
  stabilityWindowSecs: 8,    // settle before switching
  rssiSwitchThreshold: -85,  // dBm, switch on poor signal
};

Clusters, bridges, and multi-path routing

Member role
Connections inside a cluster of nearby peers carry traffic within the group.
Bridge role
Connections that link two separate clusters. Bridges stitch isolated pockets of devices into one routable network.
Connection budget
Each device holds about four peers, scoring every candidate on RSSI, free slots, uptime, battery, stability, and load.
Self-rebalancing
The budget rebalances roughly every 15 seconds, and candidates that would bridge clusters get a scoring bonus, so the mesh actively unifies itself.
Gradient routing
A message forwards toward the few best paths at once, not one pre-computed route, so a link that drops mid-flight never strands it.
Exactly-once delivery
An 8-hop TTL, acknowledgment, retry, and deduplication give a message many ways to arrive and exactly one delivery when it does.

Bluetooth mesh and WiFi Direct on ordinary phones

No special hardware
The phones people already carry ship with BLE and WiFi Direct radios, and the SDK turns those radios into mesh links.
Bluetooth LE
Handles peer discovery and small messages at very low power.
WiFi Direct
Carries bulk data, including chunked file transfer up to 100MB, when both ends support it.
Coverage is the fleet
Every device that installs an app built on the platform becomes a relay, so density in a stadium, warehouse, or staging area translates directly into throughput and reach.
No base station
Nothing to deploy and no gateway to keep powered. The network is the devices.
One npm install
A TypeScript API in the React Native SDK over a Rust core, with encryption, retry, and multi-hop routing as the default path.

Reliability below your code

Fragment and queue
Outgoing messages are fragmented, queued, and polled onto the radio continuously.
ID and TTL
Each message carries a unique ID and an 8-hop TTL.
Acknowledge and retry
Receivers acknowledge, senders retry on timeout, and relays deduplicate by ID, so a message that arrives twice is delivered once.
A clean contract
Your application sees sent, then delivered or failed, with hop count and latency attached.

Where it applies

Robotics and autonomy
Swarm coordination across fleets when links and GPS drop.
Public sector
Disaster-resilient communication through outages and shutdowns.
High-density venues
Events and venues where every phone becomes a relay.
Above the transport
Service Discovery turns the mesh into an invocable network of capabilities.

Mesh networking FAQ

Does mesh networking work without internet?

Yes. Devices connect directly over BLE and WiFi Direct and relay traffic for each other, so messages route peer to peer with no internet, no cell tower, and no router. When internet is present, DORS simply treats it as one more transport alongside Reticulum and Nostr fallbacks.

Can phones form a Bluetooth mesh network?

Yes. Ordinary iOS and Android phones running the SDK discover each other over BLE and connect over BLE or WiFi Direct, forming a mesh that relays messages up to 8 hops with no extra hardware.

How far can a mesh message travel?

Up to 8 hops in DORS. With WiFi Direct links spanning up to a couple hundred meters each, a single route can cover a venue, a convoy, or a neighborhood without infrastructure.

Does mesh networking drain the battery?

Relay duty is distributed by charge level. BLE advertisement is low-power by design, and devices below an energy threshold stop relaying automatically.

Can relay nodes read the traffic they forward?

No. Relays forward MLS-encrypted ciphertext. Only session members hold keys, and keys never leave their devices.

What happens when the internet is available?

DORS uses it as one transport among several, picking the best path per message. Losing it triggers failover to local transports, not an outage.

How do mesh clusters form?

Each device evaluates discovered peers against a connection budget of about four peers and a live score built from signal strength, free slots, uptime, battery, stability, and load. Peers in the same cluster connect as members; peers in different clusters connect as bridges, which is how separate pockets of devices merge into one routable mesh. The budget is rescored and rebalanced roughly every 15 seconds.

How is delivery confirmed?

Every message carries a unique ID and an 8-hop TTL. Receivers acknowledge, senders retry on timeout, and duplicates are dropped by ID, so the application sees exactly one delivered or one failed outcome per message.

What transports does the mesh run over?

Five: Bluetooth LE for energy-efficient local mesh, WiFi Direct for high-throughput links on Android, the internet as a WebSocket backhaul, Reticulum for resilient long-range fallback over an external daemon, and Nostr for a fallback over WebSocket relays. DORS scores whichever are enabled and moves traffic to the best one per message.

How does DORS avoid flapping between transports?

Three safeguards. A 15-point hysteresis means a rival transport must score at least 15 points higher before a switch, a 20-second cooldown spaces switches out, and an 8-second stability window requires the current transport to settle first. It escalates BLE to WiFi under load and switches away on poor signal, around -85 dBm.

From the blog
How DORS failover works

Running BLE, WiFi Direct, and internet concurrently and moving traffic between them in under a second.

Read more →
Store, carry, forward

Delay-tolerant delivery: custody transfer, message IDs and TTLs, deduplication, and reconcile-on-return.

Read more →

Run the mesh against your use case. Pilots scope in 6 to 10 weeks.

Book a pilot Read the docs