NH Mesh

Mesh Network Simulator

Visualize and test Meshtastic managed flood routing with our interactive simulator. See how messages propagate through a mesh network with physical obstacles.

How to Use the Simulator

Introduction

This interactive simulation demonstrates how Meshtastic's Managed Flooding protocol works to route messages through a mesh network of nodes. The simulation shows how messages propagate through a wireless network with physical barriers and limited transmission ranges.

Key Concepts Illustrated:

  • Packet flooding mechanisms
  • Collision avoidance (CSMA/CA)
  • The impact of physical barriers on transmission
  • Efficient path finding in multi-hop networks

Getting Started

  1. Launch the Simulator: The simulation starts automatically with default settings.
  2. Initial View: You'll see a grid of white nodes (representing Meshtastic devices), mountain-like barriers, and messages propagating as expanding rings.
  3. Observe Message Flow: Watch as a message travels from a randomly selected blue sender node to a red target node.

Understanding the Visualization

Node Colors

  • White: Untouched node
  • Blue: Sender node
  • Orange: Received, will retransmit
  • Green: Actively retransmitting
  • Red: Target node
  • Grey: Faded (max hops reached)

Message Transmission

  • White Rings: Expanding message transmissions
  • Green Path: Final highlighted optimal path
  • White Lines: All message paths
  • Numbers on Lines: Hop count

CSMA Indicators

  • Cyan: Listening to channel
  • Green: Transmitting
  • Magenta: Backing off
  • Red: Transmission failed

Using the Controls

Simulation Controls

  • Run Simulation: Restarts with new parameters
  • Reset Current Simulation: Keeps the same layout but starts a new message

Visualization Options

  • Show sensing ranges: Toggle CSMA detection ranges
  • Show transmission ranges: See node transmission limits
  • Enable collision detection: Turn CSMA on/off

Adjustable Parameters

Network Parameters
  • Total Nodes (5-100): Network density
  • Total Obstacles (0-10): Mountain barriers
  • Max Hops (2-7): Maximum retransmissions
CSMA Parameters
  • Listen Time (50-300ms): Channel check duration
  • Check Range (200-600px): Activity detection distance
  • Max Retries (1-10): Maximum transmission attempts

Experimentation Scenarios

Scenario 1: Dense vs. Sparse Networks

  1. Try setting nodes to 10 (sparse) vs. 50 (dense)
  2. Observe differences in path efficiency and reliability

Scenario 2: Impact of Obstacles

  1. Run with 0 obstacles, then with 10 obstacles
  2. Notice how barriers force messages to route around them

Scenario 3: Hop Count Limits

  1. Set max hops to 2, then to 7
  2. Observe how limiting hops affects network coverage

Scenario 4: CSMA Effects

  1. Enable/disable collision detection
  2. Adjust listen time and check range

Interpreting Results

Success or Failure

  • Successful Delivery: Green path shows the optimal route
  • Failed Delivery: No green path appears, message failed to reach target
  • Grey Nodes: Show network limitations (hop count or physical gaps)
  • Distance Labels: Help identify network coverage gaps

Statistics

  • Total Retransmissions: Message forwarding count
  • Nodes Involved: Participation count
  • Final Hop Count: Length of successful path
  • Efficiency: Hop count / retransmissions
  • Backoffs/Failed Transmissions: CSMA collision metrics

Technical Background

This simulation demonstrates the Meshtastic Managed Flood protocol, which ensures reliable message delivery through controlled message flooding. Unlike basic flooding that can overwhelm networks, managed flooding:

  1. Limits message propagation by hop count
  2. Uses CSMA to avoid collisions
  3. Prevents redundant retransmissions
  4. Finds efficient paths through challenging terrain

Understanding these concepts is essential for planning effective Meshtastic deployments in real-world scenarios.

Tips for Optimal Learning

  • Start with default settings to understand basic behavior
  • Make one change at a time to see its specific impact
  • Look for patterns in how messages propagate around obstacles
  • Compare efficiency statistics across different configurations
  • Watch for collision events (red indicators) to understand wireless contention
  • Observe how the final highlighted path may not be the shortest geographic distance