MeshCore regions#
Regions let a mesh limit how far flood traffic travels. A message scoped to a region is only repeated by repeaters that carry that region, so local chatter doesn't spread across a whole state or country.
This page is mostly for people running repeaters. Ask your local mesh which regions they use before setting any up.
How repeaters use regions#
Each repeater keeps a list of regions, and each region either allows or blocks flooding. When a flood packet arrives:
- A packet scoped to a region is repeated only if this repeater has a region of that exact name with flooding allowed. Otherwise it's dropped here.
- An unscoped packet follows the setting for
*, which stands for "no region". Flooding is allowed for it by default.
Regions are arranged as a tree, such as us › us-co › den, but that's only for organizing
them. Forwarding matches on the name alone, so a repeater that carries only den won't repeat a
message scoped to us-co. That's why a repeater carries the whole chain, from the widest region
down to its own area.
Some guides describe the tree as making parent-scoped traffic pass through child regions. It only looks that way because the repeater also carries the parent region. The match itself is on the name, as MeshCore's repeater code shows.
Regions only affect repeating. Companions still hear everything in range, and the app chooses which region, if any, a message you send is scoped to.
Setting up a repeater#
Firmware 1.16 and newer#
Use region def to create a whole chain in one line. Each name becomes a child of the one
before it, with flooding allowed:
region def us us-co den
region save
The reply shows the resulting tree, so check it before you save. region save keeps the
changes across reboots.
region def adds to the existing tree
It doesn't clear regions you already have. If a name already exists, it's moved under the
new parent, and everything else stays. To start clean, region remove the regions you don't
want first, children before parents.
Firmware 1.15 and older#
Older firmware doesn't have region def. Add each region with region put, giving its parent:
region put us
region put us-co us
region put den us-co
region allowf us
region allowf us-co
region allowf den
region save
On 1.15, region put already allows flooding and replies OK - (flood allowed), so the
allowf lines are only a safeguard. Before 1.15, a new region blocks flooding until you
allowf it.
Whichever version you run, type region afterwards to check the tree and each region's
setting.
Unscoped traffic#
Messages sent without a region rely on *. As long as it allows flooding, the repeater keeps
repeating them, which is the default. A mesh can block them with region denyf * once most
people scope their messages, but that cuts off anyone who hasn't caught up. Meshes that do it
usually announce a date well in advance.
Choosing region names#
Local meshes usually agree on a naming scheme, so use theirs rather than inventing your own. In
the US, a common pattern is us for the country and us- plus the state code for each state,
like us-co, with local names below that, such as den or bay-area. Elsewhere, meshes often
use their country's ISO province or state codes, like nl-ut. Names are lowercase letters,
digits and hyphens, up to 29 bytes. RegionMesh's US guide
covers the US conventions in more detail.
A few habits keep regions useful:
- Carry only your own chain. A repeater doesn't need every region in its state, just the ones its own area belongs to.
- Don't go too small. Mesh paths are often roundabout, and a message to the next town over may pass through repeaters well outside it. A region too narrow for that path cuts the message off.
- Be careful at borders. A high site near a boundary may hear both sides, but carrying both areas' chains lets their traffic flow through it. Agree on that with both meshes rather than adding it by default.
The full set of region commands is in MeshCore's CLI reference.