|
|
3 days ago | |
|---|---|---|
| .. | ||
| LierdaAM36Board.h | 3 days ago | |
| README.md | 3 days ago | |
| platformio.ini | 3 days ago | |
| target.cpp | 3 days ago | |
| target.h | 3 days ago | |
README.md
MeshCore on the Lierda AM36 Pico (L-LRMAM36-FANN4-PK02)
Community variant for the Lierda AM36 Pico evaluation board. The on-board L-LRMAM36-FANN4 module is an ESP32-S3 (8MB flash / 8MB PSRAM) paired with a Semtech LR2021 Generation-4 LoRa transceiver.
Status: hardware-validated (Jul 2026) on a live mesh: radio init, noise floor sampling (~-119 dBm), BLE pairing with the iOS companion app, flood + direct TX with interrupt-driven send-complete, and two-way messaging with a Heltec Tracker v2 (SX1262) peer - i.e. confirmed LR2021 <-> SX1262 interop - at 927.875 MHz / BW 62.5 / SF9 / CR7, both nodes using muzi works 17 cm whip antennas (replies at SNR 3.25 dB). Also received channel messages from six third-party senders at 3-9 hops with full path reconstruction, and measured a third-party repeater (not operated by the author) at up 11.5 dB / down 13.0 dB. Requires the
CustomLR2021radio classes from MeshCore PR #2944.
Hardware facts used by this variant
| Signal | ESP32-S3 GPIO | Source | Verified |
|---|---|---|---|
| LR2021 SPI SCK | 40 | esp32_lora_driver Kconfig (LIERDA_BOARD_LRMAM36_FANN4) |
yes (on air) |
| LR2021 SPI MOSI | 41 | same | yes |
| LR2021 SPI MISO | 42 | same | yes |
| LR2021 NSS | 39 | same | yes |
| LR2021 NRST | 38 | same | yes |
| LR2021 BUSY | 17 | same | yes |
| LR2021 IRQ | 21 - wired to LR2021 DIO7 | Kconfig LR20XX_DIO7_GPIO |
yes (TX-done + RX interrupts) |
| KEY button | 4 (schematic net GPIO4/KEY1) |
schematic | not yet - left disabled |
The IRQ DIO matters: the Seeed Wio-LR2021 (which PR #2944 targets) uses DIO8,
so this variant sets -D LR2021_IRQ_DIO=7. No external TCXO or RF-switch
GPIOs exist on the MCU side - the module handles RF internally. The board's
only LED is a hardwired 3V3 power indicator, so no PIN_STATUS_LED is defined.
Build
- Install VS Code + the PlatformIO extension.
- Get the source with the LR2021 driver:
git clone https://github.com/meshcore-dev/MeshCore cd MeshCore git fetch origin pull/2944/head:lr2021 git checkout lr2021(Once PR #2944 is merged, plain
devworks.) - Copy this
lierda_am36_pico/folder intovariants/. (PlatformIO auto-discoversvariants/*/platformio.ini.) - Radio parameters: builds inherit MeshCore's defaults; set your region's
frequency/BW/SF/CR from the companion app after first boot (settings are
persisted on the device), or override
LORA_*flags in aplatformio.local.inifor your own builds. The module covers 863-930 MHz. - Build:
pio run -e Lierda_AM36_Pico_companion_radio_bleOther envs:
..._companion_radio_usb,..._repeater. Note: the iOS companion app connects over BLE only, so iPhone users want the_blebuild.
Flash
- Connect the Type-C port labelled USB (NOT the one labelled UART - that goes to the CP2105 bridge). The USB port is the ESP32-S3's native USB-JTAG/CDC and is what esptool talks to.
-
pio run -e Lierda_AM36_Pico_companion_radio_ble -t upload - If the port doesn't enumerate or upload fails to sync: hold BOOT, tap RST, release BOOT (forces download mode), then retry the upload.
- Tap RST after flashing completes.
Verify
- Serial console is on the same USB port
(
pio device monitor -e Lierda_AM36_Pico_companion_radio_ble). Note the ESP32-S3 re-enumerates USB on reset, so the monitor may need a restart after tapping RST. A failed radio bring-up printsERROR: LR2021 init failed: <code>and halts (no BLE advertising). - Attach the LoRa antenna before any TX.
- Pair from the MeshCore app over Bluetooth (default PIN
123456, set viaBLE_PIN_CODE), set your region's radio parameters in the app, and send a channel message or advert.
Known quirks / notes
- SPI to the LR2021 sits on GPIO39-42, which are the S3's JTAG pins. That's fine (flashing/debug uses USB-JTAG), just don't try external JTAG.
- PSRAM is present but left disabled - MeshCore doesn't need it, and octal PSRAM misconfiguration is a classic S3 boot-loop source.
- The KEY button (schematic net
GPIO4/KEY1) is left disabled until traced on hardware; uncommentPIN_USER_BTNinplatformio.inionce confirmed. - PR #2944's wrapper drops the radio to standby before every
startReceive()(LR2021 wedges if re-armed mid-RX) - don't "optimize" that away.