gr-mcp/docker/run-lora-receiver.sh
Ryan Malloy e8b3600e60 feat: add LoRa SDR receiver with Docker runtime infrastructure
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.
2026-01-30 13:55:40 -07:00

30 lines
960 B
Bash
Executable File

#!/bin/bash
# Run containerized LoRa receiver
#
# Usage: ./run-lora-receiver.sh [FREQ_MHZ] [SF] [BW] [CR] [GAIN]
# FREQ_MHZ: Center frequency in MHz (default: 915.0)
# SF: Spreading factor 7-12 (default: 7)
# BW: Bandwidth in Hz (default: 125000)
# CR: Coding rate 1-4 (default: 1)
# GAIN: RF gain in dB (default: 20)
#
# Once running, use XML-RPC from host to change parameters:
# python -c "import xmlrpc.client; p=xmlrpc.client.ServerProxy('http://localhost:8091'); p.set_sf(10)"
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export FREQ_MHZ=${1:-915.0}
export SF=${2:-7}
export BW=${3:-125000}
export CR=${4:-1}
export GAIN=${5:-20}
echo "Starting LoRa receiver at $FREQ_MHZ MHz (SF$SF, BW $BW Hz, CR 4/$((4+CR)), gain $GAIN dB)"
echo "XML-RPC control available at http://localhost:8091"
echo "Press Ctrl+C to stop"
echo
docker compose -f "$SCRIPT_DIR/docker-compose.lora-receiver.yml" up --build