LoRa IQ Modulator
Choose the LoRa settings and a payload, and download the packet as a complex baseband I/Q file for your SDR or receiver.
LoRa packet
upchirps before the sync word
I/Q file
samples per second
1 MS/s suits most SDRs and GNU Radio. HackRF needs at least 2 MS/s.
ms of zeros before and after the packet
Summary
Channel impairments none
Add channel impairments and/or noise as needed. With none ticked, the file is the ideal signal.
Carrier frequency offset (CFO)The transmitter's carrier is off by this much; the whole file is rotated by ej2πΔf·t.
Hz
Sampling frequency offset (SFO)The transmitter's clock runs this many ppm fast (negative: slow) against the receiver's ADC clock,
so the timing error grows over the packet.
ppm
Sampling time offset (STO)The frame starts this many samples late, so its chirps fall between the receiver's samples
(0.5 = halfway between two samples). The shift is the same for the whole frame; a drift that grows over the frame is SFO.
samples
Anticipated SNR of the LoRa frameThe right amount of noise is added so that the frame has this
signal-to-noise ratio, measured within the LoRa bandwidth as a LoRa radio reports it. LoRa decodes below 0 dB.
SNR dB
Noise seed: the same seed gives the same noise
Download
MHz, written into the SigMF description
The download is the I/Q samples alone. SigMF adds a small text file that records the sample rate, format and LoRa settings, for tools that read SigMF; the samples are the same.
Command line
The same file from the C tool, lora_iq_gen:
How to use this file
Interleaved I/Q, little-endian, with no header. cf32 is GNU Radio's complex type. The integer formats are scaled so the packet peaks at 95% of full scale (lower with noise, so nothing clips).
- GNU Radio: File Source (type complex) → your SDR sink, at the sample rate above.
- USRP (UHD):
tx_samples_from_file --file lora.cf32 --type float --rate 1e6 --freq 868.1e6 - HackRF (ci8, at least 2 MS/s):
hackrf_transfer -t lora.ci8 -s 2000000 -f 868100000 -x 20 - bladeRF (sc16q11): in
bladeRF-cli,tx config file=lora.sc16q11 format=bin, thentx start - Check it: drop the file into the IQ Demodulator.