Installation
Prerequisites
Section titled “Prerequisites”gr-apollo requires Python 3.10+ and uses uv for dependency management. GNU Radio is only needed if you want to use the GR block wrappers.
| Dependency | Required for | Install |
|---|---|---|
| Python 3.10+ | Everything | System package manager |
| uv | Dependency management | curl -LsSf https://astral.sh/uv/install.sh | sh |
| NumPy | Signal processing | Installed automatically |
| GNU Radio 3.10+ | GR blocks only | System package manager |
Install gr-apollo
Section titled “Install gr-apollo”-
Clone the repository
Terminal window git clone https://git.supported.systems/rf/gr-apollo.gitcd gr-apollo -
Create a virtual environment and install
This installs the pure-Python engines (signal generator, frame sync, demux, AGC bridge). No GNU Radio dependency.
Terminal window uv venvuv pip install -e ".[dev]"GNU Radio installs Python bindings as system packages. To access them from a virtualenv, use
--system-site-packages:Terminal window uv venv --system-site-packagesuv pip install -e ".[dev]"This lets the virtualenv see
gnuradio,pmt, and other system-installed GR modules while still isolating gr-apollo’s own dependencies. -
Install GRC block definitions (optional, for GNU Radio Companion)
Copy the YAML block descriptions so GRC can find them:
Terminal window mkdir -p ~/.local/share/gnuradio/grc/blocks/cp grc/*.yml ~/.local/share/gnuradio/grc/blocks/This installs 12 block definitions: PM demod, subcarrier extract, BPSK demod, frame sync, demux, downlink decoder, voice demod, SCO demod, AGC bridge, uplink encoder, and the all-in-one
usb_downlink_receiver.
Verify the installation
Section titled “Verify the installation”Pure-Python engines
Section titled “Pure-Python engines”These should work regardless of whether GNU Radio is installed:
python -c "import apollo; print(f'gr-apollo v{apollo.__version__}')"Expected output:
gr-apollo v0.1.0Test the signal generator and frame sync engine:
python -c "from apollo import generate_usb_baseband, FrameSyncEnginesignal, bits = generate_usb_baseband(frames=1)print(f'Generated {len(signal)} samples, {len(bits[0])} bits/frame')engine = FrameSyncEngine()frames = engine.process_bits(bits[0])print(f'Frame sync: {len(frames)} frame(s), state={engine.state_name}')"Expected output:
Generated 102400 samples, 1024 bits/frameFrame sync: 1 frame(s), state=VERIFYGNU Radio blocks
Section titled “GNU Radio blocks”If you installed with --system-site-packages:
python -c "from apollo import pm_demod, bpsk_demod, pcm_frame_syncfrom apollo.usb_downlink_receiver import usb_downlink_receiverprint('All GR blocks imported successfully')"GRC blocks
Section titled “GRC blocks”Open GNU Radio Companion and search for “apollo” in the block list. You should see blocks prefixed with Apollo:
gnuradio-companionIf the blocks do not appear, verify the YAML files are in the right location:
ls ~/.local/share/gnuradio/grc/blocks/apollo_*.ymlYou should see 12 files. If the directory was wrong for your GR installation, check where GRC looks for blocks:
gnuradio-config-info --prefix# Blocks may also live under:# /usr/local/share/gnuradio/grc/blocks/Troubleshooting
Section titled “Troubleshooting”ModuleNotFoundError: No module named 'apollo'
Section titled “ModuleNotFoundError: No module named 'apollo'”You are running Python outside the virtualenv. Either activate it (source .venv/bin/activate) or use uv run:
uv run python -c "import apollo; print(apollo.__version__)"ImportError: No module named 'gnuradio'
Section titled “ImportError: No module named 'gnuradio'”The virtualenv cannot see GNU Radio’s system packages. Recreate with system site access:
rm -rf .venvuv venv --system-site-packagesuv pip install -e ".[dev]"GRC blocks not visible
Section titled “GRC blocks not visible”GRC only scans certain directories for block YAML files. If ~/.local/share/gnuradio/grc/blocks/ is not picked up, try the system-wide path:
sudo cp grc/*.yml /usr/share/gnuradio/grc/blocks/Then restart GNU Radio Companion.
NumPy version conflicts
Section titled “NumPy version conflicts”If GNU Radio was built against a specific NumPy version, you may see warnings or errors. Pin to the system NumPy:
uv pip install --force-reinstall numpy==$(python -c "import numpy; print(numpy.__version__)")