Python-first GNU Radio source scaffold for HFSDR over the USB vendor endpoint.
Full host setup (drivers, probe, opening example .grc files, protocol): docs/host-guide.md.
python/hfsdr_source.py: GNU Radiosync_blocksource outputtinggr_complex.python/hfsdr_usb.py: PyUSB transport and vendor control requests.grc/hfsdr_hfsdr_source.block.yml: GRC block description for quick graph wiring.
- GNU Radio 3.10+
- Python packages:
numpypyusb
Install:
py -3 -m pip install -r client-sw/host/python/requirements.txtimport os
import sys
sys.path.insert(0, os.path.abspath("client-sw/gnuradio/gr-hfsdr-lib/python"))
from hfsdr_source import hfsdr_source
src = hfsdr_source(sample_rate=192000, vid=0xCAFE, pid=0x4031, interface=4, endpoint_in=0x85)set_lo_hz(hz)get_lo_hz()set_gain_raw(gain_raw)get_pll_locked()get_stats()
You can also set gain_raw in the GRC block parameters and enable
apply_gain_on_start to program TLV320 gain when the flowgraph starts.
- The source claims only the vendor interface, so CDC and UAC interfaces remain available.
- This is an initial scaffold intended for rapid bring-up. If needed, migrate to a full compiled OOT layout later.