add EU_LongFast.grc and raw transmission script raw_gnuradio_TX.py
This commit is contained in:
parent
2ff1a68a42
commit
f3deb55b17
490
gnuradio scripts/TX/EU_LongFast.grc
Normal file
490
gnuradio scripts/TX/EU_LongFast.grc
Normal file
@ -0,0 +1,490 @@
|
|||||||
|
options:
|
||||||
|
parameters:
|
||||||
|
author: Tapparel Joachim@EPFL,TCL
|
||||||
|
catch_exceptions: 'True'
|
||||||
|
category: '[GRC Hier Blocks]'
|
||||||
|
cmake_opt: ''
|
||||||
|
comment: ''
|
||||||
|
copyright: ''
|
||||||
|
description: ''
|
||||||
|
gen_cmake: 'On'
|
||||||
|
gen_linking: dynamic
|
||||||
|
generate_options: qt_gui
|
||||||
|
hier_block_src_path: '.:'
|
||||||
|
id: lora_TX
|
||||||
|
max_nouts: '0'
|
||||||
|
output_language: python
|
||||||
|
placement: (0,0)
|
||||||
|
qt_qss_theme: ''
|
||||||
|
realtime_scheduling: ''
|
||||||
|
run: 'True'
|
||||||
|
run_command: '{python} -u {filename}'
|
||||||
|
run_options: prompt
|
||||||
|
sizing_mode: fixed
|
||||||
|
thread_safe_setters: ''
|
||||||
|
title: ''
|
||||||
|
window_size: ''
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [8, 8.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
|
||||||
|
blocks:
|
||||||
|
- name: bandpass250k
|
||||||
|
id: variable_band_pass_filter_taps
|
||||||
|
parameters:
|
||||||
|
beta: '6.76'
|
||||||
|
comment: ''
|
||||||
|
gain: '1.0'
|
||||||
|
high_cutoff_freq: lora_250bandwidth/2
|
||||||
|
low_cutoff_freq: -lora_250bandwidth/2
|
||||||
|
samp_rate: samp_rate
|
||||||
|
type: complex_band_pass
|
||||||
|
value: ''
|
||||||
|
width: lora_250bandwidth/50
|
||||||
|
win: window.WIN_HAMMING
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [1048, 4.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: center_250KHz
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '906875000'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [288, 80.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: center_freq
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '869525000'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [184, 80.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: cr_44
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '0'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [488, 8.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: cr_45
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '1'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [544, 8.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: cr_46
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '2'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [488, 72.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: cr_47
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '3'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [544, 72.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: cr_48
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '8'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [488, 136.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: has_crc
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: 'True'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [712, 8.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: impl_head
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: 'False'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [624, 8.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: lora_250bandwidth
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '250000'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [272, 8.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: preamble_length
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '16'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [624, 80.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: samp_rate
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '1000000'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [184, 8.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: sf_11
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: ''
|
||||||
|
value: '11'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [408, 8.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: sync_word
|
||||||
|
id: variable
|
||||||
|
parameters:
|
||||||
|
comment: 'Technically the sync-word here for meshtastic is 0x2b
|
||||||
|
|
||||||
|
Trying this leads to no data gathered.
|
||||||
|
|
||||||
|
Using the [0,0] works.'
|
||||||
|
value: '[16,88]'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [760, 80.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: blocks_throttle2_0
|
||||||
|
id: blocks_throttle2
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
ignoretag: 'True'
|
||||||
|
limit: auto
|
||||||
|
maximum: '0.1'
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
samples_per_second: samp_rate*10
|
||||||
|
type: complex
|
||||||
|
vlen: '1'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [792, 432.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: lora_sdr_add_crc_0
|
||||||
|
id: lora_sdr_add_crc
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
has_crc: has_crc
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [640, 288.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: lora_sdr_gray_demap_0
|
||||||
|
id: lora_sdr_gray_demap
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
sf: sf_11
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [480, 448.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: lora_sdr_hamming_enc_0
|
||||||
|
id: lora_sdr_hamming_enc
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
cr: cr_45
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
sf: sf_11
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [640, 368.0]
|
||||||
|
rotation: 180
|
||||||
|
state: enabled
|
||||||
|
- name: lora_sdr_header_0
|
||||||
|
id: lora_sdr_header
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
cr: cr_45
|
||||||
|
has_crc: has_crc
|
||||||
|
impl_head: impl_head
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [488, 272.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: lora_sdr_interleaver_0
|
||||||
|
id: lora_sdr_interleaver
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
bw: lora_250bandwidth
|
||||||
|
comment: ''
|
||||||
|
cr: cr_45
|
||||||
|
ldro: '2'
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
sf: '11'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [504, 352.0]
|
||||||
|
rotation: 180
|
||||||
|
state: enabled
|
||||||
|
- name: lora_sdr_modulate_0
|
||||||
|
id: lora_sdr_modulate
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
bw: lora_250bandwidth
|
||||||
|
comment: ''
|
||||||
|
frame_zero_padd: int(20*2**sf_11*samp_rate/lora_250bandwidth)
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '8200'
|
||||||
|
preamb_len: preamble_length
|
||||||
|
samp_rate: samp_rate
|
||||||
|
sf: sf_11
|
||||||
|
sync_words: sync_word
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [640, 432.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: lora_sdr_whitening_0_0
|
||||||
|
id: lora_sdr_whitening
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
comment: ''
|
||||||
|
is_hex: 'True'
|
||||||
|
length_tag_name: '''packet_len'''
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
separator: ''','''
|
||||||
|
source_type: message_strobe
|
||||||
|
use_length_tag: 'False'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [264, 288.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: qtgui_waterfall_sink_x_0
|
||||||
|
id: qtgui_waterfall_sink_x
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
alpha1: '1.0'
|
||||||
|
alpha10: '1.0'
|
||||||
|
alpha2: '1.0'
|
||||||
|
alpha3: '1.0'
|
||||||
|
alpha4: '1.0'
|
||||||
|
alpha5: '1.0'
|
||||||
|
alpha6: '1.0'
|
||||||
|
alpha7: '1.0'
|
||||||
|
alpha8: '1.0'
|
||||||
|
alpha9: '1.0'
|
||||||
|
axislabels: 'True'
|
||||||
|
bw: samp_rate
|
||||||
|
color1: '0'
|
||||||
|
color10: '0'
|
||||||
|
color2: '0'
|
||||||
|
color3: '0'
|
||||||
|
color4: '0'
|
||||||
|
color5: '0'
|
||||||
|
color6: '0'
|
||||||
|
color7: '0'
|
||||||
|
color8: '0'
|
||||||
|
color9: '0'
|
||||||
|
comment: ''
|
||||||
|
fc: center_250KHz
|
||||||
|
fftsize: '32768'
|
||||||
|
freqhalf: 'True'
|
||||||
|
grid: 'False'
|
||||||
|
gui_hint: ''
|
||||||
|
int_max: '10'
|
||||||
|
int_min: '-140'
|
||||||
|
label1: ''
|
||||||
|
label10: ''
|
||||||
|
label2: ''
|
||||||
|
label3: ''
|
||||||
|
label4: ''
|
||||||
|
label5: ''
|
||||||
|
label6: ''
|
||||||
|
label7: ''
|
||||||
|
label8: ''
|
||||||
|
label9: ''
|
||||||
|
legend: 'True'
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
name: '"Channel Model"'
|
||||||
|
nconnections: '1'
|
||||||
|
showports: 'False'
|
||||||
|
type: complex
|
||||||
|
update_time: '0.10'
|
||||||
|
wintype: window.WIN_BLACKMAN_hARRIS
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [1000, 328.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: soapy_limesdr_sink_0
|
||||||
|
id: soapy_limesdr_sink
|
||||||
|
parameters:
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
bandwidth: lora_250bandwidth
|
||||||
|
center_freq: center_freq
|
||||||
|
comment: ''
|
||||||
|
dev_args: ''
|
||||||
|
freq_correction: '0'
|
||||||
|
gain: '32'
|
||||||
|
samp_rate: samp_rate
|
||||||
|
type: fc32
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [1000, 456.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
- name: zeromq_pull_msg_source_0
|
||||||
|
id: zeromq_pull_msg_source
|
||||||
|
parameters:
|
||||||
|
address: tcp://0.0.0.0:30004
|
||||||
|
affinity: ''
|
||||||
|
alias: ''
|
||||||
|
bind: 'True'
|
||||||
|
comment: ''
|
||||||
|
maxoutbuf: '0'
|
||||||
|
minoutbuf: '0'
|
||||||
|
timeout: '100'
|
||||||
|
states:
|
||||||
|
bus_sink: false
|
||||||
|
bus_source: false
|
||||||
|
bus_structure: null
|
||||||
|
coordinate: [32, 280.0]
|
||||||
|
rotation: 0
|
||||||
|
state: enabled
|
||||||
|
|
||||||
|
connections:
|
||||||
|
- [blocks_throttle2_0, '0', qtgui_waterfall_sink_x_0, '0']
|
||||||
|
- [blocks_throttle2_0, '0', soapy_limesdr_sink_0, '0']
|
||||||
|
- [lora_sdr_add_crc_0, '0', lora_sdr_hamming_enc_0, '0']
|
||||||
|
- [lora_sdr_gray_demap_0, '0', lora_sdr_modulate_0, '0']
|
||||||
|
- [lora_sdr_hamming_enc_0, '0', lora_sdr_interleaver_0, '0']
|
||||||
|
- [lora_sdr_header_0, '0', lora_sdr_add_crc_0, '0']
|
||||||
|
- [lora_sdr_interleaver_0, '0', lora_sdr_gray_demap_0, '0']
|
||||||
|
- [lora_sdr_modulate_0, '0', blocks_throttle2_0, '0']
|
||||||
|
- [lora_sdr_whitening_0_0, '0', lora_sdr_header_0, '0']
|
||||||
|
- [zeromq_pull_msg_source_0, out, lora_sdr_whitening_0_0, msg]
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
file_format: 1
|
||||||
|
grc_version: 3.10.12.0
|
||||||
47
python scripts/raw_gnuradio_TX.py
Normal file
47
python scripts/raw_gnuradio_TX.py
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# Joint copyright of Josh Conway and discord user:winter_soldier#1984
|
||||||
|
# License is GPL3 (Gnu public license version 3)
|
||||||
|
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import argparse
|
||||||
|
import base64
|
||||||
|
import socket
|
||||||
|
import zmq
|
||||||
|
import pmt
|
||||||
|
import random
|
||||||
|
import binascii
|
||||||
|
|
||||||
|
##### START PARSE COMMANDLINE INPUT #####
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description='Process incoming command parmeters')
|
||||||
|
parser.add_argument('-o', '--output', action='store', dest='output', help='SDR transmit of provided hex string. Does no processing of said data.')
|
||||||
|
parser.add_argument('-n', '--net', action='store',dest='net', help='Network TCP in ip or DNS. ZeroMQ protocol.')
|
||||||
|
parser.add_argument('-p', '--port', action='store',dest='port', help='Network port')
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
##### END PARSE COMMANDLINE INPUT #####
|
||||||
|
|
||||||
|
##### START OPTIONAL NETWORK PROCESS #####
|
||||||
|
|
||||||
|
def networkTransmit(ipAddr, port, rawData):
|
||||||
|
context = zmq.Context()
|
||||||
|
socket = context.socket(zmq.PUSH)
|
||||||
|
socket.connect("tcp://" + ipAddr + ":" + port) # connect, not bind, the PUB will bind, only 1 can bind
|
||||||
|
print(f"Sending \"{rawData}\"")
|
||||||
|
data = binascii.hexlify(rawData.encode()).decode("utf-8")
|
||||||
|
socket.send(pmt.serialize_str(pmt.to_pmt(data)))
|
||||||
|
|
||||||
|
##### START OPTIONAL NETWORK PROCESS #####
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
# Network branch. Doesnt exit, so we need IP Port and data
|
||||||
|
try:
|
||||||
|
if len(args.net) > 0 and len(args.port) > 0:
|
||||||
|
print(args.net, args.port)
|
||||||
|
networkTransmit(args.net, args.port, args.output)
|
||||||
|
except Exception as e:
|
||||||
|
# No data, no workie
|
||||||
|
print("Transmission halted."+ str(e))
|
||||||
Loading…
x
Reference in New Issue
Block a user