cypherpunk.todaymeshcore-bitchat

Your phone's Bluetooth, carried for kilometres.

Almost everyone carries a phone with Bluetooth. With Bitchat on it, phones chat with each other without internet or accounts, but Bluetooth only reaches tens of metres, at best 100–150. MeshCore radios on LoRa cover kilometres, tens of them with line of sight, but you need a radio node to join.

This firmware turns one LoRa node into a bridge. Bitchat phones near it talk to it over Bluetooth, and it carries Bitchat's public #mesh chat across the MeshCore mesh, and replies come back the same way. MeshCore becomes the long-haul layer under local Bluetooth bubbles.

Get the firmware How it works

Green terminal-style illustration: a phone with Bluetooth chat bubbles on the left, a web of mesh nodes over dark hills in the middle, a radio tower on a hilltop on the right.

Access plus range

Two off-grid networks, each good at half of the job. The bridge joins them on one channel.

Bitchat Bluetooth mesh

Access. Nothing to buy: the phone in your pocket is the radio. Phones relay for each other, so a crowded square works well.

Range: tens of metres per hop, 100–150 m at best.

MeshCore LoRa mesh

Range. Repeaters on roofs and hills, often on solar and a battery, hop messages between towns.

Needs a LoRa radio node to take part.

Bridge node this firmware

Both. One node where people are. Anyone with Bitchat in its Bluetooth range is on #mesh with the whole MeshCore network.

How it works

Diagram: Bitchat phones inside a Bluetooth bubble connect over BLE to a bridge node. The bridge reaches MeshCore repeaters on hills and a companion node with the MeshCore app over LoRa. Bitchat #mesh and MeshCore #mesh are bridged both ways. Bluetooth bubble, ~100 m BLE bridge node MeshCore-BitChat ZephCore-BitChat LoRa km per hop repeater repeater companion + app Bitchat #mesh MeshCore #mesh bridged both ways key = SHA256("#mesh")[0:16] Diagram: Bitchat phones inside a Bluetooth bubble connect over BLE to a bridge node. The bridge reaches MeshCore repeaters on hills and a companion node with the MeshCore app over LoRa. Bitchat #mesh and MeshCore #mesh are bridged both ways. Bluetooth bubble, ~100 m BLE bridge node MeshCore-BitChat ZephCore-BitChat LoRa km per hop repeater repeater companion + app Bitchat #mesh MeshCore #mesh key = SHA256("#mesh")[0:16]
Phones reach the bridge over Bluetooth LE. The bridge is a MeshCore companion node: it sends and hears #mesh over LoRa through repeaters, other companions and their apps.
One channel, both directions
Bitchat's public #mesh chat is joined to the MeshCore hashtag channel #mesh, whose key is SHA256("#mesh")[0:16]. The node decrypts it even if you never added the channel in the MeshCore app.
What MeshCore users see
Bitchat users show up with a phone in front of their nickname:
#mesh 📱 alice: anyone near the station?
What Bitchat users see
The whole MeshCore side is one peer, the node, which posts each message with the sender's name in angle brackets:
bridge-node <bob> yes, north exit, 5 min
Long messages
A MeshCore packet holds far less than a Bitchat message, so long messages are split into parts marked [1/2], [2/2], cut at spaces.
Regions
The bitchat_region setting keeps relayed Bitchat traffic inside one MeshCore region instead of flooding the whole mesh.
Compressed messages and signatures
Bitchat compresses longer messages; the bridge unpacks them on ESP32 and on nRF52 too. The node signs what it sends with Ed25519, as the Bitchat apps do.

What it does not do

Two firmwares, same bridge

Both speak the same protocol on both radios, so you can mix them on one mesh. Pick by your board and by which firmware family you already use.

MeshCore-BitChat

v0.9-bitchat · 37 board builds

A fork of the original MeshCore firmware, built with Arduino and PlatformIO. The obvious choice if you already flash MeshCore, and the one for ESP32 and ESP32-C3 boards.

ZephCore-BitChat

v0.9-zephcore-bitchat · 35 board builds

The same bridge ported to ZephCore, a MeshCore-compatible firmware on the Zephyr RTOS. Memory is laid out statically, with no heap in the packet path. Worth trying on nRF52840 boards, and the only one for nRF54L15.

Comparison of the two firmwares
MeshCore-BitChatZephCore-BitChat
Based onMeshCore (original firmware)ZephCore (MeshCore on Zephyr)
Built withArduino, PlatformIOZephyr RTOS, west
Releasev0.9-bitchatv0.9-zephcore-bitchat
Board builds3735
ChipsESP32, ESP32-S3, ESP32-C3, nRF52840nRF52840, ESP32-S3, nRF54L15
FilesESP32: .bin, -merged.bin
nRF52: .uf2, .zip
nRF52: .uf2, .zip
ESP32-S3: -merged.bin, -update.bin
nRF54L15: .hex
MemoryStatic buffers, no heap in the packet pathStatic layout throughout, no heap in the packet path
Compressed messages on nRF52YesYes
MeshCore app connects overUSBUSB or UART
RoleCompanionCompanion
LicenseMITMIT (vendored parts under their own licenses)

Tested hardware

Heltec Wireless Stick Lite V3 (ESP32-S3) is the board I test on, end to end with the Android Bitchat app and bitchat-cli. Start with it if you want the path that is known to work.

Every other board in the releases builds and passes the host tests, but has not been checked on real hardware. Reports are welcome as GitHub issues.

Getting a device

Any MeshCore-capable board from the release lists will do. I keep notes on what to buy and where on juraj.bednar.io/mesh.

Install

Four steps. The docs for each firmware have the full board list and the details.

  1. Pick the firmware and your board's file

    Open the release for MeshCore-BitChat or ZephCore-BitChat and download the build for your board. Bridge builds are companion builds that talk to the MeshCore app over USB.

  2. Flash it

    • ESP32 boards: write -merged.bin to address 0x0, for example with esptool.
    • nRF52840 boards: put the board in its bootloader and copy the .uf2 to the drive that appears.
    • nRF54L15 (ZephCore-BitChat only): flash the .hex.
    $ esptool.py write_flash 0x0 <board>-merged.bin
  3. Set the time and, if you want, a region

    Connect the MeshCore app to the node over USB and set its clock; Bitchat ignores a node whose time is off. Without the app, keep a Bitchat phone near the node and it takes the time from the phone. If your mesh uses regions, scope the bridge to yours:

    $ meshcli -s /dev/ttyACM0 set bitchat_region <region>
  4. Join #mesh

    Open Bitchat near the node and write in the public #mesh chat. The node shows up as a peer. Bitchat does not pair: if your phone was ever paired with this node as a MeshCore companion, remove that pairing first. In the MeshCore app, add the hashtag channel #mesh to read and answer.

MeshCore-BitChat docs ZephCore-BitChat docs Free and open source. Support the project

Why I built it

Hamburg. Infrastructure from the bottom up

The MeshCore network in Hamburg is called Hanse Mesh, after the Hanseatic League. The League was merchants, not kings: they built shared infrastructure because their own trade needed it, and everyone who joined made it better for the rest. Mesh networks grow the same way. Someone finds a gap in coverage, puts a repeater on a roof or a hill for their own sake, and the whole network reaches further.

Iran. When the internet is switched off

A friend came back from Iran, where he lived through the protests. The government cut the internet. People did not know whether their family was alive, which streets were dangerous or where to find food. Satellite TV told them about the world, but nothing about their own street. And once the internet is gone, it is too late to download an app.

Valencia. Twenty minutes

Another friend lives in Valencia. During the floods there, it went from a dry, ordinary afternoon to flooded streets and overturned cars in about twenty minutes. Mobile signal came and went, mostly went, and the power was out. It does not take a dictatorship to lose contact with the people you care about.

What I took from it

MeshCore is ready for this: many repeaters run on solar and a battery. But most people will not carry a radio, and nearly all of them carry a phone. So install Bitchat now, even if you don't need it yet. If the day comes, you only have to open it. The bridge does the rest: a nearby node puts those phones on the mesh.

I do not bridge MeshCore to the internet or to Telegram, and people ask me often. The medium is the message. A radio network that works when the internet doesn't is the whole point, so the bridge stays between two networks that need no internet at all.

News on Nostr

Releases and field notes go out on Nostr, an open network that no company owns. Your browser loads the newest posts straight from the relays; this page has no server of its own and sets no cookies.