Hex Prefixes (1/2/3-Byte)
Understanding prefix sizes and avoiding conflicts as the NZ network grows.
Your node’s public key hex prefix is how the network routes packets. Understanding prefix sizes matters for avoiding conflicts as the network grows.
Prefix size comparison
Section titled “Prefix size comparison”| Size | Hex chars | Combinations | Collision risk | Min firmware |
|---|---|---|---|---|
| 1-Byte | 2 (e.g. 3a) |
256 | High | All versions |
| 2-Byte ⭐ | 4 (e.g. 3a7f) |
65,536 | Low | v1.14.0+ |
| 3-Byte | 6 (e.g. 3a7fb2) |
16,777,216 | Very low | v1.14.0+ |
Recommended: 2-byte prefix - the best balance between collision avoidance and compatibility. If your network is on v1.14.0+, switch to 2-byte.
How it works
Section titled “How it works”From a community post by Liam Cottle (MeshCore developer):
- Firmware compatibility: 1-byte packets work on all versions; 2/3-byte packets need v1.14.0+ repeaters.
- v1.14.0+ repeaters forward packets as-is - you don’t need to change
path.hash.modeunless you want the repeater’s own adverts to be 2-byte too. - How repeaters add path bytes: a 1-byte packet gets 1 byte added per hop, a 2-byte packet gets 2, a 3-byte packet gets 3.
- The originator decides - whoever created the packet controls the path size for that packet.
- No coordination needed - no one else has to change their settings. Simple rule: if they’re on v1.14.0+, it works.
Configuring your prefix size
Section titled “Configuring your prefix size”Prefix size is configured per-device in the companion app. The sender controls the prefix size - repeaters match and forward using the same size.
- Open the MeshCore companion app.
- Go to Settings → Path / Routing.
- Find the
path.hash.modesetting. - Select 1-byte, 2-byte, or 3-byte.
- If using 2 or 3-byte mode, make sure all repeaters your packets traverse are on v1.14.0+.
Picking a free prefix
Section titled “Picking a free prefix”- Check what’s in use: NZ Prefix Tool / collision matrix
- Generate keys with the Key Generator until you get a free prefix.
- Found a conflict later? The newest node re-keys - this preserves the existing mesh topology.