Main Menu

search

You are here

Meshtastic - how it works:

[last updated: 2025-12-20]
Disclaimers
MeshTastic home page
----------



      On This Page:
  • General Description
  • LoRa radios
  • Meshtastic software
  • Interacting with MeshTastic software
  • Message Algorithm:
  • Device configuration
  • Other misc


------------------------------------------------------------------------------------------------------------------------------------

  • General Description:
    • Meshtastic works by having a bunch of nodes spread through some geographical area, and they all talk to each other.
    • Each node is programmed to listen for messages from other nodes in its mesh.
      When it receives a message, it reads the message header (always unencrypted) to determine whether to rebroadcast it or not.
      The message header contains several pieces of information:

      Conditions for rebroadcast:

        If the message destination is this receiving node, then it does not rebroadcast it.
        If the message is a general broadcast message,
        or it is intended for (addressed to) some node other than this receiving node,
        and it has not already exceeded it's "hop"/rebroadcast count limit,
        then the message will be rebroadcast.

    • Nodes:
      A node is composed of a LoRa radio module and a microcontroller that is loaded with meshtastic software.

    ---------------------------------------------------------------------------

  • LoRa radios:
    • LoRa was invented in 2009 by a French company, acquired in 2012 by Semtech
      https://www.semtech.com/lora/what-is-lora
      LoRa radios transmit signals using "CSS" (= chirp spread spectrum), which facilitates robust, error-free communication.
    • Meshtastic was developed in 2020 to create encrypted, long range, low power communication networks (meshes), using LoRa radio modules.
    • LoRa radios (in the US) transmit in a band from 902-928 MHz.
      In the US, meshtastic radios use the "915" MHz band, with actual frequencies ranging from ... 906 ... to ...
      In Europe 433 MHz and other frequencies are also used.
    • Range 2-5 Km, urban, perhaps 15 Km suburban/rural, though up to 100 Km or more has been reported in ideal conditions with a good antenna at high elevation.
    • Power:
      • typ 10-150 mW
      • "Station G2" devices up to 1w
      • Licensed hams can use a "ham mode" with power up to 10 watts, though this disables encryption and requires a valid call sign

    ------------------------------------------------------------------------------------------------------------------------------------

  • Meshtastic software:
    • The MeshTastic software (firmware) is loaded (flashed) onto the microcontroller portion of a meshtastic node.
      It facilitates the assembly of a "mesh", which is a collection of some number of nodes that talk to each other.
    • A collection of nodes can talk to each other, ie. they create a mesh, when they share certain configuration parameters:
      the same center frequency, spreading factor, and bandwidth.
      With those shared parameters, transmissions from one node will be received by any other node within range.
    • The meshtastic software is under continual development, and re-flashing your nodes with the most current version is usually a good idea.
    • After you have flashed your choice of firmware onto your node, you must configure it.
      • There are dozens of parameters you can set, but here are the minimums for a functional node:
          Channels & frequencies:
          Two different channels can be on the same frequency.
          Suppose two nodes are on the same frequency, but on different channels.
          If both channels are unencrypted, then both nodes can read/decode messages from the other node.
          But suppose node-A is transmitting on an encrypted channel (on the same frequency). Node-B will receive and forward messages from node-A,
          but it will not be able to decode and read them.
      • Other parameters you might consider setting:
        ...
      • Other parameters helpful for specific use-cases:
        ...
      • ...
        Values: The Spread Factor is a number from 7 to 12.
        Effect on Performance: This parameter determines a trade-off between communication range and data rate.
        Higher SF (e.g., 12): Increases range and makes the signal more robust to interference, but results in a lower data rate (slower messages) and more "time-on-air", which uses more battery.
        Lower SF (e.g., 7): Provides a higher data rate (faster messages) but a shorter range and worse sensitivity.
        Configuration: The Spreading Factor is part of the "Modem Preset Settings", which are typically set for all channels on a device and cannot be unique per channel.
        Function: Technically, the value indicates the number of chirps per symbol as 1 shifted left by the spread_factor value (1 << SF).

        In addition, the software defines configuration for your specific hardware device, and sets parameters to configure how your node will interact with the mesh.

    ------------------------------------------------------------------------------------------------------------------------------------

  • Interacting with MeshTastic software:
    • 'Interacting with MeshTastic software' means to set config parameters to your desired values
      and downloading/flashing the new config to your microcontroller/node
    • You can use an Android App ...
    • You can use a Linux CLI ...
    • others?

    ------------------------------------------------------------------------------------------------------------------------------------

  • Message Algorithm:

    when it receives a message, if it is a general broadcast message, or if it is intended for some other specific node,
    and it has not already exceeded it's "hop"/rebroadcast count limit, then it will rebroadcast the message.

    ------------------------------------------------------------------------------------------------------------------------------------

  • Device Configuration:
    • from: https://meshtastic.org/docs/configuration/radio/device/
    • The settings necessary to configure your specific hardware device are defined in the meshtastic software user interface,
      and are subsequently flashed/downloaded into your node's microcontroller.
    • Settings available are:
      Role,
      Rebroadcast Mode,
      GPIO for User Button,
      GPIO for PWM Buzzer,
      Node Info Broadcast Seconds,
      Double Tap as Button Press,
      Disable Triple Click,
      Timezone Definition, and
      LED Heartbeat Disabled.
      ---------------------------
    • Role:
      Twelve roles are defined.
      CLIENT: the most common role for general use in a mesh
      CLIENT_MUTE: will not rebroadcast messages
      SENSOR: broadcasts sensor/telemetry data packets as priority (whatever that means...)


      See: https://meshtastic.org/blog/choosing-the-right-device-role/
      for help in picking the best role for your use case.

    • Configure node via serial:
      You can change node configuration from a serial connection, perhaps from an external MCU,
      using the proto mode of the serial module. This mode allows using the full binary client API over the serial port, allowing configuration commands as defined in the Meshtastic protobufs.
        from client.meshtastic...
        Config --> Module Config --> Serial --> enable serial output --> Mode --> proto

    ------------------------------------------------------------------------------------------------------------------------------------

  • Other/Misc:

    ------------------------------------------------------------------------------------------------------------------------------------