13 Commits

Author SHA1 Message Date
8800d35fd4 add Starlight docs site, LoRa examples, and clean up .gitignore
- Starlight docs: 28 pages covering getting started, guides, tool
  reference, concepts (architecture, dynamic tools, runtime comms)
- LoRa examples: channel scanner, quality analyzer, multi-SF receiver
  with both .grc and .py forms, plus ADSB+LoRa combo test
- .gitignore: exclude generated artifacts (*_patched_*.py, *.wav,
  docs build cache, tests/scratch/)
- Add .mcp.json for local MCP server config
- Sync uv.lock with date-based version
2026-02-24 09:34:50 -07:00
5db7d71d2b feat: add AI-assisted block development tools
Implements complete workflow for generating GNU Radio blocks from
descriptions:

Block Generation:
- generate_sync_block, generate_basic_block, generate_interp_block,
  generate_decim_block tools for creating different block types
- Template-based code generation with customizable work logic
- Automatic validation via AST parsing and signature checking

Protocol Analysis:
- Parse protocol specifications into structured models
- Generate decoder pipelines matching modulation to demodulator blocks
- Templates for BLE, Zigbee, LoRa, POCSAG, ADS-B protocols

OOT Export:
- Export generated blocks to full OOT module structure
- Generate CMakeLists.txt, block YAML, Python modules
- gr_modtool-compatible output

Dynamic Tool Registration:
- enable_block_dev_mode/disable_block_dev_mode for context management
- Tools only registered when needed (reduces LLM context usage)

Includes comprehensive test coverage and end-to-end demo.
2026-02-09 12:36:54 -07:00
61471b7280 fix: tune lora_rx_mcp for Docker runtime compatibility
Adjust RTL-SDR bandwidth, IF gain, DC offset and IQ balance modes
for better performance. Use compatible message_debug constructor.
2026-01-31 10:01:48 -07:00
8429dfed72 feat: add MCP-built LoRa receiver with RTL-SDR live decode
LoRa receiver flowgraph built entirely through gr-mcp MCP tools.
Successfully decodes live packets from Heltec V3 beacon at 915MHz,
SF7, BW125k via RTL-SDR.

Signal chain: osmosdr(1MSPS) → LPF(200kHz, dec×2) → lora_rx(500kSPS)
→ message_debug

Key settings for RTL-SDR live reception:
- DC offset auto-correction (mode=2) to remove DC spike at center freq
- IQ balance auto-correction (mode=2)
- signal.pause() fallback for Docker detached mode
- XML-RPC on 0.0.0.0 for Docker host accessibility
2026-01-30 19:22:30 -07:00
4a60c2d49e fix: use compatible message_debug constructor for Docker runtime
The container's GNU Radio build doesn't support the log_levels
parameter added in newer GRC versions. Use single-arg form:
blocks.message_debug(True) instead of blocks.message_debug(True, gr.log_levels.info)
2026-01-30 14:57:50 -07:00
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
f6c9e465c5 examples: add real-time signal strength display to FM scanner
Add probe_avg_mag_sqrd_c block that taps the LPF output to measure
filtered RF power. A variable_function_probe polls it and exposes
signal_level via XML-RPC.

Display features:
- Signal strength in dB shown on tune and on 's' command
- Color-coded bar: green (strong), yellow (medium), red (weak)
- Updates after each frequency change

Signal chain now includes measurement tap:
  source → LPF → demod → audio
             ↓
        probe → var_function_probe ("signal_level")
2026-01-29 03:23:59 -07:00
b4c6efec6e examples: remove fm_receiver.grc template (now built programmatically) 2026-01-29 02:19:04 -07:00
2a5e73e9a7 examples: build FM receiver programmatically via GRC Platform API
Replace template-based prepare_flowgraph() with build_fm_receiver() that
constructs the entire flowgraph in Python code:

- Initialize Platform (same as gr-mcp main.py)
- Create variables: samp_rate, freq
- Create blocks: osmosdr_source, low_pass_filter, analog_wfm_rcv, audio_sink
- Add xmlrpc_server for runtime frequency control
- Connect signal chain: source → LPF → demod → audio
- Save and compile with grcc

This proves gr-mcp's middleware approach works end-to-end: parameters
set via set_params() serialize correctly after the lru_cache fix.

No longer needs examples/fm_receiver.grc template file.
2026-01-29 02:18:58 -07:00
2405bf5535 examples: replace rtl_fm tuning with GNU Radio XML-RPC control
The --tune flag now builds an FM receiver from a GRC template,
compiles it with grcc, launches it as a subprocess, and tunes
via XML-RPC — the same mechanism gr-mcp uses for runtime
parameter changes. Includes an interactive freq> prompt for
live re-tuning without restarting the flowgraph.
2026-01-28 20:46:20 -07:00
b6a031acc2 examples: add live tuning to FM scanner
--tune flag scans the band then tunes to a station using rtl_fm
piped to aplay. Supports interactive station picker (--tune) or
direct frequency (--tune 102.0).
2026-01-28 20:30:49 -07:00
b2880a85ee examples: add FM band scanner using rtl_power
Scans 87.5–108.0 MHz in 200 kHz bins, detects stations above the
noise floor, and displays a ranked signal-strength table. Supports
--json export, --threshold tuning, and --gain control.
2026-01-28 20:26:40 -07:00
97248fc069 examples: first autonomous FM capture — Pitbull on 101.1 MHz
LLM-driven SDR session recorded 2026-01-28T15:05:21-07:00.
Built flowgraph via MCP tools, launched in Docker with RTL-SDR
USB passthrough, captured 128s of WBFM audio to WAV.

Song identified via songrec/Shazam: "Damn I Love Miami"
by Pitbull & Lil Jon.

Signal chain: RTL2838 → osmocom source (2.4 MS/s)
→ LPF (100 kHz, ÷5) → WBFM demod (÷10) → 48 kHz WAV

Includes GRC flowgraph, WAV recording, and helper scripts.
2026-01-28 15:07:39 -07:00