softlora
A pure-Python LoRa physical-layer (PHY) receiver that synchronizes, demodulates and decodes LoRa packets from IQ recordings and live streams. It implements two synchronization algorithms for carrier-frequency-offset (CFO) and symbol-timing-offset (STO) estimation and correction. Tested on synthetic data, over-the-air captures and satellite recordings.
Satellite LoRa packet
Features
- Preamble detection in complex baseband IQ recordings
- CFO & STO estimation and compensation
- Demodulation of LoRa symbols from corrected signals
- Packet decoding with explicit headers (standard LoRa) and implicit headers (no header, forced parameters)
- Streaming decode — plug in your SDR, GNU Radio or a large IQ file and decode it seamlessly, with bounded memory
- CRC-16 verification for payload integrity
- Chase (soft-decision) decoding
Quick example
from softlora import LoRaDecoder
decoder = LoRaDecoder(sf=10, bw=125_000, fs=125_000, fc=437e6)
packets = decoder.decode_file("recording.wav")
for p in packets:
print(p.payload_text, "CRC:", p.crc_valid, "SNR:", p.snr_est)
See Quick start for file, in-memory, streaming and implicit-header examples.
Documentation layout
- Installation — pip install and development setup
- Decode pipeline — how a packet travels through the receiver
- Sync algorithm (Xhonneux et al.) — the equation-by-equation mapping
- Packet semantics — what
ok,crc_validanderrormean - Streaming decode — how live chunked decoding works
- IQ file formats — loading and streaming recordings
- Chase decoding — soft-decision decode mode
- Ground-station use — Doppler, SNR, persistence
- Performance — AWGN sweeps and PER curves
- API reference — every public module