LoRa Tools

LoRa IQ Demodulator

Drop in an I/Q recording at any sample rate and get every LoRa packet in it: time, spreading factor, header, payload, CRC and CFO.

Recording

No recording at hand? or make one with the IQ Modulator.

Settings

S/s, any value ≥ bandwidth
Hz from the centre of the recording
0 if the recording is centred on the LoRa channel. If you tuned the SDR away from it (for example to keep the DC spike out), enter the channel's frequency minus the SDR's: e.g. +250000 for a channel 250 kHz above.

Demodulate and decode

Command line

The same decoding with the C tool, lora_iq_demod:


How it works

The LoRa channel is moved to the centre (if you gave an offset), the recording is filtered and resampled to the LoRa bandwidth (e.g. 125 kS/s for 125 kHz) from any input rate, scaled to unit power, then decoded by the standard LoRa receive chain of the Hark receiver (MobiCom'26), without Hark's undersampled wake-up detector: preamble detection, sync on the SFD downchirps, CFO estimation, NetID, header (with its checksum), payload, dewhitening and CRC.

Timing diversity: a packet can start anywhere between two samples, and near half a chip a whole-sample receiver fails. So the recording is also resampled half a chip later, both streams are decoded, and for each packet the version whose CRC passes is kept. Corrections: the preamble detector accepts peaks one bin apart (Hark's tolerance is 0 bins at SF7 and SF8, which misses packets whose CFO is near half a bin), and the phase-based fine CFO step reads preamble chirps only and averages phasors.

Limits: no SFO tracking (a large clock offset at SF11/12 fails), one bandwidth per run, explicit header only. Raw files have no header, so the sample rate and format must be right; SigMF metadata and the IQ Modulator's file names fill them in.