Files
MeshTerm/scripts/xiao-radio
Jean-Pierre MartineauandClaude Fable 5.1 c9f5a71ce7 Every Python file names its licence with an SPDX identifier
Apache-2.0 does not require per-file headers, but a file lifted out of the tree carried no marking at all. One comment line, first (or right after a shebang), on every .py under meshterm/, tests/, packaging/ and scripts/, plus the extensionless SPI bridge; tests/test_spdx.py keeps a new file from landing without one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 13:09:18 -04:00
..

PicoCalc mesh radio — XIAO nRF52840 over UART

A Seeed XIAO nRF52840 + Wio-SX1262 wired to the Luckfox Lyra's UART1, running MeshCore companion firmware on Serial1, so MeshTerm on the PicoCalc opens /dev/ttyS1 like any other serial companion. No BLE, no USB host, no SD-slot sacrifice.

The manual is docs/hardware.md — parts, the firmware patch and why it is still needed, flashing a bootloader that offers no drive, what the register poke does, troubleshooting, and what has only been proven on one bench. This page is the bench card.

Licensing. The firmware is MeshCore, under the MIT License. The meshcore-uart1.patch modifies MeshCore source and build-firmware.sh produces a MeshCore binary; the licence is LICENSE.MeshCore in this directory.

Three steps on two machines:

# 1. dev machine: build (needs git + PlatformIO)
cd scripts/xiao-radio && sh build-firmware.sh

# 2. dev machine: flash, with the XIAO's own USB-C plugged in
python flash.py            # double-tap reset if the touch doesn't take

# 3. the Lyra, as root
sh scripts/xiao-radio/lyra-setup.sh          # MT_USER=meshterm by default

# then, as that user
meshterm

Four wires, TX and RX crossed:

XIAO pad → Lyra header Physical pin Carries
D7 (Serial1 RX) → GP4 pin 6 Lyra UART1 TX → XIAO RX
D6 (Serial1 TX) → GP5 pin 7 XIAO TX → Lyra UART1 RX
GND → GND pin 8 common ground
3V3 → 3V3 OUT pin 36 power, so it runs without USB

The Lyra does not use Raspberry Pi Pico GPIO numbering — the header is Pico-shaped, the mapping is Luckfox's own. GP4 is gpio0-0, GP5 is gpio0-1. All signals are 3.3 V and there is no 5 V rail: power the XIAO from 3V3 only.