Skip to the content
Back to Nymchat

Knowledge base Off the internet

Bluetooth mesh

Messaging with no internet, no cell service and no infrastructure of any kind. Nearby devices link over Bluetooth LE and relay for each other, so a message reaches people beyond radio range by hopping through the devices in between.

What the mesh is

The mesh is a second transport running alongside the relays, not a separate app or a separate identity. Public channels and private messages both work over it, and the app decides which route to take on its own: online sends go over the internet and fall back to Bluetooth when it is unavailable, while a peer reachable only over the radio stays on the mesh either way.

It is a store-and-forward flood network. Each device passes packets on to the devices it can hear, with a hop limit of 7, deduplicating what it has already seen so a packet does not circulate forever. Two people who cannot hear each other directly still exchange messages as long as there is a chain of devices between them.

Under that, every pair of peers runs a Noise XX handshake and talks over its own encrypted session. Packets are padded and, when large, fragmented, so the size of what you send says as little as possible about what it is.

Turning it on

Open the Bluetooth mesh panel and press Turn on. What happens next depends on what you are running it on.

The Nymchat Bluetooth mesh panel, showing mesh status, paired devices, peers on the mesh and a radio log.
The mesh panel: status, paired devices, peers heard, and a live radio log.

On Android and iOS

The app runs both Bluetooth roles at once — advertising itself and scanning for others — so any two nearby devices link up regardless of which one noticed the other. Grant the Bluetooth permission when asked and it finds peers by itself.

In a browser

The web app joins the same mesh through Web Bluetooth, on Chromium browsers: Chrome, Edge, Opera and Brave. On Safari and Firefox, which do not implement Web Bluetooth, the mesh controls are hidden entirely rather than offered and then failing.

A browser joins as a leaf

A browser can only take the Bluetooth central role: it cannot advertise itself, so other devices cannot discover it. It connects outward to nearby phones and relays through them. You pick each device once through the browser's own device chooser, after which it reconnects on its own. Two browsers cannot link to each other directly.

Sharing a mesh with Bitchat

Nymchat implements Bitchat's mesh protocol on the wire, byte for byte — the same GATT service and characteristic UUIDs, the same packet header, the same message types, the same default hop limit. The two apps are not bridged through anything; they are simply on the same mesh, and a Nymchat device and a Bitchat device discover each other and exchange encrypted messages directly.

Announce packets can also carry a nostrLink: a signed link from a mesh peer to their real Nostr identity. When one is present and verifies, a peer you met over Bluetooth shows up as the same person you know from the relays.

Ghost Mode

A mesh device is a radio that announces itself repeatedly, which is exactly what makes it easy to follow across places and sessions. Ghost Mode is the opt-in answer.

While it is on, every identifier an announce carries is replaced with a throwaway value, and all of them rotate together:

  • the Noise static key — which the peer ID and fingerprint derive from;
  • the Ed25519 signing key;
  • the advertised Bluetooth name;
  • the nickname;
  • the announced nostrLink, which stays real but becomes ephemeral, so peers can still reach you without anything resolving to your npub.

Rotation happens on a jittered epoch of roughly 15 minutes. Retired identities stay decryptable for up to 8 epochs so a late reply still arrives, and a conversation started while ghosted is pinned to the mesh for good rather than silently migrating to the relays under your real key.

Avatar and banner sharing is refused while Ghost Mode is active: a repeated image links two epochs together faster than any key would.

Ghost Mode is not anonymity

It makes a device much harder to follow. It does not make it untraceable. The Bluetooth hardware address is controlled by the operating system, not by the app, and timing and social patterns stay correlatable — the same person, in the same place, talking to the same people, at the same times.

Limits

  • Range is Bluetooth range. Tens of metres in the open, less through walls. The mesh extends reach by hopping, not by shouting louder.
  • Bandwidth is small. Frames are capped at 512 bytes and larger messages are fragmented. It is built for text, not for media.
  • Delivery is best-effort. A store-and-forward flood with a 7-hop limit makes no promises. If nobody is in range and nobody comes into range, the message waits.
  • Browsers are leaves, per above, and depend on a phone being nearby.
  • The radio costs battery, because scanning and advertising continuously is what makes the mesh work.