KiekR.app beta

How MeshCore works

Direct messages · Channels

Part 1 · Direct messages (DMs)

The basic idea

A direct message is end-to-end encrypted – only your contact can read it; the repeaters just pass it on without reading along. The interesting question: how does your device know the way to the recipient? Short answer: the first time, it doesn't yet – it has to discover it first.

1 · Outbound — Flood (over all routes) You Contact The message travels to your contact over all routes at once. 2 · Return — ACK + path (floods back) You Contact The confirmation floods back and brings the discovered path with it — your device remembers it. 3 · After that — Direct (a separate path per direction) Message → ← ACK (different return path) You Contact The outbound and return trips can use different repeaters — each direction has its own path.
Message ACK / reply floods (to everyone) direct (along the path)
First contact: the outbound trip floods over all routes, the return trip brings the discovered path back. Only after that does everything go direct – and the outbound and return paths can differ.

Step 1 — The first message: "Flood"

When you message a contact for the first time, your device doesn't know a way to them yet. So it sends the message as a flood – meaning roughly: "Everyone in range: please pass it on." Every repeater that hears it forwards it exactly once (not endlessly – duplicates are discarded). It spreads through the network like a wave until it reaches the recipient. The clever part: each repeater stamps its short ID into the packet as it passes. Along the way the message collects the list of stations it travelled through – and that list later becomes the path.

Step 2 — The confirmation (ACK) travels back with the path

When the message reaches the recipient, their device decrypts it, shows it, and sends a delivery confirmation back – the ACK. The ACK is the proof that the message really arrived.

Because your device doesn't know the way yet, the recipient packs the path and the ACK into a single packet (the "path return") and sends it back. Since the return route is also still unknown, this one packet floods just the same through the network. From it your device learns which repeaters reach your contact, remembers the path, and marks the message as delivered. Until the ACK arrives, it stays on "sending".

Important

This flooding of the return trip only happens for the very first message – that is, as long as no path is known yet.

Step 3 — Follow-up messages: "Direct"

From here on it gets efficient – and in both directions. For every further message your device writes the remembered path straight into the packet and sends it direct. Now only the repeaters on the path forward it; all others stay quiet. And the ACK now comes back directly along the known return path too – no longer by flooding. The outbound and return trips don't have to use the same repeaters: each direction has its own path.

In a nutshell

First contact = flood once (there and back) to find the way. After that = direct along the path you found, in both directions.

Where it gets tricky — common problems

When flood, when direct — and when back to flood

That's the self-healing mechanism: a broken path automatically falls back to flooding and is rebuilt. (You can also trigger a path search by hand in the app.) By the way, after sending, your device waits a calculated time for the ACK – longer for flood than for direct.

Deep dive · default region & the ACK

On your companion you set a default region. It decides which scope a flood uses: every flood message (first DM, channel messages) gets a code derived from the region – and only repeaters of that region forward it. This keeps the regional network manageable instead of every message flooding everywhere. (With no region set you flood "globally" – every repeater forwards.)

The catch: the recipient sends the path return with the ACK using their own default region – not yours. If you and your contact have different default regions, and no repeater bridges both, the message may well arrive but the ACK can't find its way back to you – you see "sending", even though it was read.

Good to know: this only affects the flood phase. Direct messages follow the fixed path and are not region-bound – once a path is established, the region no longer matters for that contact. (More on regions: Why Regions?.)

Part 2 · Channels (group messages)

What is a channel?

A channel is a group that shares a key. Whoever has the key is in – they can read and post. A public channel is simply one whose key everyone knows; a private one has a key only your circle holds. There is no member list and no sign-up: the key is the membership.

Channels always flood

With a DM there is a single recipient you can find a path to. With a channel there isn't one – the message is meant for everyone. So there is no path to find: channel messages always flood (like the very first DM, but permanently). Every repeater forwards each one once, until it has spread across the regional network.

No checkmark – no delivery confirmation

The most important difference from DMs: channels have no ACK. Nobody sends a delivery confirmation back (with many recipients that would just be a confirmation storm). Concretely that means:

(Delivering missed messages later is something only room servers do – more on those later.)

Who wrote that? – Careful

In a channel message the sender name is just text inside it ("Name: message"). It is not cryptographically verified – unlike DMs, where the sender is pinned down by their key. On a channel anyone with the key can in principle post under any name. Fine for chit-chat; for anything that matters, DMs are the right way.

Region matters here too

Which repeaters carry a channel message depends on its region. You can assign a channel its own region – that one then wins. If you don't, your default region applies; if that isn't set either, the message goes out globally to every repeater. So a local channel stays local – people in another region only hear you if a repeater bridges both. (Repeaters may also cap flood traffic beyond a hop limit, to protect airtime.)

DM vs. channel – at a glance

Direct messageChannel
Recipientone personeveryone with the key
Routeflood first, then direct (path)always flood
Confirmation (ACK)yes (checkmark)no
Sender verifiedyes (key)no (text only)
Missed?stays "sending"gone (unless room server)

Part 3 · Adverts (announcing yourself)

What is an advert?

An advert is your business card on the network: your device calls out "hi, I'm here" and sends your name, your public key and optionally your position. It is signed – so it can't be spoofed: nobody can impersonate you (unlike the freely chosen name on a channel). This is how contacts appear: as soon as someone hears your advert, you show up in their contact list and they can DM you.

Two ranges: zero-hop and flood

Zero-hopFlood
Reachdirect neighbours onlywhole region (via repeaters)
Repeaters forward it?noyes
Airtime costminimalhigh (every repeater chimes in)
What fora quick local hellobecoming findable everywhere

Who sends when?

Your device only sends an advert when you trigger it (advert button). Repeaters can flood-advert automatically on an interval (factory setting: every 47 h) – but that should be set deliberately:

Recommendation · repeater operators

Best to turn the flood advert off (set flood.advert.interval 0) and use zero-hop only – the repeater becomes known to its neighbours anyway and sits in the paths of normal traffic. If you really want flood, set it to the maximum of 168 h.

Set a region. With a region configured, the flood adverts (and all floods) stay within the region. Without a region the repeater floods globally – its adverts then leak into other regions and cost airtime there too.

Why frequent flood adverts are a problem

A flood advert costs just as much as the first flood DM: every repeater in the region rebroadcasts it once. And unlike a message it carries no content – it is pure "I'm still here" overhead. When many devices flood-advert often:

That's why MeshCore builds in several brakes: repeaters advert rarely by default, adverts are forwarded with lower priority (real messages go first), adverts have a tighter hop limit than normal floods, and the firmware enforces minimum intervals.

Rule of thumb

A flood advert is expensive and carries no content. Repeater operators: flood off (0) + zero-hop + set a region; 168 h in a pinch. Regular users: only press the flood-advert button when you genuinely want to be findable far away – not out of habit.

← back to kiekr.app