Lr2021
Rust driver for the Semtech LR2021
Install / Use
/learn @TheClams/Lr2021README
LR2021 Driver
An async, no_std Rust driver for the Semtech LR2021 dual-band transceiver, supporting many different radio protocols including LoRa, BLE, ZigBee, Z-Wave, and more.
Quick Start
Add this to your Cargo.toml:
[dependencies]
lr2021 = "0.13"
embassy-time = "0.5"
Basic usage:
use lr2021_driver::Lr2021;
let mut radio = Lr2021::new(reset_pin, busy_pin, spi_device, nss_pin);
radio.reset().await?;
// Configure and use your preferred protocol
Hardware Requirements
- Semtech LR2021 transceiver module
- SPI-capable microcontroller
- 3 GPIO pins: Reset (output), Busy (input), NSS/CS (output) (not counting SPI SCK/MISO/MOSI)
- Embassy-compatible async runtime
Documentation & Examples
- API Documentation - Complete API reference
- Example Applications - Real-world usage examples on Nucleo boards
Protocol Test Status
| Protocol | Status | Notes | |----------|--------|-------| | LoRa |Partial | Basic communication between two LR2021 devices: smallest SF, highest bandwidth. TODO: Ranging | | BLE | Partial | 1MB/s mode, compatible with other BLE devices. TODO: 2Mb/s, Coded | | FLRC | Tested | Basic communication between two LR2021 devices | | FSK | Tested | Generic FSK communication verified | | Z-Wave | Tested | Scan mode tested with ZStick S2, R1-R3 reception | | OOK | Partial | ADSB reception validated, RTS between two LR2021 | | ZigBee | Partial | Reception validated with standard device | | WiSUN | Partial | Basic communication between two LR2021 devices | | WMBus | Partial | Basic communication between two LR2021 devices | | LR-FHSS | Unplanned | TX only (require gateway for test) | | Sigfox (BPSK) | Unplanned | TX only (require gateway for test) |
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
