Skip to content

Instantly share code, notes, and snippets.

View recrof's full-sized avatar

Rastislav Vysoky recrof

  • Bratislava, Slovakia
View GitHub Profile

MeshCore Packet Structure

The protocol uses a layered packet structure. The "On-the-Wire" format is the raw data transmitted by the radio, which contains the logical Packet object.

1. On-the-Wire Format

This is the raw byte sequence sent over the air.

[Header (1)] [Transport Codes (4)?] [Path Length (1)] [Path (N)] [Payload (M)]

MeshCore routing for dummies

Imagine you're in a large, crowded room, and you want to get a message to your friend, Zoe, who is on the other side. You don't know the best way to get the message to her. This mesh network system uses two main strategies to solve this problem.

1. Discovering a Path: "Shouting into the Crowd" (Flood Routing)

This is how a device finds a path to another device for the first time.

  • The Initial Shout: Your device (let's call it Node A) wants to find Node Z. It sends out a special "discovery" message. Think of this as shouting, "Message for Zoe! If you hear this, sign your name and pass it on!" This is called a Flood packet.