Why Tern

A LoRa channel is slow and shared: every second one node spends sending is a second nobody near it can. Tern is designed around that, and judged by one number: how many messages arrive in time for each second spent on the air.

Meshtastic and MeshCore are working networks, with many users and a hundred boards or so between them. Tern runs on one board today. This page says what it does differently, and what that was measured to be worth.

What was measured

Tern's firmware's routing, run in the simulator beside Meshtastic's and MeshCore's as the simulator ports them: 1000 nodes of which 200 relay, a message from each node every half hour to another at random, and a minute to arrive in. For each, the share of messages that arrived in time, and how many did for each second on the air, all nodes together, over three seeds:

All on SF7, 125 kHzEach on its own preset
Meshtastic19.0%, 0.0131.1%, 0.001
MeshCore30.3%, 0.0265.7%, 0.004
Tern, 255 neighbours kept96.6%, 0.4722.0%, 0.019
Tern, 64 neighbours kept95.2%, 0.3420.2%, 0.017

In a town of 200 nodes at SF9, every node a relay, Tern delivered 100.0% in time with 255 neighbours kept and 99.9% with 64, and Meshtastic 21.0%.

"All on SF7" puts every protocol on one fast radio setting, so that only the routing and how each one takes its turn on the air differ. "Its own preset" puts each on the one it ships with: Meshtastic on LongFast, MeshCore on the UK/EU narrow preset, and Tern on the same as MeshCore. The 200 relays are Meshtastic's routers, MeshCore's repeaters and Tern's relays, the rest clients.

What these numbers are not

The runs are in the draft that came of them, with the rest of what was measured. To run them again, build the simulator beside a checkout ofternmesh/firmware, as its README says, then:

tools/density.py --tsim build/tsim --fast --candidates 1,2,core
tools/density.py --tsim build/tsim --deployed --candidates 1,2,core

What it does differently

Addresses are public keys

A node's address is its Ed25519 public key. Adding someone is adding their key, from their node's QR code or link, and both of you can compare its twelve-digit short code to check it. Who you are writing to is something you can check, not something you are told.

No public channel

A group is the people who were invited to it. A channel every node holds the key to is the one thing in a mesh whose cost nobody bounds: it grows with how much people say. Messages between two people go over a session between their nodes, which costs only the two of them.

Meeting people nearby without one is drafted as presence cards: a signed card with an address and a name, which a node sends only if its user turns it on, two hops and every two hours. It is a strawman, open for review, and the apps show the cards a node has heard as who is about.

Airtime is budgeted

A route is measured in time on air, and a frame meant for every node is held to anallowance at each relay, which bounds what any one sender costs. A busy channel is meant to degrade fairly instead of collapsing. The rest of thedesign goals are on the front page.

Open, and nobody's to sell

Get started