Welcome to the Meshtastic Scotland Community!
This post is intended to help new members learn how to setup their nodes to ensure you have the best experience with Meshtastic as part of the Scotland Mesh.
For the most part you should set up your node as per the official documentation, but with 2 notible exceptions:
- You should set your "Max Hops" to 7 (the current maximum at time of writing)
- You should set your Node Info broadcasts to at least 4 hours, and do the same for telemetry broadcasts (If you enable them at all after firmware 2.7.15)
1. Why you should set your "Max Hops" to 7
All the official docs warn against setting your "Max Hops" higher than the default 3, and heavily discourage going above 5. In flat(ish) terrain it can cause routing issues and collisions due to the "managed flood routing" protocol (every node that hears a packet will re-transmit it after a random short delay) which makes sence, however Scotland is not even close to "flat(ish)".
The following explanation is a trimmed and slightly reordered version from the official docs on how the managed flood routing protocol works:
Given the various use-cases and scenarios Meshtastic supports, most of the protocol is built around flooding, meaning that every node rebroadcasts a packet it receives, up till a certain hop limit. However, an important difference in Meshtastic is that before rebroadcasting, a node listens a short while to see if another node has already rebroadcasted the packet. If so, it will not rebroadcast. "Managed Flooding" is therefore a better term.
Meshtastic adopts CSMA/CA, similar as to what is used in WiFi. This means that all transmitters must perform Channel Activity Detection (CAD) before attempting to transmit. If the channel is considered busy, the node will wait until it is not anymore. Since once the channel becomes idle multiple nodes might want to start transmitting, a node has to wait a random multiple of slot times. The slot time is the time needed to reliably perform CAD. The amount of slot times to wait is randomly picked from a contention window (CW), which size depends on the current channel utilization. The contention window is larger for a higher channel utilization, in order to limit the chance of collisions.
The principle is as follows. If any mesh node sees a packet with a HopLimit other than zero, it will decrement that HopLimit and attempt to rebroadcast on behalf of the original sending node. In order to promote letting nodes that are further away flood the message, such that the message eventually reaches farther, the contention window for a flooding message depends on the Signal-to-Noise Ratio (SNR) of the received packet.
The CW size is small for a low SNR, such that nodes that are further away are more likely to flood first and closer nodes that hear this will refrain from flooding. An exception to this rule is for the ROUTER and REPEATER roles, that have a higher priority to rebroadcast and will do so even if they hear another node rebroadcasting, and the opposite for the CLIENT_MUTE role which will never rebroadcast.
With that in mind and taking into account Scotland's topography where even somewhat close towns and cities can be seperated by large hills, we've discovered that getting messages outside of the Clyde Valley is remarkably difficult. However some of our more dedicated members have set up router nodes in really good places (Tomtain and Cant Hills are probably the most notable) but since you may need to hop through a few nodes to reach one of those routers, and then another couple hops to get to the edge of the mesh, we need those extra hops to make sure messages get out as far as they can.
2. Why you should set your Node Info and Telemetry broadcasts to at least 4 hours
We actually have a seperate post explaing why and how to do this which you can find here:
https://meshtastic.scot/d/2-solar-router-power-conservation-from-jppx-on-discord