EncodingLora

From RevSpace
Revision as of 11:32, 22 May 2016 by Bertrik Sikken (talk | contribs) (add link to import image)
Jump to navigation Jump to search
Project EncodingLora
DecodingLora Project.jpg
Status In progress
Contact bertrik
Last Update 2016-05-22

This page is about synthesizing a LoRa signal such that it can be "played" back using a software-defined-radio with transmit-capabilities. This should help further in understanding the structure of the LoRa modulation, see also my other page DecodingLora. The desired end result is that the transmitted LoRa signal is compatible with and can be received with existing LoRa hardware.

Basic ideas:

  • we're creating a stereo WAV-file that represents the I and Q components of the complex baseband radio signal.
  • this WAV-file should have the right properties for being played back in GnuRadio using Tx-capable SDR like the Ettus B210, HackRF or the Rad1o
  • initially the focus is on just generating a "LoRa-like" signal, consisting of a valid preamble (with sync pattern) but with pseudo-random data after the header. This should be good enough to be used as an interference signal in studies about the robustness against interference from other LoRa devices.
  • later when I understand the packet structure better, I can replace the pseudo-random data by actual channel coded data
  • I'm planning this as a signal processing chain consisting of several blocks in series, very much how GnuRadio works. I'll probably be writing this in C or Java because these are the languages I'm most familiar with. Maybe later I can port this to the GnuRadio framework.

Next steps:

  • create initial software to synthesize the basic sweeps and write them as a WAV-file, starting with a software numerically controlled oscillator block to generate the sweeps.
  • play back the WAV file on an SDR and verify the generated waveform to validate the principle.

Signal structure

How I plan to generate to synthesize the signal, is as an over-sampled sweep, offset in base-band frequency so that it does not sweep through or near 0 Hz. This should make it easier to deal with DC offset problems and mirror images when it is finally up-converted from base-band to RF in the SDR. My feeling tells me that if I choose the sampling frequency as some nice integer multiple of the bandwidth (power-of-two even), it will all work out nicely.

Software

Some initial code can be found here: https://github.com/bertrik/lorasyn

Audacity import raw.png

It creates a raw data file with a 8-symbol preamble, a sync word, the two reverse chirps and 16 symbols of random data. The I and Q samples are encoded as signed 8-bit words and interleaved (even = I, odd = Q). You can read this into Audacity (as a poor man's signal analyzer), by importing the signal in raw format and using the settings as shown on the right.