GNU Radio's LORA_SDR Package
gr::lora_sdr Namespace Reference

Classes

class  add_crc
 This block adds LoRa CRC (Cyclic redundancy check) into the payload if boolean has_crc is True, for more information see add_crc_impl. More...
 
class  add_crc_impl
 
class  crc_verif
 Verifies if the included crc is correct or not for more information about the implementation visit crc_verify_impl. More...
 
class  crc_verif_impl
 
class  data_source
 <+description of block+> More...
 
class  data_source_impl
 
class  data_source_sim
 Data source that can both generate random strings or static strings, for more information about the implementation visit data_source_impl Main difference from data_source is that this implementation uses an internal uniform distribution, for the timing of the msg pmt channel. More...
 
class  data_source_sim_impl
 
class  deinterleaver
 Deinterleaves the received payload, for more information about the implementation visit deinterleaver_impl. More...
 
class  deinterleaver_impl
 
class  dewhitening
 Dewhites the received payload, for more information about the implementation visit crc_verify_impl. More...
 
class  dewhitening_impl
 
class  err_measures
 Simple block that can count and output the number of Bit Error's (BE) ,for more information about the implementation visit err_measures_impl. More...
 
class  err_measures_impl
 
struct  est_param
 
class  fft_demod
 FFT demodulation block ,for more information about the implementation visit fft_demod_impl. More...
 
class  fft_demod_impl
 
class  frame_detector_sequence
 LoRa frame detector sequence, this block detects a LoRa frames using a preamble detection to find the start of the frame and a sequence detection to find the end of the packet. If a frame is detected the frame is outputted to the output. More...
 
class  frame_detector_sequence_impl
 
class  frame_detector_threshold
 LoRa frame detector threshold, this block detects a LoRa frames using a preamble detection to find the start of the frame and a SNR energy based detector to detect the end of the frame. If a frame is detected the frame is outputted to the output. More...
 
class  frame_detector_threshold_impl
 
class  frame_detector_timeout
 Frame detector block, looks for a LoRa frame given SF, sapling rate and BW. Once this block has found the preamble upchirps the block will output n_bytes to its output. More...
 
class  frame_detector_timeout_impl
 
class  frame_src
 
class  frame_src_impl
 
class  frame_sync
 <+description of block+> More...
 
class  frame_sync_impl
 
class  gray_decode
 Decode the received payload with the inverse gray mapping in order to obtain the send message. For more information about the implementation visit gray_decode_impl. More...
 
class  gray_decode_impl
 
class  gray_enc
 Modulate the payload with an Gray map. This ensures that bits are modulated such that two subsequent symbols differ one bit. For more information about the implementation visit gray_enc_impl. More...
 
class  gray_enc_impl
 
class  hamming_dec
 Hamming decoding stage, decode the received payload. If necessary this block will preform error detection and correction using the hamming code parity bits. For more information about the implementation visit hamming_dec_impl. More...
 
class  hamming_dec_impl
 
class  hamming_enc
 Add hamming code to the to be sent playload. This means extra party bits are added to the payload to be able to recover from bit errors during transmission For more information about the implementation visit hamming_enc_impl. More...
 
class  hamming_enc_impl
 
class  header
 Encode the header of the data package if implicit header mode (denoted by m_impl_head) is turned on For more information about the implementation visit header_impl. More...
 
class  header_decoder
 Decode the header of the data spackage. For more information about the implementation visit header_decoder_impl. More...
 
class  header_decoder_impl
 
class  header_impl
 
class  hier_rx
 Wrapper block that hold the entire Rx chain : (frame_sync, fft_demod, gray_decode, deinterleaver, hamming_dec, header_decoder, dewhitening, crc_verif) More...
 
class  hier_rx_impl
 
class  hier_tx
 wrapper of Tx chain (data_source, whitening, add_header,add_crc, hamming_enc, interleaver, gray mapping,modulate) More...
 
class  hier_tx_impl
 
class  interleaver
 Interleaves the to be sent data, in order to gain more resilience against bit transmission errors For more information about the implementation visit interleaver_impl. More...
 
class  interleaver_impl
 
class  modulate
 End block of the sending side that modulates the final to be sent data to the LoRa standard For more information about the implementation visit modulate_impl. More...
 
class  modulate_impl
 
class  mu_detection
 
class  mu_detection_impl
 
class  mu_synchro
 
class  mu_synchro_impl
 
class  noise_est
 
class  noise_est_impl
 
class  partial_ml
 
class  partial_ml_impl
 
class  RH_RF95_header
 Encode the data in the RH_RF95 header format For more information about the implementation visit RH_RF95_impl. More...
 
class  RH_RF95_header_impl
 
class  signal_detector
 
class  signal_detector_impl
 
class  whitening
 Whiten the input data For more information about the implementation visit whitening_impl. More...
 
class  whitening_impl
 

Functions

std::string complex_vector_2_string (gr_complex *input, int length)
 
long mod (long a, long b)
 Simple modulo the modulus ab between 0 and (b-1)
 
double double_mod (double a, long b)
 Simple modulo the modulus ab between 0 and (b-1) for doubles.
 
std::vector< bool > int2bool (uint8_t integer, uint8_t n_bits)
 Convert an integer into a MSB first vector of bool.
 
std::string random_string (int Nbytes)
 Generates a random string of given length.
 
uint32_t get_symbol_val (const gr_complex *samples, gr_complex *ref_chirp, uint32_t m_number_of_bins, uint32_t m_samples_per_symbol, kiss_fft_cpx *cx_in, kiss_fft_cpx *cx_out)
 Function that gets the symbol from the received samples.
 
float determine_energy (const gr_complex *samples, uint32_t m_samples_per_symbol)
 Determine the energy of a symbol.
 
uint32_t bool2int (std::vector< bool > b)
 Convert a MSB first vector of bool to a integer.
 
void build_ref_chirps (gr_complex *upchirp, gr_complex *downchirp, uint8_t sf)
 Return the reference chirps using s_f=bw.
 
void build_upchirp (gr_complex *chirp, uint32_t id, uint8_t sf)
 Return an modulated upchirp using s_f=bw.
 
void build_upchirp_os_factor (gr_complex *chirp, uint32_t id, uint8_t sf, uint8_t os_factor)
 Return an modulated upchirp using s_f=bw with over sampling factor.
 

Variables

const uint8_t whitening_seq []
 Pseudo random whitening sequence.
 

Function Documentation

◆ bool2int()

uint32_t gr::lora_sdr::bool2int ( std::vector< bool >  b)

Convert a MSB first vector of bool to a integer.

Parameters
bThe boolean vector to convert
Returns
uint32_t

◆ build_ref_chirps()

void gr::lora_sdr::build_ref_chirps ( gr_complex *  upchirp,
gr_complex *  downchirp,
uint8_t  sf 
)

Return the reference chirps using s_f=bw.

Parameters
upchirp: The pointer to the reference upchirp
downchirp: The pointer to the reference downchirp
sf: The spreading factor to use

◆ build_upchirp()

void gr::lora_sdr::build_upchirp ( gr_complex *  chirp,
uint32_t  id,
uint8_t  sf 
)

Return an modulated upchirp using s_f=bw.

Parameters
chirp: The pointer to the modulated upchirp
id: The number used to modulate the chirp
sf: The spreading factor to use

◆ build_upchirp_os_factor()

void gr::lora_sdr::build_upchirp_os_factor ( gr_complex *  chirp,
uint32_t  id,
uint8_t  sf,
uint8_t  os_factor 
)

Return an modulated upchirp using s_f=bw with over sampling factor.

Parameters
chirp: The pointer to the modulated upchirp
id: The number used to modulate the chirp
sf: The spreading factor to use
os_factor: oversmapling factor

◆ complex_vector_2_string()

std::string gr::lora_sdr::complex_vector_2_string ( gr_complex *  input,
int  length 
)

◆ determine_energy()

float gr::lora_sdr::determine_energy ( const gr_complex *  samples,
uint32_t  m_samples_per_symbol 
)

Determine the energy of a symbol.

Parameters
samplesThe complex symbol to analyse.
m_samples_per_symbol: number of samples per LoRa symbol
Returns
float

◆ double_mod()

double gr::lora_sdr::double_mod ( double  a,
long  b 
)

Simple modulo the modulus ab between 0 and (b-1) for doubles.

Parameters
a
b
Returns
double

◆ get_symbol_val()

uint32_t gr::lora_sdr::get_symbol_val ( const gr_complex *  samples,
gr_complex *  ref_chirp,
uint32_t  m_number_of_bins,
uint32_t  m_samples_per_symbol,
kiss_fft_cpx cx_in,
kiss_fft_cpx cx_out 
)

Function that gets the symbol from the received samples.

Parameters
samples: the complex samples
ref_chirp: the reference chirp to use to dechirp the lora symbol.
m_number_of_bins: number of bings
m_samples_per_symbol: number of samples per LoRa symbol
cx_in: fft in
cx_out: fft out
Returns
uint32_t

◆ int2bool()

std::vector< bool > gr::lora_sdr::int2bool ( uint8_t  integer,
uint8_t  n_bits 
)

Convert an integer into a MSB first vector of bool.

Parameters
integerThe integer to convert
n_bitsThe output number of bits
Returns
std::vector<bool>

◆ mod()

long gr::lora_sdr::mod ( long  a,
long  b 
)

Simple modulo the modulus ab between 0 and (b-1)

Parameters
a
b
Returns
long modulo of ab

◆ random_string()

std::string gr::lora_sdr::random_string ( int  Nbytes)

Generates a random string of given length.

Parameters
Nbytes: Number of bytes in the string
Returns
std::string

Variable Documentation

◆ whitening_seq

const uint8_t gr::lora_sdr::whitening_seq[]
Initial value:
= {
0xFF, 0xFE, 0xFC, 0xF8, 0xF0, 0xE1, 0xC2, 0x85, 0x0B, 0x17, 0x2F, 0x5E,
0xBC, 0x78, 0xF1, 0xE3, 0xC6, 0x8D, 0x1A, 0x34, 0x68, 0xD0, 0xA0, 0x40,
0x80, 0x01, 0x02, 0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