Not amateur radio
Managed flooding
Every node may rebroadcast, but nodes listen first and stay quiet if a neighbor already did.
Not amateur radio
Every node may rebroadcast, but nodes listen first and stay quiet if a neighbor already did.
Flooding is the simplest way to cross a mesh when nobody knows where anyone is: every node that hears a packet repeats it, up to a hop limit. Nothing has to be mapped first, so it copes with nodes that move, appear or disappear. The price is airtime, because every repeat uses the one shared channel (see Mobile ad hoc networks (MANETs)).
If every neighbor repeated at once, they would collide. The Meshtastic documentation calls its approach managed flooding, because a node listens before it repeats:
Before sending, a node checks that the channel is free, as Wi-Fi does (the documentation calls this CSMA/CA). If it is busy, the node waits a random number of short slots, chosen from a window that grows as the channel gets busier, which lowers the chance of two nodes starting together.
A broadcast has no reply to wait for, so the sender treats any rebroadcast it hears, from any Meshtastic node whether or not it shares the key, as an implicit acknowledgement. If it hears none, it sends again, up to three sends in all for a reliable broadcast.
A direct message is first flooded. The node notes which neighbors relayed it, and when a reply comes back through one of them, that neighbor is remembered as the next hop. From then on only that node relays, which saves airtime. The choice is made hop by hop, and the node falls back to flooding on its last retry if it does not hear its next hop relay.