Skip to content

j4c0s/MeshCore-C3

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2,999 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›° ESP32-C3 Super Mini Repeater Build Guide

This guide describes how to build a MeshCore repeater using the compact ESP32-C3 Super Mini board, an SX1262 (RA62) LoRa module, and an optional DS3231 RTC for precise timekeeping.

πŸ›  Hardware Requirements

  • ESP32-C3 Super Mini
  • SX1262 LoRa Module (e.g., Ebyte E22 or RA62)
  • DS3231 RTC Module (optional, for offline timekeeping)
  • TP4056 Charging Module
  • 3.7V Li-Po or Li-ion Battery
  • LoRa Antenna (appropriate for your frequency, e.g., 868MHz)

πŸ“Œ Pinout & Wiring

1. ESP32-C3 to SX1262 (LoRa)

SX1262 Pin ESP32-C3 Pin Description
VCC 3.3V Power (3.3V)
GND GND Ground
NSS GPIO 8 SPI Chip Select
SCK GPIO 10 SPI Clock
MOSI GPIO 7 SPI MOSI
MISO GPIO 6 SPI MISO
DIO1 GPIO 3 Interrupt
BUSY GPIO 4 Busy Signal
RESET GPIO 5 Reset

2. ESP32-C3 to DS3231 (RTC)

Note: Make sure to use the I2C pins defined in the configuration (GPIO 1 & 2).

DS3231 Pin ESP32-C3 Pin Description
VCC 3.3V Power (3.3V)
GND GND Ground
SDA GPIO 1 I2C Data
SCL GPIO 2 I2C Clock

3. Power Supply (TP4056)

  • TP4056 B+ / B-: Connect to the Battery terminals.
  • TP4056 OUT+: Connect to ESP32-C3 5V (VBUS) pin.
  • TP4056 OUT-: Connect to ESP32-C3 GND.

⚑ Assembly Tips

  1. Antenna: NEVER power on the LoRa module without an antenna connected. It can damage the chip.
  2. I2C Pull-ups: The DS3231 module usually has built-in pull-up resistors. If you are using raw chips, add 4.7kΞ© resistors between SDA/SCL and 3.3V.
  3. Battery: A 18650 cell or a flat Li-Po battery works great for long-term repeater use.
  4. Power Saving: You can remove or cut the PowerLED on the ESP32-C3 and the LED on the RTC module to save approximately 2mA of current. An idle current of ~7.5mA can be achieved with powersaving on enabled in the CLI.

πŸ“’ Periodic Message Configuration

The simple_repeater example supports periodic text messages that can be sent to a specific channel. These settings are persisted to the device's filesystem.

CLI Commands:

  • periodic <interval_seconds>: Set the interval in seconds between messages.
  • periodic interval <seconds>: Same as above.
  • periodic hour <0-23>: Set a specific hour (UTC) to send a daily message.
  • periodic text <message>: Set the text content of the message.
  • periodic chan <name>: Set the channel name (e.g., Public).
  • periodic key <hex_key>: Set the 32-character hex secret key for the channel.

About MeshCore

MeshCore is a lightweight, portable C++ library that enables multi-hop packet routing for embedded projects using LoRa and other packet radios. It is designed for developers who want to create resilient, decentralized communication networks that work without the internet.

πŸ” What is MeshCore?

MeshCore now supports a range of LoRa devices, allowing for easy flashing without the need to compile firmware manually. Users can flash a pre-built binary using tools like Adafruit ESPTool and interact with the network through a serial console. MeshCore provides the ability to create wireless mesh networks, similar to Meshtastic and Reticulum but with a focus on lightweight multi-hop packet routing for embedded projects. Unlike Meshtastic, which is tailored for casual LoRa communication, or Reticulum, which offers advanced networking, MeshCore balances simplicity with scalability, making it ideal for custom embedded solutions, where devices (nodes) can communicate over long distances by relaying messages through intermediate nodes. This is especially useful in off-grid, emergency, or tactical situations where traditional communication infrastructure is unavailable.

⚑ Key Features

  • Multi-Hop Packet Routing
    • Devices can forward messages across multiple nodes, extending range beyond a single radio's reach.
    • Supports up to a configurable number of hops to balance network efficiency and prevent excessive traffic.
    • Nodes use fixed roles where "Companion" nodes are not repeating messages at all to prevent adverse routing paths from being used.
  • Supports LoRa Radios – Works with Heltec, RAK Wireless, and other LoRa-based hardware.
  • Decentralized & Resilient – No central server or internet required; the network is self-healing.
  • Low Power Consumption – Ideal for battery-powered or solar-powered devices.
  • Simple to Deploy – Pre-built example applications make it easy to get started.

🎯 What Can You Use MeshCore For?

  • Off-Grid Communication: Stay connected even in remote areas.
  • Emergency Response & Disaster Recovery: Set up instant networks where infrastructure is down.
  • Outdoor Activities: Hiking, camping, and adventure racing communication.
  • Tactical & Security Applications: Military, law enforcement, and private security use cases.
  • IoT & Sensor Networks: Collect data from remote sensors and relay it back to a central location.

πŸš€ How to Get Started

For developers:

The Simple Secure Chat example can be interacted with through the Serial Monitor in Visual Studio Code, or with a Serial USB Terminal on Android.

⚑️ MeshCore Flasher

We have prebuilt firmware ready to flash on supported devices.

  • Launch https://meshcore.io/flasher
  • Select a supported device
  • Flash one of the firmware types:
    • Companion, Repeater or Room Server
  • Once flashing is complete, you can connect with one of the MeshCore clients below.

πŸ“± MeshCore Clients

Companion Firmware

The companion firmware can be connected to via BLE, USB or Wi-Fi depending on the firmware type you flashed.

Repeater and Room Server Firmware

The repeater and room server firmware can be set up via USB in the web config tool.

They can also be managed via LoRa in the mobile app by using the Remote Management feature.

πŸ›  Hardware Compatibility

MeshCore is designed for devices listed in the MeshCore Flasher

πŸ“œ License

MeshCore is open-source software released under the MIT License. You are free to use, modify, and distribute it for personal and commercial projects.

Contributing

Please submit PR's using 'dev' as the base branch! For minor changes just submit your PR and we'll try to review it, but for anything more 'impactful' please open an Issue first and start a discussion. It is better to sound out what it is you want to achieve first, and try to come to a consensus on what the best approach is, especially when it impacts the structure or architecture of this codebase.

Here are some general principles you should try to adhere to:

  • Keep it simple. Please, don't think like a high-level lang programmer. Think embedded, and keep code concise, without any unnecessary layers.
  • No dynamic memory allocation, except during setup/begin functions.
  • Use the same brace and indenting style that's in the core source modules. (A .clang-format is probably going to be added soon, but please do NOT retroactively re-format existing code. This just creates unnecessary diffs that make finding problems harder)

Help us prioritize! Please react with thumbs-up to issues/PRs you care about most. We look at reaction counts when planning work.

Running unit tests

To run unit tests, run the following command:

pio test --environment native --verbose

Road-Map / To-Do

There are a number of fairly major features in the pipeline, with no particular time-frames attached yet. In very rough chronological order:

  • Companion radio: UI redesign
  • Repeater + Room Server: add ACL's (like Sensor Node has)
  • Standardise Bridge mode for repeaters
  • Repeater/Bridge: Standardise the Transport Codes for zoning/filtering
  • Core + Repeater: enhanced zero-hop neighbour discovery
  • Core: round-trip manual path support
  • Companion + Apps: support for multiple sub-meshes (and 'off-grid' client repeat mode)
  • Core + Apps: support for LZW message compression
  • Core: dynamic CR (Coding Rate) for weak vs strong hops
  • Core: new framework for hosting multiple virtual nodes on one physical device
  • V2 protocol spec: discussion and consensus around V2 packet protocol, including path hashes, new encryption specs, etc

πŸ“ž Get Support

  • Report bugs and request features on the GitHub Issues page.
  • Find additional guides and components on my site.
  • Join MeshCore Discord to chat with the developers and get help from the community.

About

Fork for ESP32-C3 Super Mini with WIO SX1262

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 61.3%
  • C++ 37.6%
  • Other 1.1%