Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2baae2f63e | |||
| 4df5455af4 | |||
| 2881aaf06e | |||
|
Mmuq
|
a68a325cb4 |
|
|
@ -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 = '2025, Qoherent Inc'
|
||||
copyright = '2026, Qoherent Inc'
|
||||
author = 'Qoherent Inc.'
|
||||
release = '0.1.5'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. _examples:
|
||||
.. _sdr_examples:
|
||||
|
||||
############
|
||||
SDR Examples
|
||||
|
|
|
|||
|
|
@ -40,26 +40,36 @@ Limitations
|
|||
- USB 3.0 connectivity is required for optimal performance; using USB 2.0 will significantly limit data
|
||||
transfer rates.
|
||||
|
||||
Set up instructions (Linux, Radioconda)
|
||||
---------------------------------------
|
||||
Set up instructions (Linux)
|
||||
---------------------------
|
||||
|
||||
1. Activate your Radioconda environment.
|
||||
No additional Python packages are required for BladeRF beyond the base RIA Toolkit OSS installation.
|
||||
|
||||
1. Install the system library:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda activate <your-env-name>
|
||||
sudo apt install libbladerf-dev
|
||||
|
||||
2. Install the base dependencies and drivers (*Easy method*):
|
||||
For a more complete installation including CLI tools and FPGA images, use the Nuand PPA:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo add-apt-repository ppa:nuandllc/bladerf
|
||||
sudo apt-get update
|
||||
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.
|
||||
sudo apt-get install bladerf libbladerf-dev
|
||||
sudo apt-get install bladerf-fpga-hostedxa4 # Necessary for BladeRF 2.0 Micro xA4
|
||||
|
||||
3. Install a ``udev`` rule by creating a link into your Radioconda installation:
|
||||
2. Install udev rules:
|
||||
|
||||
For most users:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo udevadm control --reload
|
||||
sudo udevadm trigger
|
||||
|
||||
For **Radioconda** users, create symlinks from your conda environment instead:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
|
|||
|
|
@ -39,23 +39,28 @@ 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, Radioconda)
|
||||
---------------------------------------
|
||||
Set up instructions (Linux)
|
||||
---------------------------
|
||||
|
||||
1. Activate your Radioconda environment:
|
||||
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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda activate <your-env-name>
|
||||
sudo apt install libhackrf-dev
|
||||
|
||||
2. Install the System Package (Ubuntu / Debian):
|
||||
2. Install udev rules to allow non-root device access:
|
||||
|
||||
For most users:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install hackrf
|
||||
sudo udevadm control --reload
|
||||
sudo udevadm trigger
|
||||
|
||||
3. Install a ``udev`` rule by creating a link into your Radioconda installation:
|
||||
For **Radioconda** users, create a symlink from your conda environment instead:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
@ -63,7 +68,7 @@ Set up instructions (Linux, Radioconda)
|
|||
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
|
||||
|
||||
|
|
@ -71,7 +76,7 @@ Set up instructions (Linux, Radioconda)
|
|||
|
||||
.. note::
|
||||
|
||||
You may have to restart your system for changes to take effect.
|
||||
You may have to restart your system for group membership changes to take effect.
|
||||
|
||||
Further information
|
||||
-------------------
|
||||
|
|
|
|||
|
|
@ -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, Radioconda)
|
||||
---------------------------------------
|
||||
Set up instructions (Linux)
|
||||
---------------------------
|
||||
|
||||
1. Activate your Radioconda environment:
|
||||
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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda activate <your-env-name>
|
||||
sudo apt install libiio-dev libiio-utils libiio0
|
||||
|
||||
2. Install system dependencies:
|
||||
.. 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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
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
|
||||
sudo udevadm control --reload
|
||||
sudo udevadm trigger
|
||||
|
||||
3. Install a ``udev`` rule by creating a link into your Radioconda installation:
|
||||
For **Radioconda** users, create a symlink from your conda environment instead:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
@ -78,11 +78,18 @@ Set up instructions (Linux, Radioconda)
|
|||
sudo udevadm control --reload
|
||||
sudo udevadm trigger
|
||||
|
||||
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>`_.
|
||||
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>`_.
|
||||
|
||||
4. (Optional) Building ``libiio`` or ``libad9361-iio`` from source:
|
||||
3. (Optional) Building ``libiio`` or ``libad9361-iio`` from source:
|
||||
|
||||
This step is only required if you want the latest version of these libraries not provided in Radioconda.
|
||||
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
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
|
|||
|
|
@ -30,18 +30,10 @@ 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, Radioconda)
|
||||
---------------------------------------
|
||||
Set up instructions (Linux)
|
||||
---------------------------
|
||||
|
||||
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.
|
||||
1. If you previously had RTL-SDR drivers installed, purge them first:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
@ -53,47 +45,95 @@ If you already have other drivers installed, purge them from your system.
|
|||
sudo rm -rvf /usr/local/include/rtl_*
|
||||
sudo rm -rvf /usr/local/bin/rtl_*
|
||||
|
||||
3. Install RTL-SDR Blog drivers:
|
||||
2. Install build dependencies:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
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
|
||||
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
|
||||
make
|
||||
sudo make install
|
||||
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
|
||||
sudo ldconfig
|
||||
|
||||
4. Blacklist the DVB-T modules that would otherwise claim the device:
|
||||
.. 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:
|
||||
|
||||
.. 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')
|
||||
|
||||
.. note::
|
||||
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.
|
||||
|
||||
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:
|
||||
.. note::
|
||||
|
||||
Some systems also require blacklisting additional DVB-T modules. Add these entries to your
|
||||
blacklist configuration if needed:
|
||||
|
||||
- ``dvb_usb_rtl28xxu``
|
||||
- ``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:
|
||||
|
||||
5. Install a udev rule by creating a link into your radioconda installation:
|
||||
For most users (rules are installed by the build step above):
|
||||
|
||||
.. 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/>`_
|
||||
|
|
|
|||
|
|
@ -39,18 +39,48 @@ Limitations
|
|||
Set up instructions (Linux)
|
||||
---------------------------------
|
||||
|
||||
Install PyRF
|
||||
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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip install 'pyrf>=2.8.0'
|
||||
sudo apt install python3-lib2to3
|
||||
|
||||
Convert PyRF scripts to Python 3
|
||||
2. Install ``pyrf``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd ../scripts
|
||||
./convert_pyrf_to_python3.sh
|
||||
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.
|
||||
|
||||
Further Information
|
||||
-------------------
|
||||
|
|
|
|||
|
|
@ -41,34 +41,97 @@ 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, Radioconda)
|
||||
---------------------------------------
|
||||
Set up instructions (Linux)
|
||||
---------------------------
|
||||
|
||||
1. Activate your Radioconda environment:
|
||||
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.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda activate <your-env-name>
|
||||
|
||||
2. Install UHD and Python bindings:
|
||||
**Option A: Install via conda (recommended for conda environments)**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda install conda-forge::uhd
|
||||
|
||||
3. Download UHD images:
|
||||
**Option B: Build from source (required for pip/venv environments)**
|
||||
|
||||
The Python bindings must target the same Python version used in your virtual environment.
|
||||
|
||||
1. Install build dependencies:
|
||||
|
||||
.. 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 10–30 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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
uhd_images_downloader
|
||||
|
||||
4. Verify access to your device:
|
||||
2. Verify device access:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
uhd_find_devices
|
||||
|
||||
For USB devices only (e.g. B series), install a ``udev`` rule by creating a link into your Radioconda installation.
|
||||
For USB devices (e.g. B-series), install a ``udev`` rule.
|
||||
|
||||
For most users:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo udevadm control --reload
|
||||
sudo udevadm trigger
|
||||
|
||||
For **Radioconda** users, create a symlink from your conda environment instead:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
@ -76,7 +139,7 @@ Set up instructions (Linux, Radioconda)
|
|||
sudo udevadm control --reload
|
||||
sudo udevadm trigger
|
||||
|
||||
5. (Optional) Update firmware/FPGA images:
|
||||
3. (Optional) Update firmware/FPGA images:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user