Initial release: Meshtastic v2.7.19 for Seeed XIAO ESP32-C3 + Wio SX1262

This commit is contained in:
i6mods committed 2026-01-31 22:26:22 +00:00
commit af2dcd0d3d
11 files changed
+506

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
# macOS
.DS_Store
._*
# Editor
.vscode/
.idea/
*.swp
*.swo
# Build artifacts (if building from source)
.pio/
.pioenvs/
.piolibdeps/
# Temporary files
*.tmp
*.log
+170
View File
@@ -0,0 +1,170 @@
# Meshtastic Firmware for Seeed XIAO ESP32-C3 + Wio SX1262
Custom Meshtastic firmware for the **Seeed XIAO ESP32-C3** with **Wio SX1262 LoRa module** in stacked configuration.
![Version](https://img.shields.io/badge/meshtastic-v2.7.19-blue)
![Hardware](https://img.shields.io/badge/hardware-ESP32--C3-green)
![Radio](https://img.shields.io/badge/radio-SX1262-orange)
## 📦 Hardware Requirements
- [Seeed XIAO ESP32-C3](https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/) development board
- [Wio SX1262 LoRa module](https://wiki.seeedstudio.com/wio_sx1262/) (868MHz/915MHz depending on region)
- 2.54mm headers for stacking (both modules have 7 pins per side)
- LoRa antenna compatible with your frequency band
## 🔌 Hardware Setup
### Stacking Configuration
The modules stack directly with **power pins aligned**:
```
ESP32-C3 (bottom) Wio SX1262 (top)
───────────────── ────────────────
Left Side: Left Side:
5V ──────────── VCC
GND ──────────── GND
3.3V ──────────── 3.3V
D10 (GPIO10)──────────── MOSI
D9 (GPIO9) ──────────── MISO
D8 (GPIO8) ──────────── SCK
D7 (GPIO20)──────────── D7 (pass-through)
Right Side: Right Side:
D0 (GPIO2) ──────────── D0 (pass-through)
D1 (GPIO3) ──────────── DIO1
D2 (GPIO4) ──────────── RST
D3 (GPIO5) ──────────── BUSY
D4 (GPIO6) ──────────── NSS
D5 (GPIO7) ──────────── RF_SW
D6 (GPIO21)──────────── D6 (pass-through)
```
### Pin Mapping Summary
| Function | ESP32-C3 Pin | SX1262 Pin |
|----------|--------------|------------|
| SPI MOSI | GPIO10 (D10) | MOSI |
| SPI MISO | GPIO9 (D9) | MISO |
| SPI SCK | GPIO8 (D8) | SCK |
| Chip Select | GPIO6 (D4) | NSS |
| Reset | GPIO4 (D2) | RST |
| Busy | GPIO5 (D3) | BUSY |
| Interrupt | GPIO3 (D1) | DIO1 |
| RF Switch | Internal DIO2 | RF_SW |
| I2C SDA | GPIO21 (D6) | D6 (pass-through) |
| I2C SCL | GPIO20 (D7) | D7 (pass-through) |
## 🚀 Installation
### Method 1: Web Flasher (Easiest)
1. Connect your Seeed XIAO ESP32-C3 via USB
2. Visit [Meshtastic Web Flasher](https://flasher.meshtastic.org/)
3. Upload the `firmware-seeed-xiao-esp32c3-sx1262-2.7.19.9d06c1b.factory.bin` file
4. Follow the on-screen instructions
### Method 2: esptool.py
```bash
# Install esptool if needed
pip install esptool
# Flash the firmware (adjust port as needed)
esptool.py --chip esp32c3 --port /dev/ttyACM0 --baud 921600 \
write_flash 0x0 firmware/firmware-seeed-xiao-esp32c3-sx1262-2.7.19.9d06c1b.factory.bin
```
**macOS**: Use `/dev/cu.usbmodem*` or `/dev/tty.usbmodem*`
**Windows**: Use `COM3`, `COM4`, etc.
**Linux**: Use `/dev/ttyUSB0` or `/dev/ttyACM0`
### Method 3: PlatformIO (Advanced)
Clone the source and build yourself - see build instructions in the wiki.
## ⚙️ Configuration
After flashing:
1. Install the Meshtastic app on your phone ([iOS](https://meshtastic.org/docs/software/apple/installation/) / [Android](https://meshtastic.org/docs/software/android/installation/))
2. Connect via Bluetooth
3. Set your device name and region
4. Join or create channels
## ✨ Features
- ✅ **Full Meshtastic support** - Messaging, position sharing, telemetry
- ✅ **SX1262 LoRa radio** - Long range mesh networking
- ✅ **I2C sensor support** - GPIO20/21 available for BME280, OLED displays, etc.
- ✅ **Compact form factor** - Stackable design saves space
- ✅ **Low power consumption** - Perfect for portable nodes
## 🔧 Adding I2C Sensors (Optional)
The pass-through pins D6 and D7 provide I2C connectivity:
- **SDA**: GPIO21 (D6)
- **SCL**: GPIO20 (D7)
Compatible sensors:
- BME280/BME680 (temperature, humidity, pressure)
- SSD1306 OLED display (128x64)
- Any I2C sensor at 3.3V
Connect sensors to the pass-through pins and share 3.3V/GND.
## 📊 Specifications
- **MCU**: ESP32-C3 (RISC-V, 160MHz, 400KB SRAM, 4MB Flash)
- **Radio**: Semtech SX1262 (LoRa, -148dBm sensitivity)
- **Frequency**: 868MHz or 915MHz (region dependent)
- **Transmit Power**: Up to +22dBm
- **Bluetooth**: BLE 5.0
- **WiFi**: 2.4GHz 802.11b/g/n
## 🐛 Troubleshooting
**"Error no interface"**
- Ensure antenna is connected to the SX1262
- Verify modules are properly seated on headers
- Check power pins are aligned correctly
**No nodes appear**
- Verify region settings match nearby nodes
- Check channel configuration
- Ensure antenna is connected
- Test range (LoRa needs line of sight for best results)
**Can't flash firmware**
- Hold BOOT button while connecting USB
- Try a different USB cable (some are power-only)
- Check port with `pio device list` or device manager
## 📚 Resources
- [Meshtastic Documentation](https://meshtastic.org/docs/)
- [Seeed XIAO ESP32-C3 Wiki](https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/)
- [Wio SX1262 Module Wiki](https://wiki.seeedstudio.com/wio_sx1262/)
- [Meshtastic Discord](https://discord.gg/meshtastic)
## 📝 Firmware Details
- **Version**: 2.7.19.9d06c1b
- **Build Date**: 2026-01-31
- **Hardware Model**: 254 (SEEED_XIAO_ESP32C3)
- **Radio**: SX1262 with DIO2 RF switching, 1.8V TCXO
## 🤝 Contributing
Found a bug or have a suggestion? Open an issue or submit a pull request!
## ⚖️ License
This firmware is based on [Meshtastic](https://github.com/meshtastic/firmware) (GPL-3.0).
## 🙏 Credits
- [Meshtastic Project](https://meshtastic.org/) - Open source mesh networking
- [Seeed Studio](https://www.seeedstudio.com/) - XIAO ESP32-C3 hardware
- Community contributors and testers
---
**⚠️ Important**: Always use an appropriate antenna for your region and frequency. Never transmit without an antenna - this can damage the radio module!
+70
View File
@@ -0,0 +1,70 @@
@echo off
REM Flash script for Seeed XIAO ESP32-C3 + Wio SX1262 Meshtastic Firmware
echo ============================================================
echo Meshtastic Firmware Flasher
echo Seeed XIAO ESP32-C3 + Wio SX1262
echo ============================================================
echo.
REM Check for esptool
where esptool.py >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo [X] esptool.py not found!
echo.
echo Install it with: pip install esptool
pause
exit /b 1
)
echo [+] esptool.py found
echo.
REM Firmware file
set FIRMWARE=firmware\firmware-seeed-xiao-esp32c3-sx1262-2.7.19.9d06c1b.factory.bin
if not exist "%FIRMWARE%" (
echo [X] Firmware file not found: %FIRMWARE%
pause
exit /b 1
)
echo [+] Firmware found: %FIRMWARE%
echo.
REM Get COM port from user
echo Looking for ESP32-C3...
echo.
echo Please check Device Manager for the correct COM port.
echo Common ports: COM3, COM4, COM5, etc.
echo.
set /p PORT="Enter COM port (e.g., COM3): "
echo.
echo [!] If flashing fails:
echo 1. Hold the BOOT button on the ESP32-C3
echo 2. While holding BOOT, press and release RESET
echo 3. Release BOOT and try flashing again
echo.
pause
echo.
echo [*] Flashing firmware to %PORT%...
echo.
esptool.py --chip esp32c3 --port %PORT% --baud 921600 write_flash 0x0 "%FIRMWARE%"
echo.
echo [+] Flashing complete!
echo.
echo Next steps:
echo 1. Install Meshtastic app on your phone
echo 2. Connect via Bluetooth
echo 3. Configure your device name and region
echo 4. Start meshing!
echo.
echo Documentation: https://meshtastic.org/docs/
echo.
pause
Executable
+84
View File
@@ -0,0 +1,84 @@
#!/bin/bash
# Flash script for Seeed XIAO ESP32-C3 + Wio SX1262 Meshtastic Firmware
set -e
echo "╔═══════════════════════════════════════════════════════════╗"
echo "║ Meshtastic Firmware Flasher ║"
echo "║ Seeed XIAO ESP32-C3 + Wio SX1262 ║"
echo "╚═══════════════════════════════════════════════════════════╝"
echo ""
# Check for esptool
if ! command -v esptool.py &> /dev/null; then
echo "❌ esptool.py not found!"
echo ""
echo "Install it with: pip install esptool"
exit 1
fi
echo "✓ esptool.py found: $(esptool.py version 2>&1 | head -1)"
echo ""
# Firmware file
FIRMWARE="firmware/firmware-seeed-xiao-esp32c3-sx1262-2.7.19.9d06c1b.factory.bin"
if [ ! -f "$FIRMWARE" ]; then
echo "❌ Firmware file not found: $FIRMWARE"
exit 1
fi
echo "✓ Firmware found: $FIRMWARE"
echo ""
# Detect port
echo "🔍 Looking for ESP32-C3..."
echo ""
# Auto-detect port
if command -v pio &> /dev/null; then
PORT=$(pio device list 2>/dev/null | grep -E "/dev/cu.usbmodem|/dev/ttyACM|/dev/ttyUSB|COM" | head -1 | awk '{print $1}')
else
# Manual detection
if [ -e /dev/cu.usbmodem* ]; then
PORT=$(ls /dev/cu.usbmodem* | head -1)
elif [ -e /dev/ttyACM0 ]; then
PORT="/dev/ttyACM0"
elif [ -e /dev/ttyUSB0 ]; then
PORT="/dev/ttyUSB0"
fi
fi
if [ -z "$PORT" ]; then
echo "⚠️ Could not auto-detect port. Please specify manually."
read -p "Enter port (e.g., /dev/ttyACM0 or COM3): " PORT
fi
echo "📡 Using port: $PORT"
echo ""
echo "⚠️ If flashing fails:"
echo " 1. Hold the BOOT button on the ESP32-C3"
echo " 2. While holding BOOT, press and release RESET"
echo " 3. Release BOOT and try flashing again"
echo ""
read -p "Press Enter to start flashing (or Ctrl+C to cancel)..."
echo ""
echo "🚀 Flashing firmware..."
echo ""
esptool.py --chip esp32c3 --port "$PORT" --baud 921600 \
write_flash 0x0 "$FIRMWARE"
echo ""
echo "✅ Flashing complete!"
echo ""
echo "📱 Next steps:"
echo " 1. Install Meshtastic app on your phone"
echo " 2. Connect via Bluetooth"
echo " 3. Configure your device name and region"
echo " 4. Start meshing!"
echo ""
echo "📚 Documentation: https://meshtastic.org/docs/"
echo ""
+73
View File
@@ -0,0 +1,73 @@
# Seeed XIAO ESP32-C3 + Wio SX1262 LoRa Module
This variant is designed for the **Seeed XIAO ESP32-C3** stacked with the **Wio SX1262 LoRa module**.
## Hardware Configuration
### Stacking Configuration
Both modules have 2.54mm header pinouts with 7 pins per side. When stacked, the power pins align:
- ESP32-C3 **5V** → SX1262 **VCC**
- ESP32-C3 **GND** → SX1262 **GND**
- ESP32-C3 **3.3V** → SX1262 **3.3V**
### Pin Mappings
#### Left Side (SPI Interface)
| ESP32-C3 Pin | SX1262 Pin | Function |
|--------------|------------|----------|
| 5V | VCC | Power |
| GND | GND | Ground |
| 3.3V | 3.3V | Power |
| D10 (GPIO10) | MOSI | SPI Data Out |
| D9 (GPIO9) | MISO | SPI Data In |
| D8 (GPIO8) | SCK | SPI Clock |
| D7 (GPIO20) | D7 | Pass-through (I2C SCL) |
#### Right Side (Control Pins)
| ESP32-C3 Pin | SX1262 Pin | Function |
|--------------|------------|----------|
| D0 (GPIO2) | D0 | Pass-through |
| D1 (GPIO3) | DIO1 | LoRa Interrupt |
| D2 (GPIO4) | RST | Radio Reset |
| D3 (GPIO5) | BUSY | Busy Signal |
| D4 (GPIO6) | NSS | SPI Chip Select |
| D5 (GPIO7) | RF_SW | RF Switch Control |
| D6 (GPIO21) | D6 | Pass-through (I2C SDA) |
### I2C Sensor Support
GPIO20 (D7) and GPIO21 (D6) are available via the SX1262 pass-through pins D7 and D6 for external I2C sensors:
- **SDA**: GPIO21 (D6)
- **SCL**: GPIO20 (D7)
Compatible sensors include BME280, BME680, SSD1306 displays, etc.
## Building the Firmware
### Prerequisites
1. Install [PlatformIO](https://platformio.org/)
2. Clone this repository
### Build Command
```bash
cd meshtastic-source
pio run -e seeed-xiao-esp32c3-sx1262
```
### Flash Command
```bash
pio run -e seeed-xiao-esp32c3-sx1262 -t upload
```
Or specify the port:
```bash
pio run -e seeed-xiao-esp32c3-sx1262 -t upload --upload-port /dev/ttyACM0
```
## Hardware Model
- **Hardware Model ID**: 254
- **Slug**: SEEED_XIAO_ESP32C3
- **Display Name**: Seeed XIAO ESP32-C3 + SX1262
## References
- [Seeed XIAO ESP32-C3 Wiki](https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/)
- [Wio SX1262 Module Wiki](https://wiki.seeedstudio.com/wio_sx1262/)
+28
View File
@@ -0,0 +1,28 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
// Serial pins (UART)
static const uint8_t TX = 21;
static const uint8_t RX = 20;
// I2C pins (available on SX1262 pass-through D6/D7)
static const uint8_t SDA = 21; // GPIO21 (D6)
static const uint8_t SCL = 20; // GPIO20 (D7)
// SPI pins (used by SX1262 radio)
static const uint8_t SS = 6; // GPIO6 -> NSS
static const uint8_t MOSI = 10; // GPIO10 -> MOSI
static const uint8_t MISO = 9; // GPIO9 -> MISO
static const uint8_t SCK = 8; // GPIO8 -> SCK
// Analog pins (ESP32-C3 ADC-capable pins)
static const uint8_t A0 = 0;
static const uint8_t A1 = 1;
static const uint8_t A2 = 2;
static const uint8_t A3 = 3;
static const uint8_t A4 = 4;
static const uint8_t A5 = 5;
#endif /* Pins_Arduino_h */
+20
View File
@@ -0,0 +1,20 @@
[env:seeed-xiao-esp32c3-sx1262]
custom_meshtastic_hw_model = 254
custom_meshtastic_hw_model_slug = SEEED_XIAO_ESP32C3
custom_meshtastic_architecture = esp32-c3
custom_meshtastic_actively_supported = true
custom_meshtastic_support_level = 1
custom_meshtastic_display_name = Seeed XIAO ESP32-C3 + SX1262
custom_meshtastic_images = seeed-xiao-esp32c3.svg
custom_meshtastic_tags = Seeed,DIY
extends = esp32c3_base
board = seeed_xiao_esp32c3
board_level = extra
build_flags =
${esp32c3_base.build_flags}
-D SEEED_XIAO_ESP32C3
-I variants/esp32c3/seeed_xiao_esp32c3
monitor_speed = 115200
upload_protocol = esptool
upload_speed = 921600
+43
View File
@@ -0,0 +1,43 @@
// Pin definitions for Seeed XIAO ESP32-C3 with Wio SX1262 LoRa module
// Based on stacked configuration with aligned power pins
#define BUTTON_PIN 9 // GPIO9 available for button
// LED - Using GPIO2 (D0) which is available
#define LED_PIN 2 // GPIO2 (D0)
#define LED_STATE_ON 1
#define HAS_SCREEN 0
#define HAS_GPS 0
#undef GPS_RX_PIN
#undef GPS_TX_PIN
// SX1262 LoRa Radio Configuration
// Pin mapping when Wio SX1262 is stacked on Seeed XIAO ESP32-C3
#define USE_SX1262
// SPI pins (left side when stacked)
#define LORA_SCK 8 // GPIO8 -> SX1262 SCK
#define LORA_MISO 9 // GPIO9 -> SX1262 MISO
#define LORA_MOSI 10 // GPIO10 -> SX1262 MOSI
// Control pins (right side when stacked)
#define LORA_CS 6 // GPIO6 (D4) -> SX1262 NSS
#define LORA_RESET 4 // GPIO4 (D2) -> SX1262 RST
#define LORA_DIO1 3 // GPIO3 (D1) -> SX1262 DIO1
#define LORA_BUSY 5 // GPIO5 (D3) -> SX1262 BUSY
// SX1262 specific settings
#define LORA_DIO0 RADIOLIB_NC
#define LORA_DIO2 RADIOLIB_NC
#define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY LORA_BUSY
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH // Wio SX1262 uses DIO2 for RF switching
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // Wio SX1262 has 1.8V TCXO
// I2C pins for external sensors (available on pass-through pins D6/D7)
// These are available when using SX1262 module
#define I2C_SDA 21 // GPIO21 (D6) -> SX1262 D6 (pass-through)
#define I2C_SCL 20 // GPIO20 (D7) -> SX1262 D7 (pass-through)