Compare commits

..

No commits in common. "main" and "zfp-oss" have entirely different histories.

10 changed files with 413 additions and 568 deletions

View File

@ -12,7 +12,7 @@ sys.path.insert(0, os.path.abspath(os.path.join('..', '..')))
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'ria-toolkit-oss'
copyright = '2026, Qoherent Inc'
copyright = '2025, Qoherent Inc'
author = 'Qoherent Inc.'
release = '0.1.5'

View File

@ -1,4 +1,4 @@
.. _sdr_examples:
.. _examples:
############
SDR Examples

View File

@ -40,44 +40,34 @@ Limitations
- USB 3.0 connectivity is required for optimal performance; using USB 2.0 will significantly limit data
transfer rates.
Set up instructions (Linux)
---------------------------
Set up instructions (Linux, Radioconda)
---------------------------------------
No additional Python packages are required for BladeRF beyond the base RIA Toolkit OSS installation.
1. Install the system library:
1. Activate your Radioconda environment.
.. code-block:: bash
sudo apt install libbladerf-dev
conda activate <your-env-name>
For a more complete installation including CLI tools and FPGA images, use the Nuand PPA:
2. Install the base dependencies and drivers (*Easy method*):
.. code-block:: bash
sudo add-apt-repository ppa:nuandllc/bladerf
sudo apt-get update
sudo apt-get install bladerf libbladerf-dev
sudo apt-get install bladerf-fpga-hostedxa4 # Necessary for BladeRF 2.0 Micro xA4
sudo apt-get install bladerf
sudo apt-get install libbladerf-dev
sudo apt-get install bladerf-fpga-hostedxa4 # Necessary for installation of bladeRF 2.0 Micro A4.
2. Install udev rules:
For most users:
3. Install a ``udev`` rule by creating a link into your Radioconda installation:
.. code-block:: bash
sudo udevadm control --reload
sudo udevadm trigger
For **Radioconda** users, create symlinks from your conda environment instead:
.. code-block:: bash
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/88-nuand-bladerf1.rules /etc/udev/rules.d/88-radioconda-nuand-bladerf1.rules
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/88-nuand-bladerf2.rules /etc/udev/rules.d/88-radioconda-nuand-bladerf2.rules
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/88-nuand-bootloader.rules /etc/udev/rules.d/88-radioconda-nuand-bootloader.rules
sudo udevadm control --reload
sudo udevadm trigger
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/88-nuand-bladerf1.rules /etc/udev/rules.d/88-radioconda-nuand-bladerf1.rules
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/88-nuand-bladerf2.rules /etc/udev/rules.d/88-radioconda-nuand-bladerf2.rules
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/88-nuand-bootloader.rules /etc/udev/rules.d/88-radioconda-nuand-bootloader.rules
sudo udevadm control --reload
sudo udevadm trigger
Further Information
-------------------

View File

@ -39,44 +39,39 @@ Limitations
- Bandwidth is limited to 20 MHz.
- USB 2.0 connectivity might limit data transfer rates compared to USB 3.0 or Ethernet-based SDRs.
Set up instructions (Linux)
---------------------------
Set up instructions (Linux, Radioconda)
---------------------------------------
HackRF is supported out of the box after installing RIA Toolkit OSS.
1. Ensure ``libhackrf`` is installed at the system level. On most Ubuntu installations this is already
present. If not:
1. Activate your Radioconda environment:
.. code-block:: bash
sudo apt install libhackrf-dev
conda activate <your-env-name>
2. Install udev rules to allow non-root device access:
For most users:
2. Install the System Package (Ubuntu / Debian):
.. code-block:: bash
sudo udevadm control --reload
sudo udevadm trigger
sudo apt-get update
sudo apt-get install hackrf
For **Radioconda** users, create a symlink from your conda environment instead:
3. Install a ``udev`` rule by creating a link into your Radioconda installation:
.. code-block:: bash
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/53-hackrf.rules /etc/udev/rules.d/53-radioconda-hackrf.rules
sudo udevadm control --reload
sudo udevadm trigger
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/53-hackrf.rules /etc/udev/rules.d/53-radioconda-hackrf.rules
sudo udevadm control --reload
sudo udevadm trigger
Make sure your user account belongs to the ``plugdev`` group in order to access your device:
Make sure your user account belongs to the plugdev group in order to access your device:
.. code-block:: bash
sudo usermod -a -G plugdev <user>
sudo usermod -a -G plugdev <user>
.. note::
You may have to restart your system for group membership changes to take effect.
You may have to restart your system for changes to take effect.
Further information
-------------------

View File

@ -43,34 +43,34 @@ Limitations
affect stability.
- USB 2.0 connectivity might limit data transfer rates compared to USB 3.0 or Ethernet-based SDRs.
Set up instructions (Linux)
---------------------------
Set up instructions (Linux, Radioconda)
---------------------------------------
The PlutoSDR is supported out of the box after installing RIA Toolkit OSS. The required Python package
(``pyadi-iio``) is included in the toolkit's dependencies.
1. Ensure ``libiio`` is installed at the system level. On most Ubuntu installations this is already present.
If not:
1. Activate your Radioconda environment:
.. code-block:: bash
sudo apt install libiio-dev libiio-utils libiio0
conda activate <your-env-name>
.. note::
PlutoSDR devices are discoverable over both USB and network (mDNS). Network discovery uses Avahi — if
``avahi-daemon`` is not running, network discovery will be skipped but USB discovery still works.
2. Install a ``udev`` rule to allow non-root device access:
For most users:
2. Install system dependencies:
.. code-block:: bash
sudo udevadm control --reload
sudo udevadm trigger
sudo apt-get update
sudo apt-get install -y \
build-essential \
git \
libxml2-dev \
bison \
flex \
libcdk5-dev \
cmake \
libusb-1.0-0-dev \
libavahi-client-dev \
libavahi-common-dev \
libaio-dev
For **Radioconda** users, create a symlink from your conda environment instead:
3. Install a ``udev`` rule by creating a link into your Radioconda installation:
.. code-block:: bash
@ -78,18 +78,11 @@ The PlutoSDR is supported out of the box after installing RIA Toolkit OSS. The r
sudo udevadm control --reload
sudo udevadm trigger
Once you can communicate with the hardware, you may want to perform the post-install steps detailed on
the `PlutoSDR Documentation <https://wiki.analog.com/university/tools/pluto>`_.
Once you can talk to the hardware, you may want to perform the post-install steps detailed on the `PlutoSDR Documentation <https://wiki.analog.com/university/tools/pluto>`_.
3. (Optional) Building ``libiio`` or ``libad9361-iio`` from source:
4. (Optional) Building ``libiio`` or ``libad9361-iio`` from source:
This step is only required if you need a version not available via ``apt``. First install build
dependencies:
.. code-block:: bash
sudo apt-get install -y build-essential git libxml2-dev bison flex libcdk5-dev cmake \
libusb-1.0-0-dev libavahi-client-dev libavahi-common-dev libaio-dev
This step is only required if you want the latest version of these libraries not provided in Radioconda.
.. code-block:: bash

View File

@ -30,10 +30,18 @@ Limitations
- Sensitivity and performance can vary depending on the specific model and components.
- Requires external software for signal processing and analysis.
Set up instructions (Linux)
---------------------------
Set up instructions (Linux, Radioconda)
---------------------------------------
1. If you previously had RTL-SDR drivers installed, purge them first:
1. Activate your Radioconda environment:
.. code-block:: bash
conda activate <your-env-name>
2. Purge drivers:
If you already have other drivers installed, purge them from your system.
.. code-block:: bash
@ -45,95 +53,47 @@ Set up instructions (Linux)
sudo rm -rvf /usr/local/include/rtl_*
sudo rm -rvf /usr/local/bin/rtl_*
2. Install build dependencies:
3. Install RTL-SDR Blog drivers:
.. code-block:: bash
sudo apt install libusb-1.0-0-dev git cmake pkg-config build-essential
3. Build ``librtlsdr`` from source:
The standard ``librtlsdr`` package available via ``apt`` is missing symbols required by the Python
bindings. Build from the **rtl-sdr-blog fork**:
.. code-block:: bash
git clone https://github.com/rtlsdrblog/rtl-sdr-blog.git
cd rtl-sdr-blog
mkdir build && cd build
cmake .. -DINSTALL_UDEV_RULES=ON
sudo apt-get install libusb-1.0-0-dev git cmake pkg-config build-essential
git clone https://github.com/osmocom/rtl-sdr
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
sudo ldconfig
.. important::
Do not use the osmocom ``rtl-sdr`` repository or the Ubuntu ``librtlsdr-dev`` apt package. Neither
provides the ``rtlsdr_set_dithering`` symbol that the Python bindings require.
4. Blacklist the kernel DVB driver:
The kernel DVB-T driver (``dvb_usb_rtl28xxu``) claims the RTL-SDR device and prevents ``librtlsdr``
from accessing it.
For most users:
4. Blacklist the DVB-T modules that would otherwise claim the device:
.. code-block:: bash
echo 'blacklist dvb_usb_rtl28xxu' | sudo tee /etc/modprobe.d/blacklist-rtlsdr.conf
sudo modprobe -r dvb_usb_rtl28xxu
For **Radioconda** users, a blacklist configuration is already provided in your conda environment:
.. code-block:: bash
sudo ln -s $CONDA_PREFIX/etc/modprobe.d/rtl-sdr-blacklist.conf /etc/modprobe.d/radioconda-rtl-sdr-blacklist.conf
sudo modprobe -r $(cat $CONDA_PREFIX/etc/modprobe.d/rtl-sdr-blacklist.conf | sed -n -e 's/^blacklist //p')
If ``modprobe -r`` fails with "Module is in use", unplug the RTL-SDR dongle, run the command again,
then plug it back in. Alternatively, reboot — the blacklist takes effect on next boot.
.. note::
.. note::
In addition to the Radioconda blacklist file, some systems also require
manually blacklisting the following DVB-T modules to prevent them from
claiming the device:
Some systems also require blacklisting additional DVB-T modules. Add these entries to your
blacklist configuration if needed:
- ``dvb_usb_rtl28xxu``
- ``rtl2832``
- ``rtl2830``
- ``rtl2832``
- ``rtl2830``
Add these entries to ``rtlsdr.conf`` (or create the file at
``/etc/modprobe.d/rtlsdr.conf``) if they are not already present.
5. Reload udev rules:
For most users (rules are installed by the build step above):
5. Install a udev rule by creating a link into your radioconda installation:
.. code-block:: bash
sudo udevadm control --reload
sudo udevadm trigger
For **Radioconda** users, create a symlink from your conda environment instead:
.. code-block:: bash
sudo ln -s $CONDA_PREFIX/lib/udev/rules.d/rtl-sdr.rules /etc/udev/rules.d/radioconda-rtl-sdr.rules
sudo udevadm control --reload
sudo udevadm trigger
6. Install Python packages:
.. code-block:: bash
pip install pyrtlsdr==0.3.0
pip install setuptools==69.5.1
.. note::
``pyrtlsdr`` 0.4.0 references a ``rtlsdr_set_dithering`` symbol not present in standard
``librtlsdr`` builds. Version 0.3.0 works correctly.
``pyrtlsdr`` 0.3.0 depends on ``pkg_resources``, which was removed in ``setuptools`` >= 82.
Pinning to 69.5.1 ensures ``pkg_resources`` is available.
Further Information
-------------------
- `RTL-SDR Official Website <https://www.rtl-sdr.com/>`_

View File

@ -39,48 +39,18 @@ Limitations
Set up instructions (Linux)
---------------------------------
ThinkRF devices require the ``pyrf`` package, which is written in Python 2 syntax and must be patched
after installation to work with Python 3.
.. note::
``lib2to3`` was fully removed in Python 3.13. ThinkRF support is currently limited to
**Python 3.12 and below**.
1. Install ``lib2to3``:
On some distributions (including Ubuntu 24.04+), ``lib2to3`` is not included by default:
Install PyRF
.. code-block:: bash
sudo apt install python3-lib2to3
pip install 'pyrf>=2.8.0'
2. Install ``pyrf``:
Convert PyRF scripts to Python 3
.. code-block:: bash
pip install pyrf
3. Patch ``pyrf`` for Python 3:
The ``pyrf`` package contains Python 2 syntax throughout (e.g., ``dict.iteritems()``, ``print``
statements). Run the following to automatically convert the entire package to Python 3:
.. code-block:: bash
python -c "
from lib2to3.refactor import RefactoringTool, get_fixers_from_package
import pyrf, os
pyrf_path = os.path.dirname(pyrf.__file__)
fixers = get_fixers_from_package('lib2to3.fixes')
tool = RefactoringTool(fixers)
tool.refactor_dir(pyrf_path, write=True)
print('Done')
"
.. note::
This patches the entire ``pyrf`` package in place, which is required for the driver to fully load.
cd ../scripts
./convert_pyrf_to_python3.sh
Further Information
-------------------

View File

@ -41,111 +41,48 @@ Limitations
- Compatibility with certain software tools may vary depending on the version of the UHD.
- Price range can be a consideration, especially for high-end models.
Set up instructions (Linux)
---------------------------
Set up instructions (Linux, Radioconda)
---------------------------------------
USRP devices require the UHD (USRP Hardware Driver) library with Python bindings. There is no pip-installable
UHD package — it must either be installed via conda or built from source.
**Option A: Install via conda (recommended for conda environments)**
1. Activate your Radioconda environment:
.. code-block:: bash
conda install conda-forge::uhd
conda activate <your-env-name>
**Option B: Build from source (required for pip/venv environments)**
2. Install UHD and Python bindings:
The Python bindings must target the same Python version used in your virtual environment.
.. code-block:: bash
1. Install build dependencies:
conda install conda-forge::uhd
.. code-block:: bash
sudo apt install cmake build-essential libboost-all-dev libusb-1.0-0-dev \
python3-dev python3-numpy libncurses-dev
2. Install the Mako template library into your virtual environment (used by UHD's build system):
.. code-block:: bash
pip install mako
3. Clone and build UHD with your virtual environment activated:
.. code-block:: bash
git clone https://github.com/EttusResearch/uhd.git
cd uhd
git checkout v4.7.0.0
cd host
mkdir build && cd build
cmake -DENABLE_PYTHON_API=ON -DPYTHON_EXECUTABLE=$(which python3) ..
make -j$(nproc)
sudo make install
sudo ldconfig
.. important::
Run the ``cmake`` command with your virtual environment activated so ``$(which python3)`` points
to the correct interpreter. Before running ``make``, verify the cmake output includes::
-- * LibUHD - Python API → must say "Enabling"
-- Python interpreter: .../your-venv/bin/python3
If "LibUHD - Python API" is not listed under enabled components, the Python bindings will not be
built. The build typically takes 1030 minutes.
4. Copy the Python bindings into your virtual environment if ``import uhd`` fails after installation:
.. code-block:: bash
cp -r ~/uhd/host/build/python/uhd ~/.venv/lib/python3.XX/site-packages/
Replace ``python3.XX`` with your Python version (e.g., ``python3.12``).
.. note::
If you have a pre-existing UHD installation built against a different Python version, you will see
a circular import error. The bindings must match the Python version in your virtual environment exactly.
**After either installation method:**
1. Download UHD FPGA/firmware images:
3. Download UHD images:
.. code-block:: bash
uhd_images_downloader
2. Verify device access:
4. Verify access to your device:
.. code-block:: bash
.. code-block:: bash
uhd_find_devices
uhd_find_devices
For USB devices (e.g. B-series), install a ``udev`` rule.
For USB devices only (e.g. B series), install a ``udev`` rule by creating a link into your Radioconda installation.
For most users:
.. code-block:: bash
.. code-block:: bash
sudo ln -s $CONDA_PREFIX/lib/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/radioconda-uhd-usrp.rules
sudo udevadm control --reload
sudo udevadm trigger
sudo udevadm control --reload
sudo udevadm trigger
5. (Optional) Update firmware/FPGA images:
For **Radioconda** users, create a symlink from your conda environment instead:
.. code-block:: bash
.. code-block:: bash
uhd_usrp_probe
sudo ln -s $CONDA_PREFIX/lib/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/radioconda-uhd-usrp.rules
sudo udevadm control --reload
sudo udevadm trigger
3. (Optional) Update firmware/FPGA images:
.. code-block:: bash
uhd_usrp_probe
This will ensure your device is running the latest firmware and FPGA versions.
This will ensure your device is running the latest firmware and FPGA versions.
Further information
-------------------

View File

@ -58,7 +58,7 @@ class HackRF(SDR):
:param channel: The channel the HackRF is set to. (Not actually used)
:type channel: int
:param gain_mode: 'absolute' passes gain directly to the sdr,
'relative' means that gain should be a negative value, and it will be subtracted from the max gain (40).
'relative' means that gain should be a negative value, and it will be subtracted from the max gain (40).
:type gain_mode: str
"""
print("Initializing RX")

View File

@ -54,7 +54,7 @@ class USRP(SDR):
:param channel: The channel the USRP is set to.
:type channel: int
:param gain_mode: 'absolute' passes gain directly to the sdr,
'relative' means that gain should be a negative value, and it will be subtracted from the max gain.
'relative' means that gain should be a negative value, and it will be subtracted from the max gain.
:type gain_mode: str
:param rx_buffer_size: Internal buffer size for receiving samples. Defaults to 960000.
:type rx_buffer_size: int
@ -285,7 +285,7 @@ class USRP(SDR):
:param channel: The channel the USRP is set to.
:type channel: int
:param gain_mode: 'absolute' passes gain directly to the sdr,
'relative' means that gain should be a negative value, and it will be subtracted from the max gain.
'relative' means that gain should be a negative value, and it will be subtracted from the max gain.
:type gain_mode: str
"""