PR #2739 · NiceRF LoRa2021 (Semtech LR2021 Gen 4) + ESP32-C3 · Test date: 2026-07-05
| Board | MCU | Radio | Serial | Role |
|---|---|---|---|---|
| ESP32-C3 #1 | ESP32-C3_Mini_V1 (USB-C, U.FL) | NiceRF LoRa2021 | B0:A6:04:00:96:DC | Companion Radio |
| ESP32-C3 #2 | ESP32-C3_Mini_V1 (USB-C, U.FL) | NiceRF LoRa2021 | 88:56:A6:7B:C6:98 | Repeater |
Distance: ~10cm (bench test). Antenna: ~8.2cm wire on Sub-GHz pin (868 MHz quarter-wave).
ESP32-C3_Mini_V1 → NiceRF LoRa2021 (18-pin) ───────────────────────────────────── GPIO6 (D6) → Pin 5 (SCK) GPIO7 (D7) → Pin 4 (MOSI) GPIO2 (D2) → Pin 3 (MISO) GPIO10 (D10) → Pin 6 (NSS/CS) GPIO4 (D4) → Pin 7 (BUSY) GPIO3 (D3) → Pin 14 (RST) GPIO5 (D5) → Pin 15 (DIO9 / IRQ) 3V3 → Pin 1 (VCC) GND → Pin 2 (GND)
| Parameter | Value | Note |
|---|---|---|
| Frequency | 869.618 MHz | EU ISM band, MeshCore standard |
| Modulation | LoRa | Sub-GHz only |
| Spreading Factor | SF8 | |
| Bandwidth | 62.5 kHz | |
| Coding Rate | 4/5 | |
| TX Power | 22 dBm | |
| Sync Word | 0x12 | LoRa private |
| Target | Status | RAM | Flash |
|---|---|---|---|
| LR2021_companion_radio_usb | ✅ SUCCESS | 42.8% | 41.4% |
| LR2021_companion_radio_ble | ✅ SUCCESS | 42.8% | 41.4% |
| LR2021_companion_radio_wifi | ✅ SUCCESS | 42.8% | 41.5% |
| LR2021_repeater | ✅ SUCCESS | 38.7% | 40.0% |
| LR2021_room_server | ✅ SUCCESS | 37.8% | 40.9% |
| LR2021_secure_chat | ✅ SUCCESS | 42.8% | 41.0% |
| LR2021_kiss_modem | ✅ SUCCESS | 5.9% | 36.6% |
| Xiao_C3_companion_radio_usb | ✅ PASS | regression check — existing variant | |
| Heltec_v3_companion_radio_ble | ✅ PASS | regression check — existing variant | |
Firmware: USE_ESPIDF_HAL enabled. Both boards reset via DTR/RTS, serial captured at 115200 baud for 30 seconds simultaneously.
Both ESP32-C3 chips enter SPI_FAST_FLASH_BOOT, load MeshCore firmware.
Repeater ID: 53A53B5D224BDE5CAD3BACF3774223BEB85C8E2A3AAF5D529E976747456AEADB
Ed25519 keypair generated via radio noise entropy. Radio init succeeds (LR2021 responds to SPI commands via EspIdfHal).
Repeater enters CSMA loop: noise floor calibration, channel activity detection, advert TX every ~5s on 869.618 MHz.
> [binary packet] ...LR2021 Repeater
Board #1 (companion_radio_usb) receives Board #2's flood advert packet. The packet contains the advert name string "LR2021 Repeater" — confirming cross-board RF communication. The binary prefix is the Ed25519 public key + signature + timestamp (MeshCore advert format).
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xe (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x38c
load:0x403cc710,len:0x6a0
load:0x403ce710,len:0x2624
entry 0x403cc710
[19.0s] Packet received from Board #2 — contains "LR2021 Repeater" advert
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xe (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x38c
load:0x403cc710,len:0x6a0
load:0x403ce710,len:0x2624
entry 0x403cc710
Repeater ID: 53A53B5D224BDE5CAD3BACF3774223BEB85C8E2A3AAF5D529E976747456AEADB
[Radio init OK — advertising on 869.618 MHz SF8/BW62.5]
Before opening this PR, the LR2021 + ESP32-C3 was tested against the live Berlin MeshCore community mesh:
On some ESP32-C3 boards, Arduino's SPIClass returns all-zero responses
from the LR2021, causing radio init failure (RADIOLIB_ERR_SPI_CMD_FAILED).
The EspIdfHal workaround uses ESP-IDF's spi_bus_initialize()
directly, bypassing the Arduino SPI layer.
Per reviewer feedback (@oltaco), SPIClass(0) (FSPI) is now the default.
EspIdfHal is opt-in via -D USE_ESPIDF_HAL for boards where
Arduino SPI fails. This test used USE_ESPIDF_HAL because these
specific boards exhibit the zero-response issue.