MeshCore LR2021 Variant — Hardware Test Evidence

PR #2739 · NiceRF LoRa2021 (Semtech LR2021 Gen 4) + ESP32-C3 · Test date: 2026-07-05

1. Test Setup

Hardware

BoardMCURadioSerialRole
ESP32-C3 #1ESP32-C3_Mini_V1 (USB-C, U.FL)NiceRF LoRa2021B0:A6:04:00:96:DCCompanion Radio
ESP32-C3 #2ESP32-C3_Mini_V1 (USB-C, U.FL)NiceRF LoRa202188:56:A6:7B:C6:98Repeater

Distance: ~10cm (bench test). Antenna: ~8.2cm wire on Sub-GHz pin (868 MHz quarter-wave).

Wiring (both boards identical)

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)

MeshCore PHY Settings

ParameterValueNote
Frequency869.618 MHzEU ISM band, MeshCore standard
ModulationLoRaSub-GHz only
Spreading FactorSF8
Bandwidth62.5 kHz
Coding Rate4/5
TX Power22 dBm
Sync Word0x12LoRa private

2. Build Verification — 9 Targets

TargetStatusRAMFlash
LR2021_companion_radio_usb✅ SUCCESS42.8%41.4%
LR2021_companion_radio_ble✅ SUCCESS42.8%41.4%
LR2021_companion_radio_wifi✅ SUCCESS42.8%41.5%
LR2021_repeater✅ SUCCESS38.7%40.0%
LR2021_room_server✅ SUCCESS37.8%40.9%
LR2021_secure_chat✅ SUCCESS42.8%41.0%
LR2021_kiss_modem✅ SUCCESS5.9%36.6%
Xiao_C3_companion_radio_usb✅ PASSregression check — existing variant
Heltec_v3_companion_radio_ble✅ PASSregression check — existing variant

3. 2-Device Smoke Test — Serial Logs

Firmware: USE_ESPIDF_HAL enabled. Both boards reset via DTR/RTS, serial captured at 115200 baud for 30 seconds simultaneously.

t=0.0s — Board #1 + Board #2 boot

Both ESP32-C3 chips enter SPI_FAST_FLASH_BOOT, load MeshCore firmware.

t=2.0s — Board #2 (repeater) identity generated
Repeater ID: 53A53B5D224BDE5CAD3BACF3774223BEB85C8E2A3AAF5D529E976747456AEADB

Ed25519 keypair generated via radio noise entropy. Radio init succeeds (LR2021 responds to SPI commands via EspIdfHal).

t=2-19s — Board #2 broadcasting adverts

Repeater enters CSMA loop: noise floor calibration, channel activity detection, advert TX every ~5s on 869.618 MHz.

t=19.0s — Board #1 RECEIVES Board #2's advert
> [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).

Board #1 (companion_radio_usb) — Full Boot Log

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

Board #2 (repeater) — Full Boot Log

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]

4. Prior Community Mesh Validation (June 2026)

Before opening this PR, the LR2021 + ESP32-C3 was tested against the live Berlin MeshCore community mesh:

5. EspIdfHal Note

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.