icssw-org / MeshCom-Firmware

MeshCom Client 4.0
https://icssw.org/meshcom/
MIT License
13 stars 4 forks source link
amateur-radio emergency-services lora mesh-networks resilience telemetry

MeshCom

MeshCom is indeed an exciting project of the Institute of Citizen Science for Space & Wireless communication (www.icssw.org) aimed at creating a resilient, text-based communication tool for amateur radio operators. It utilizes LORA™ modulation technology and the APRS protocol to establish a mesh network in the 70cm band. The main objectives of MeshCom are to realize a connected off-grid messaging system with low energy consumption and cost-effective hardware. The technical implementation is based on LORA™ radio modules, which can transmit messages, positions, measurements, and more over long distances with low transmit power. MeshCom modules can be connected to form a mesh network or establish a messaging network via MeshCom gateways, ideally connected through HAMNET.

Basic functions:

The main goal is to have a selfbuilding and selfhealing Mesh-Network, that can be enhanced by other components of the Amateur Radio Service, like HAMNET (IP-Network), centralised or distributed Meshcom servers. This will increase coverage to all continents and enable interconnection to other modes and services (APRS, WINLINK, DMR, TETRA-SDS, SOTA-WATCH, POCSAG,VARA-AC, …) building an unified communication plattform. Particulary useful is Meshcom for Emergency Communication (EMCOM) in case of disaster or Blackout. In all usecases terms and rules of Amateur Radio Service (strictly non commercial, experimental) should be respected. This is an open Citizen Science project that should help to promote Amateur Radio Service within academic and society.

Frequency in Region:

EU: 433.175 UK: tbd Nordic: tbd USA: 433.175 Afrika: 433.175 Asia/Pacific: tbd

Lora parameter:

SF: 11 Bandwith: 250kHz CR: 4/6

APRS-Protokoll:

Document: http://www.aprs.org/doc/APRS101.PDF Address: Call-SSID, Source, Target, DIGI1-5 Telemetry: data, formula, units,… Weather: Temp, pressure, rain,… Aim is to be fully compatible to aprs.fi

Hardware:

ESP32/LoRa-Modul, RAK-WISBLOCK, ESP32-DEV4/E22-LoRa, ...

MeshCom 4.0 Firmware

MeshCom is a project to exchange text messages via LORA radio modules. The primary goal is to realize networked off-grid messaging with low power and low cost hardware.

The technical approach is based on the use of LORA radio modules which transmit messages, positions, measured values, telecontrol and much more with low transmission power over long distances. MeshCom modules can be combined to form a mesh network, but can also be connected to a message network via MeshCom gateways, which are ideally connected via HAMNET. This enables MeshCom radio networks, which are not connected to each other via radio, to communicate with each other.

MeshCom Protocol

MeshCom 4.0 uses the APRS PROTOCOL REFERENCE for the source, destination, Digipeater and payload data as defined for APRS. (aprs101.pdf APRS PROTOCOL REFERENCE Version 1.0 2000, Page 12) MeshCom 4.0 verwendet für die Payload-Daten das AX.25 Protokoll, wie es für APRS definiert ist. (aprs101.pdf APRS PROTOCOL REFERENCE Version 1.0 2000, Seite 12)

Terms:

Messages:

Message elements

MeshCom hardware ID

MeshCom LoRa modulations index

Preparations for platform.io VSCode plugin

Flashing Firmware

Usually it is done via the upload button in VSCode directly.

ESP32 Via Command Line:

If you only update the firmware, you only want the corresponding file to flash.
Adresses where to flash each one of the files:

Address File
0x1000 bootloader.bin
0x8000 partitions.bin
0x10000 firmware.bin

Mac: python esptool.py -p /dev/tty.usbserial-<NUMBER> write_flash 0x10000 <PATH-TO-BIN-FILE>/firmware.bin
Linux: same but serial device under /dev can be ttyUSB0 or similar.
Windows: serial device is usually some COM
Ready build firmware can also be flashed via the online tool (Chrome, Edge, Opera):
https://oe1kfr.com/esptool/

Erasing the NVS:

If you want to wipe the settings stored on the node:
python esptool.py --port <SERIAL-PORT> erase_region 0x009000 0x005000

RAK4631 via CLI:

To do so, you need the Adafruit nrfutil. Installation and Usage:
https://github.com/adafruit/Adafruit_nRF52_nrfutil

RAK4631 via UF2 File:

When you double click the button on the module it mounts a USB Device where you can copy an .uf2 file onto the module. To generate that file you need the following Python script:
https://github.com/microsoft/uf2/blob/master/utils/uf2conv.py

./uf2conv.py <PATH_TO-HEX-FILE> -c -o firmware.uf2 -f 0xADA52840