Skip to main content

MeshCore Routing: Flood-First, Direct-Route-After

This page describes MeshCore's routing mechanism as verified from docs/packet_format.md in the official MeshCore repository. Note: earlier versions of this page incorrectly used AODV terminology (RREQ/RREP). MeshCore does not use that terminology or protocol.

How MeshCore Routing Actually Works

MeshCore uses a flood-first, direct-route-after mechanism:

Step 1: Flood Routing (First Message)

When a node sends a message to a destination it has no path for, the packet uses ROUTE_TYPE_FLOOD. Every repeater in range re-broadcasts the packet (subject to flood limits). The destination node receives the message through whatever path it arrived on.

Step 2: Path Return

The destination node responds by sending back a PAYLOAD_TYPE_PATH packet. This packet contains the complete list of repeaters through which the original flooded message arrived. The path travels back to the original sender.

Step 3: Direct Routing (Subsequent Messages)

Armed with the learned path, the sender now uses ROUTE_TYPE_DIRECT for subsequent messages. The packet embeds the repeater list, and only those specific repeaters forward it. All other repeaters ignore the packet entirely.

Why This Is More Efficient Than Pure Flooding

  • After the initial flood, all subsequent messages in a conversation use direct routing — dramatically less channel airtime
  • A busy network with many established conversations generates far less channel overhead than a pure flood mesh
  • Path re-learning happens automatically if a direct-routed message fails (falls back to flood)

Route Types Reference

Route TypeWhen Used
ROUTE_TYPE_FLOODInitial contact; all group/channel messages
ROUTE_TYPE_DIRECTPoint-to-point after path is known
ROUTE_TYPE_TRANSPORT_FLOODFlood with regional transport code
ROUTE_TYPE_TRANSPORT_DIRECTDirect-routed with regional transport code

Source: docs/packet_format.md in the official MeshCore repository. Verified 2026-05-03.