Switching MeshCore Repeaters to 2-Byte Path Hash
Quick Reference Guide
Choose 2-byte mode () for the best balance of collision prevention and packet payload efficiency. While 3-byte mode offers over 16 million unique IDs, 2-byte mode provides 65,536 IDs—which solves the high collision rate of 1-byte legacy mode without consuming as much overhead or running into minor trace limitations seen in 3-byte implementations. [1, 2, 3, 4, 5]
Comparison of Path Hash Modes
- 1-Byte Mode (): Legacy default, 254 IDs, high collision risk in dense networks.
- 2-Byte Mode (): Recommended sweet spot, 65,536 IDs, efficient payload size.
- 3-Byte Mode (): Over 16 million IDs, but heavier payload footprint and minor tool quirks (like path tracing restrictions). [1, 2, 3, 4]
See also: Why You Should Switch to 2-Byte Path Hashes in MeshCore (And How Easy It Is) https://tennmesh.com/blog/2byte-path-hashes/
[1] https://nodakmesh.org/blog/meshcore-path-hash-explained
[2] https://blog.meshcore.io/2026/03/06/path-diagnostics-improvements
[3] https://github.com/meshcore-dev/MeshCore/blob/main/docs/faq.md
[4] https://github.com/meshcore-dev/MeshCore/issues/2735
[5] https://www.reddit.com/r/meshcore/comments/1uizjk8/is_there_a_plan_to_make_client_apps_default_path/
Switching to multi-byte path hashes is highly recommended once a regional mesh grows beyond 30 to 40 repeaters to prevent routing collisions.
A path hash is a truncated fingerprint of a repeater’s public key.By default, MeshCore uses a 1-byte hash, which limits the network to 254 unique repeater IDs.If two repeaters in the same region share the same 1-byte hash, packets can be routed in the wrong direction, causing dropped direct messages and failed acknowledgments.
Because the path data in a MeshCore packet is capped at 64 bytes, increasing the size of the hash directly reduces the maximum number of hops a packet can take:
| Mode | Size | Max Hops | Unique IDs | Collision Risk |
| 0 (Default) | 1-byte | 64 | 254 | High in dense meshes |
| 1 (2-byte) | 2-byte | 32 | 65,536 | Effectively zero |
| 2 (3-byte) | 3-byte | 21 | 16,777,216 | Zero |
Prerequisites
- Repeater Firmware:Must be running MeshCore v1.14.0 or newer.
- Companion App: Must be updated to v1.41.0 or newer to properly parse multi-byte hashes in the receive log.
How to Switch via CLI
The most reliable way to change this setting is through a serial command line interface directly to the repeater.
- Establish a serial CLI connection to your repeater over USB.
- Run the following command to set the hash mode to 2-byte:
Bashset path.hash.mode 1 - (Optional) If you ever need to revert to 1-byte hashes, run
set path.hash.mode 0. For 3-byte hashes, useset path.hash.mode 2.
Once enabled, the repeater will automatically encode its 2-byte prefix into the path field of all forwarded packets.
Compatibility Note: It is perfectly safe to enable
path.hash.mode 1on any repeater running firmware 1.14+.Because the hash size is encoded directly into the upper bits of the packet’spath_lengthbyte, receiving nodes instantly know how to parse the route—no network-wide negotiation is required.See also: Why You Should Switch to 2-Byte Path Hashes in MeshCore (And How Easy It Is) https://tennmesh.com/blog/2byte-path-hashes/
RELATED: MeshCore Regions Setup


Leave a Reply