LoRa receiver flowgraph built programmatically via gr-mcp: - osmosdr_source → low_pass_filter → lora_rx → message_debug - XML-RPC server for runtime variable control (samp_rate, center_freq) with introspection enabled - Qt frequency sink for spectrum visualization Docker infrastructure: - gnuradio-lora: gr-lora_sdr OOT module from EPFL (chirp spread spectrum) - gnuradio-lora-runtime: combined runtime with Xvfb + gr-lora_sdr - Compose file, entrypoint, and launch script for LoRa receiver Also includes: - lora_scanner.py: multi-SF LoRa scanner example - lora_infrastructure_test.py: hardware-free pipeline validation (signal_source → throttle → null_sink + xmlrpc variable control) - Integration tests for LoRa scanner flowgraph construction End-to-end pipeline validated: launch_flowgraph → connect_to_container → list_variables → get/set_variable all working through Docker + XML-RPC.
29 lines
811 B
Bash
Executable File
29 lines
811 B
Bash
Executable File
#!/bin/bash
|
|
# Entrypoint for containerized LoRa receiver
|
|
set -e
|
|
|
|
FREQ_MHZ=${FREQ_MHZ:-915.0}
|
|
SF=${SF:-7}
|
|
BW=${BW:-125000}
|
|
CR=${CR:-1}
|
|
GAIN=${GAIN:-20}
|
|
|
|
python3 -c "
|
|
import sys, subprocess, os
|
|
sys.path.insert(0, '/flowgraphs')
|
|
sys.path.insert(0, '/src')
|
|
from lora_scanner import build_lora_receiver
|
|
|
|
freq = float(os.environ.get('FREQ_MHZ', '915.0'))
|
|
sf = int(os.environ.get('SF', '7'))
|
|
bw = int(os.environ.get('BW', '125000'))
|
|
cr = int(os.environ.get('CR', '1'))
|
|
gain = int(os.environ.get('GAIN', '20'))
|
|
|
|
print(f'Building LoRa receiver for {freq} MHz (SF{sf}, BW {bw} Hz, CR 4/{4+cr})...')
|
|
py_path = build_lora_receiver(freq, sf=sf, bw=bw, cr=cr, gain=gain)
|
|
print(f'Launching {py_path.name} — Ctrl+C to stop')
|
|
print(f'XML-RPC control at http://localhost:8091')
|
|
subprocess.run([sys.executable, str(py_path)])
|
|
"
|