VK4PK - Meshtasic

Meshtastic

Contents:


Related Pages:


Introduction

Here are my notes on Meshtastic to-date. It is mostly about the CLI on Ubuntu 24.10.
Please note that this is still a work-in-progress and I have much to learn. My observation is that it is very much a system still under development. The CLI lacks consistency and the ACM (Abstract Control Model ) serial UART (universal asynchronous receiver-transmitter) port is problematic on ARM (Advanced RISC Machine) based MCU's ( microcontroller units).

I have predominatly explored the Meshtastic Command Line Interface setup method on Ubuntu 24.10, with some references to the Web Client and the Andriod Application.

I am using the Heltec HTIT-Tracker V1.1 loaded with the esp32s3-2.5.18.89ebafc version of the firmware.

Chipsets on the Heltec are:

  • Microcontroller - ESP32-S3FN8, Xtensa 32-bit lx7 dual core processor
  • LoRa Chipset - SX1262, Simtech's LoRa Node Module, Frequency Band 433M (410~525MHz)
  • GNSS Chipset - UC6580, Unicore's GPS
    [Home]

Meshtastic - A Mesh Network

An open source, off-grid, decentralized, mesh network built to run on affordable, low-power devices

It’s a mesh network – a set of interconnected radio devices – for communication of short text messages and small data packets. The data is usually used to share device locations and related information. This makes it perfect for chatting and sharing where you are, or for tracking objects and vehicles. It also has other, more specialised uses.


Meshtasic Web Sites

Mestastic Home Page:https://meshtastic.org/
The Australian Meshtastic Home page:https://meshtastic.au/wp/?page_id=47
Meshtastic Configuration:https://meshtastic.org/docs/configuration/
Meshtastic Python CLI Guide:https://meshtastic.org/docs/software/python/cli/


Install "esptool" on Ubuntu

Installing Firmware on Heltec Tracker (esp32s3) using esptool

Requires USB-C data cable for serial connection and power.

Other methods for flashing the ESP32 Devices:
https://meshtastic.org/docs/getting-started/flashing-firmware/esp32/

Firmware download Page:https://meshtastic.org/downloads/


Install the meshtastic CLI on Ubuntu

All testing was performed on the Heltec Tracker v1.1. (Heltec V3). See: R25-heltec.html

System Platform Enviorment:

Platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.39
Release: 6.8.0-51-generic
Machine: x86_64
Encoding (stdin): utf-8
Encoding (stdout): utf-8
meshtastic: v2.5.11
Executable: /home/glenn/.local/bin/meshtastic
Python: 3.12.3 CPython GCC 13.3.0

Configure the Configs

Meshtastic is divided into two groups of parameters; Configs and Preferences. The Preference are grouped with a prefix, eg "lora.", "network.", or "mqtt.". They use the command formats --get and --set The config are more random meshrastic verbs as can be seen below. They can be referenced using --info | grep and --export-config and the output is json format. I am not sure how to obtain the complete set of either. I do think the Version of the meshtastic cli has to closly match the firmware version to be reliable, I have the meshtastic cli version 2.5.11 and firmware version 2.5.18. I am hoping that is close enough.


Configure Network (WIFI, Bluetooth, Serial)


role # meshtastic --set lora.region ANZ # defauts to 915 MHz # triggers a reboot meshtastic --set lora.region MY_433 # to get 433 band meshtastic --get lora.bandwidth lora.channel_num lora.coding_rateFappen lora.config_ok_to_mqtt lora.frequency_offset lora.hop_limit lora.ignore_incoming meshtastic --set lora.region MY_433 # forces a reboot lora.ignore_mqtt lora.modem_preset meshtastic --set lora.override_duty_cycle lora.override_frequency lora.pa_fan_disabled lora.spread_factorrole

Frequency Slot Calculator:

The transmit frequency ranges employed are specific to each Region and

The Spread Spectrum Frequenies for MY_433 that is set to LONG_FAST:

  1. 433.125 MHz
  2. 433.375 MHz
  3. 433.625 MHz
  4. 433.625 MHz
    role5. 434.875 MHz

This table shows the numberic value for each of the Region Codes. The meshtastic CLI uses numberic values as well as alph-numeric codes to address the regions:

<-- bartab.sh:lora-region-codes.tab:START:Start of table generated -->

No. Region Code Description Frequency Range (MHz) Duty Cycle (%) Power Limit (dBm)
0 UNSET Unset n/a n/a n/a
1 US United States 902.0 - 928.0 100 30
2 EU_433 European Union 433MHz 433.0 - 434.0 10 12
3 EU_868 European Union 868MHz 869.4 - 869.65 10 27
4 CN China 470.0 - 510.0 100 19
5 JP Japan 920.8 - 927.8 100 16
6 ANZ Australia & New Zealand 915.0 - 928.0 100 30
7 KR Korea 920.0 - 923.0 100
8 TW Taiwan 920.0 - 925.0 100 27
9 RU Russia 868.7 - 869.2 100 20
10 IN India 865.0 - 867.0 100 30
11 NZ_865 New Zealand 865MHz 864.0 - 868.0 100 36
12 TH Thailand 920.0 - 925.0 100 16
13 LORA_24 2.4 GHz band worldwide 2400.0 - 2483.5 100 10
14 UA_433 Ukraine 433MHz 433.0 - 434.7 10 10
15 UA_868 Ukraine 868MHz 868.0 - 868.6 1 14
16 MY_433 Malaysia 433MHz 433.0 - 435.0 100 20
17 MY_919 Malaysia 919MHz 919.0 - 924.0 100 27
18 SG_923 Singapore 923MHz 917.0 - 925.0 100 20

Configure mqtt - Message Queuing Telemetry Transport

Other Usefull Meshtastic Commands

Useful Meshtastic Commands roleheck we are on 433 MHz meshtastic --get lora.region # displays a decimal value meshtastic --info | grep longName # Should now be VK4PK-01 meshtastic --info | grep shortName # random 4 char string


Meshtastic on the Command Line

Meshtastic Web Client

Meshtastic Web Flasher:https://flasher.meshtastic.org/

Mestastic Web Desktop:https://client.meshtastic.org/


role

Meshtastic on Linux


meshtastic --setlat -27.6421 --setlon 153.4135 --setalt 20 # turn off gps and set fixed location manually meshtastic --set-canned-message "Hi from VK4PK" # Standard messageimal value. Use --info | grep for text label role

Meshtastic on Android

Use playstore to install Meshtastic App


Videos

How LoRa Modulation really works - long range communication using chirps:
https://www.youtube.com/watch?v=jHWepP1ZWTk
How LoRa Modulation really works - long range communication using chirps:https://youtu.be/aWtqm7lbYoo


Notes

  1. A wifi pasword beginning "0" and is all numeric, when set with CLI fails with the message "4WAY_HANDSHAKE_TIMEOUT", which in this case means wrong password as the leading zero is dropped.

  2. Mestastic will not pipe into "less" but will pipe into more.
    eg the command "mestaitic --info | less" fails.
    The "--set lora.region" and "--set-ham" commands change other paramates.
    What are they?4. "--get >preference<" commands, as opposed to --get->preference< (note the space), does not work for config-type attributes. It only works for preference-type attributes.

  3. When a command fails the message is headed:
    "LocalConfig and LocalModuleConfig do not have attribute owner." Why? What does this imply?

  4. A "--get device.role" returns "0" when set to "CLIENT"
    See meshtastic.org information on roles

  5. Setting and Getting the region code
    After many hours of work I decided to set the lora.region. After much experimenting, (I should have downloaded the source code and extracted the headers instead of experimenting.) I found the CLI set command requires a decimal number eg ANZ is "6" and MY_433 is "16". The get command returns the same number if set correctly, However, the "meshtastic get --info | grep region" returns the enumerated string, eg "MY_433".Anyway, I set this preference to "13" or LORA_24 and now the reboot will not complete and the white LED stays brightly lit and the flag page keeps reappearing. Now I will have to reload the firmware and reset all the configs and preferences. These heltec units do seem a little FLAKY! The set may not be the cause of the fault. MOre testing is required.

    This is CONFIRMED. Setting the lora.region to LORA_24 prevent the Heltec Tracker 433 from completing the boot. I know it is the wrong freq but it should handle it better than that. My fw vers is "firmware-esp32s3-2.5.18.89ebafc" if you want to try this at home.
    [Home]


Channels

The "meshtastic --info" has these lines as the last of the output. What are the implications?

Channels:
  Index 0: PRIMARY psk=default { "psk": "AQ==", "moduleSettings": { "positionPrecision": 13, 
  "isClientMuted": false }, "channelNum": 0, "name": "", "id": 0, "uplinkEnabled": false, 
  "downlinkEnabled": false }

Primary channel URL: https://meshtastic.org/e/#CgcSAQE6AggNEgwIATgQQANIAVAUaAE

Location and Coverage Maps

The Meshtastic.org Coverage Map:https://site.meshtastic.org/

To generate a coverage map:

  1. Plug in the Lat and Long and other parameters as required,
  2. Select Center Map
  3. Select Run Simulator and wait https://github.com/HelTecAutomation/protobufs?tab=readme-ov-file

Another godd coverage map is:https://www.heywhatsthat.com/


Appendix A: A list mestastic "preferences" attributes (but no "config" attributes!)


Glenn Lyons VK4PK
glenn@LyonsComputer.com.au
Ver:gnl20240401 - pre published v0.9