PyBOMBS is essentially a package manager and build system for GNU Radio. It handles the fetching, building, and installation of GNU Radio and dependencies, and is largely system independent. The installation steps are listed on the PyBOMBS GitHub page, but the following is a list of steps and basic packages needed to get up and running with the bladeRF.

Before compiling on Ubuntu systems, ensure the following packages are installed.

sudo apt-get install python3-six python-six python3-mako python3-lxml python3-lxml python3-numpy python3-numpy python3-pip git python3-pybind11 libsndfile1-dev

NB: If the pybombs command is not found after pip install ensure that ~/.local/bin is part of your path. If it is not, run (and also add the following command to your .bashrc):

export PATH=$PATH:$HOME/.local/bin

Install PyBOMBS (using pip, but other methods are listed on the PyBOMBS README.md), apply the default configuration, and add the default recipes:

pip3 install --upgrade git+https://github.com/gnuradio/pybombs.git
pybombs auto-config
pybombs recipes add-defaults

To use Nuand’s experimental gr-osmo, consider running the following:

sed -i 's/gitea.osmocom.org.sdr/github.com\/Nuand/g' ~/.pybombs/recipes/gr-recipes/gr-osmosdr.lwr
sed -i '/- gr.\{7,\}/d' ~/.pybombs/recipes/gr-recipes/gr-osmosdr.lwr
sed -i '/- gr.iqbal/d' ~/.pybombs/recipes/gr-recipes/gr-osmosdr.lwr

Optionally to enable gr-video-sdl, try:

sudo apt-get install libsdl1.2-dev libsdl2-dev
sed -i 's/-DENABLE_VOLK=ON/-DENABLE_VOLK=ON -DENABLE_GR_VIDEO_SDL=ON/g' ~/.pybombs/recipes/gr-recipes/gnuradio.lwr ~/.pybombs/recipes/gr-recipes/gnuradio38.lwr

Now, let’s create a prefix, or a directory in which to install all the GNU Radio components. In this case, we set the prefix directory to ~/pybombs/bladeRF. We also specify the alias, bladeRF, for easy reference later, and install the default GNU Radio setup.

mkdir ~/pybombs/

Optionally (not recommended, current GNURadio version is 3.10), to set GNURadio to dev branch 3.9 run the following two commands:

pybombs config --package gnuradio gitrev maint-3.9
pybombs config --package gr-osmosdr gitrev dev-gr-3.9

Then continue compiling GNURadio:

pybombs prefix init ~/pybombs/bladeRF -a bladeRF -R gnuradio-default

At this point, GNU Radio has been installed into ~/pybombs/bladeRF. Now, install useful applications such as bladeRF and gqrx:

pybombs -p bladeRF install bladeRF gr-osmosdr gqrx

Once each component has been successfully built, they may be run using pybombs -p bladeRF run <command>, some examples follow:

pybombs -p bladeRF run bladeRF-cli -- -i
pybombs -p bladeRF run gqrx

Alternatively, the GNU Radio environment may be “sourced” into the active console, allowing applications to be run directly.

source ~/pybombs/bladeRF/setup_env.sh
bladeRF-cli -i
gqrx

PYTHONPATH Errors

If any PYTHONPATH warning or errors appear while launching gnuradio-companion, ensure all of the Python package library paths in ~/pybombs/bladeRF/lib/ are present in $PYTHONPATH.

To have setup_env.sh try to fix missing PYTHONPATH paths, first backup the setup_env.sh then try:

echo "export PYTHONPATH=$(echo ~/pybombs/bladeRF/lib/*/*-packages | sed 's/ /:/g')":'$PYTHONPATH' >> ~/pybombs/bladeRF/setup_env.sh

If everything went correctly, something similar should appear:

tail -n 1 ~/pybombs/bladeRF/setup_env.sh
Expected output:
export PYTHONPATH=/home/user/pybombs/bladeRF/lib/python3.8/site-packages:/home/user/pybombs/bladeRF/lib/python3/dist-packages:$PYTHONPATH

Note: the paths should be absolute paths, and they should appear on the very last line of the setup_env.sh file. If things match, try sourcing the file again source ~/pybombs/bladeRF/setup_env.sh

If these outputs do not appear or do not match, it might be good to restore the backup of the setup_env.sh file and manually add the missing Python package paths to the file.

PyBOMBS udev rules

You may get a permissions error when trying to access the bladeRF. This is typically from lack of, or incorrect, udev rule(s) and may be remedied by following the udev installation instructions.

PyBOMBS and gr-fosphor

On recent Ubuntu systems, try the following steps to install gr-fosphor. This assumes the appropriate GPU drivers are already installed.

sudo apt install ocl-icd-opencl-dev
sudo apt-get install libfreetype6 libfreetype6-dev
pybombs -p bladeRF install bladeRF gr-fosphor