Skip to content

About

MeshCore LoRa mesh firmware for M5Stack Unit C6L - M5Burner distribution

Resources

Stars

32 stars

Watchers

6 watching

Forks

Repository files navigation

MeshCore Firmware for M5Stack Unit C6L

Pre-built MeshCore LoRa mesh firmware for M5Stack Unit C6L.

Status: Experimental

Firmware Variants

Variant Description
Companion Radio BLE Connect via phone app over Bluetooth, shows PIN on display
Companion Radio USB Connect via USB serial
Repeater Relay packets for mesh network
Room Server Host a chat room

Installation

Via esptool

Download the merged binary and flash at address 0x0:

esptool write_flash 0x0 firmware_companion_radio/m5stack_unit_c6l_companion_radio_ble.bin

Via M5Launcher

Copy the merged .bin file to your SD card and install via M5Launcher.

Via PlatformIO (from source)

git clone https://github.com/TheRealHaoLiu/MeshCore
cd MeshCore
git checkout main-m5stack-unit-c6l
pio run -e m5stack_unit_c6l_companion_radio_ble -t upload

Dual-Firmware OTA Switching

The Unit C6L supports storing two different firmwares simultaneously and switching between them by holding a button. This is useful for running e.g. companion radio + repeater on a single device.

Flashing two firmwares

The ESP32-C6 partition table (min_spiffs.csv) has two OTA app slots:

Partition Offset Size
ota_0 (app0) 0x10000 1,920 KB
ota_1 (app1) 0x1F0000 1,920 KB

Step 1: Flash the primary firmware normally (this writes to ota_0):

esptool write_flash 0x0 firmware_companion_radio/m5stack_unit_c6l_companion_radio_ble.bin

Step 2: Flash the secondary firmware to ota_1 using the firmware_0x10000.bin file (not the merged binary):

esptool write_flash 0x1F0000 firmware_repeater/firmware_0x10000.bin

Note: Use the firmware_0x10000.bin file for the second slot, not the merged binary. The merged binary includes the bootloader and partition table which are already flashed in Step 1.

Switching between firmwares

Hold the BOOT button while powering on or resetting the device.

The button must be held for at least 500ms. Feedback:

  • Two ascending tones = success, device reboots into the other firmware
  • Three short low beeps = the other partition has no valid firmware
  • Nothing = button wasn't held long enough

Each press toggles between ota_0 and ota_1.

Hardware

  • ESP32-C6 + SX1262 LoRa
  • 64x48 SSD1306 OLED display (SPI)
  • NeoPixel LED (TX indicator)
  • Buzzer
  • I/O expander (PI4IO) for button and RF control

Default Settings

  • Frequency and radio parameters are configured via the MeshCore companion app
  • Default admin password: password
  • Default room password: hello

Links

License

MIT

About

MeshCore LoRa mesh firmware for M5Stack Unit C6L - M5Burner distribution

Resources

Stars

32 stars

Watchers

6 watching

Forks

Releases

Packages

Contributors