LoRa Tx + Rx loopback
A complete LoRa link in one tab: gr-lora_sdr's transmitter feeds its receiver through a noisy channel, and each decoded payload is printed below. Adapted from the module's own tx_rx_hier_functionality_check.
- Author Tapparel Joachim
- Category gr-lora_sdr
- Blocks 14
- Connections 9
- File
gr-lora_sdr/lora_tx_rx_loopback.grc
Blocks used
| Block | Module | Used |
|---|---|---|
| Variable | GNU Radio | 4 |
| Channel Model | GNU Radio | 1 |
| GUI Layout | GNU Radio | 1 |
| LoRa Rx | gr-lora_sdr | 1 |
| LoRa Tx | gr-lora_sdr | 1 |
| Message Debug | GNU Radio | 1 |
| Message Strobe | GNU Radio | 1 |
| payload id inc | gr-lora_sdr | 1 |
| QT GUI Time Sink | GNU Radio | 1 |
| Text Sink | GNU Radio | 1 |
| Throttle | GNU Radio | 1 |
Flowgraph source
gr-lora_sdr/lora_tx_rx_loopback.grc
options:
parameters:
author: Tapparel Joachim
comment: ''
copyright: ''
description: 'A complete LoRa link in one tab: gr-lora_sdr''s transmitter feeds its receiver through a noisy channel, and each decoded payload is printed below. Adapted from the module''s own tx_rx_hier_functionality_check.'
generate_options: qt_gui
id: LoRa_Tx___Rx_loopback
title: LoRa Tx + Rx loopback
states:
coordinate: [10, 10]
rotation: 0
state: enabled
blocks:
- name: SNRdB
id: variable
parameters:
comment: Channel SNR
value: '10'
states:
coordinate: [810, 10]
rotation: 0
state: enabled
- name: bw
id: variable
parameters:
comment: ''
value: '125000'
states:
coordinate: [490, 10]
rotation: 0
state: enabled
- name: samp_rate
id: variable
parameters:
comment: ''
value: bw*4
states:
coordinate: [330, 10]
rotation: 0
state: enabled
- name: sf
id: variable
parameters:
comment: Spreading factor
value: '7'
states:
coordinate: [650, 10]
rotation: 0
state: enabled
- name: channel
id: channels_channel_model
parameters:
affinity: ''
alias: ''
block_tags: 'True'
comment: ''
epsilon: '1'
freq_offset: '0'
maxoutbuf: '0'
minoutbuf: '0'
noise_voltage: 10**(-SNRdB/20)
seed: '0'
taps: '[1.0]'
states:
coordinate: [80, 450]
rotation: 0
state: enabled
- name: frames
id: blocks_message_debug
parameters:
affinity: ''
alias: ''
comment: ''
en_uvec: 'True'
log_level: info
states:
coordinate: [910, 450]
rotation: 0
state: enabled
- name: lora_rx
id: lora_rx
parameters:
affinity: ''
alias: ''
bw: bw
comment: ''
cr: '1'
has_crc: 'True'
impl_head: 'False'
ldro: '2'
maxoutbuf: '0'
minoutbuf: '0'
pay_len: '255'
print_rx: '[True,True]'
samp_rate: samp_rate
sf: sf
soft_decoding: 'False'
sync_word: '[0x12]'
states:
coordinate: [460, 400]
rotation: 0
state: enabled
- name: lora_tx
id: lora_tx
parameters:
affinity: ''
alias: ''
bw: bw
comment: ''
cr: '1'
frame_zero_padd: '1280'
has_crc: 'True'
impl_head: 'False'
ldro: '2'
maxoutbuf: '0'
minoutbuf: '0'
samp_rate: samp_rate
sf: sf
sync_word: '[0x12]'
states:
coordinate: [540, 120]
rotation: 0
state: enabled
- name: next_id
id: lora_sdr_payload_id_inc
parameters:
affinity: ''
alias: ''
comment: "Increments the counter after the\nseparator so every frame differs"
maxoutbuf: '0'
minoutbuf: '0'
separator: ':'
states:
coordinate: [160, 290]
rotation: 0
state: enabled
- name: payload
id: blocks_message_strobe
parameters:
affinity: ''
alias: ''
comment: ''
maxoutbuf: '0'
minoutbuf: '0'
msg: 'pmt.intern("Hello GNU Radio World: 0")'
period: '1500'
states:
coordinate: [120, 180]
rotation: 0
state: enabled
- name: qtgui_time_sink_x_0
id: qtgui_time_sink_x
parameters:
affinity: ''
alias: ''
alpha1: '1'
alpha10: '1'
alpha2: '1'
alpha3: '1'
alpha4: '1'
alpha5: '1'
alpha6: '1'
alpha7: '1'
alpha8: '1'
alpha9: '1'
autoscale: 'False'
axislabels: 'True'
color1: blue
color10: dark blue
color2: red
color3: green
color4: black
color5: cyan
color6: magenta
color7: yellow
color8: dark red
color9: dark green
comment: ''
ctrlpanel: 'False'
grid: 'False'
label1: Signal 1
label10: Signal 10
label2: Signal 2
label3: Signal 3
label4: Signal 4
label5: Signal 5
label6: Signal 6
label7: Signal 7
label8: Signal 8
label9: Signal 9
legend: 'True'
marker1: '-1'
marker10: '-1'
marker2: '-1'
marker3: '-1'
marker4: '-1'
marker5: '-1'
marker6: '-1'
marker7: '-1'
marker8: '-1'
marker9: '-1'
name: Scope
nconnections: '1'
samp_rate: samp_rate
size: '1024'
stemplot: 'False'
style1: '1'
style10: '1'
style2: '1'
style3: '1'
style4: '1'
style5: '1'
style6: '1'
style7: '1'
style8: '1'
style9: '1'
tr_chan: '0'
tr_delay: '0'
tr_level: '0'
tr_mode: qtgui.TRIG_MODE_FREE
tr_slope: qtgui.TRIG_SLOPE_POS
tr_tag: ''
type: complex
update_time: '0.1'
width1: '1'
width10: '1'
width2: '1'
width3: '1'
width4: '1'
width5: '1'
width6: '1'
width7: '1'
width8: '1'
width9: '1'
ylabel: Amplitude
ymax: '1.5'
ymin: '-1.5'
yunit: ''
states:
coordinate: [460, 670]
rotation: 0
state: enabled
- name: received
id: wasm_text_sink
parameters:
affinity: ''
alias: ''
comment: ''
max_line: '72'
prefix: '"LoRa RX: "'
states:
coordinate: [860, 640]
rotation: 0
state: enabled
- name: throttle
id: blocks_throttle2
parameters:
affinity: ''
alias: ''
comment: ''
ignoretag: 'True'
limit: auto
maximum: '0.1'
maxoutbuf: '0'
minoutbuf: '0'
samples_per_second: samp_rate
type: complex
vlen: '1'
states:
coordinate: [910, 160]
rotation: 0
state: enabled
- name: wasm_gui_layout_0
id: wasm_gui_layout
parameters:
affinity: ''
alias: ''
columns: '12'
comment: ''
layout: '{"qtgui_time_sink_x_0":[0,0,12,4]}'
row_height: '60'
states:
coordinate: [980, 10]
rotation: 0
state: enabled
connections:
- [channel, '0', lora_rx, '0']
- [channel, '0', qtgui_time_sink_x_0, '0']
- [lora_rx, '0', received, '0']
- src_blk_id: lora_rx
src_port_id: out
snk_blk_id: frames
snk_port_id: print
- [lora_tx, '0', throttle, '0']
- src_blk_id: next_id
src_port_id: msg_out
snk_blk_id: payload
snk_port_id: set_msg
- src_blk_id: payload
src_port_id: strobe
snk_blk_id: lora_tx
snk_port_id: in
- src_blk_id: payload
src_port_id: strobe
snk_blk_id: next_id
snk_port_id: msg_in
- [throttle, '0', channel, '0']
metadata:
file_format: 2
grc_version: 3.11.0.0