Multibyte paths

“Multibyte” is short for multibyte path hashes: a longer ID for each repeater in the route a message takes. On Oklahoma Mesh we use 2-byte IDs, on companions and repeaters alike.

The two setup guides each cover this in a line or two. This page puts the reasons and the steps in one place.

The short version

Your radioWhat to setWhere
CompanionDefault path hash size: 2 bytesMeshCore app: settings cog, then Network Settings
RepeaterPath hash mode 1Typed command: set path.hash.mode 1

Both need MeshCore firmware v1.14 or newer.

What a path hash is

Every message carries a list of the repeaters it passed through. That list is the message’s path. It’s how a reply finds its way back, and how a repeater knows it has already handled a message.

Each repeater in the list is written as a short ID, taken from the start of its public key. That ID is the path hash. Out of the box it’s 1 byte long.

Why 1 byte isn’t enough

One byte only has room for 256 different IDs. A network with a few dozen repeaters will very likely have two that share one, and every repeater added makes it more likely.

When two repeaters share an ID:

With 2 bytes there are 65,536 IDs, so two repeaters sharing one is rare.

SizeModeDifferent IDsMost hops a message can make
1 byte025664
2 bytes (ours)165,53632
3 bytes216,777,21621

What it costs

What you need

Older repeaters drop these messages. A repeater on firmware older than v1.14 doesn’t understand the longer IDs, and it quietly ignores any message that uses them. So the most useful thing a repeater owner can do for multibyte is keep the firmware current.

Set it on a companion

  1. Open the MeshCore app and connect to your radio.
  2. Tap the settings cog, then Network Settings.
  3. Set Default path hash size to 2 bytes.

From then on, the messages you send use 2-byte IDs. The radio that sends a message decides the size for that message, and every repeater along the way keeps to it.

If you take your radio to another network and your messages stop getting through, the repeaters there may be on older firmware. Set it back to 1 byte while you’re there.

Set it on a repeater

Send this command, over USB from config.meshcore.io or from the app’s command line once you’re logged in to the repeater:

set path.hash.mode 1

To check it:

get path.hash.mode

Mode 1 means 2 bytes. Mode 0 is 1 byte and mode 2 is 3 bytes.

This setting covers less than you might expect. It only sets the ID size the repeater uses in its own announcements (its adverts). It doesn’t change what the repeater passes along. A repeater on v1.14 or newer passes along 1-, 2- and 3-byte messages whatever this is set to.

So for a repeater there are two separate jobs:

  1. Update to v1.14 or newer, so it passes along everyone’s 2-byte messages.
  2. Set mode 1, so its own adverts match the rest of the network.

Mixing sizes

Each message says which size it uses, so different sizes work side by side. A radio from a network that uses 3-byte IDs gets through our repeaters, and ours get through theirs, as long as the repeaters are on v1.14 or newer.

References