USRP Driver Installation

We now need to install the Ettus UHD driver to properly access the USRP devices. These need to be rebuilt for the Jetson platform.

Key Resources

The installation guide aims to be self-contained. However, the following resources are useful for troubleshooting and developers working with the Ettus UHD driver:

Note

This is also achieved using the script scripts/install-usrp.sh

Prerequisites

We need to install the following packages to build the UHD driver.

sudo apt-get install \
    autoconf automake build-essential ccache cmake cpufrequtils \
    doxygen ethtool g++ git inetutils-tools libboost-all-dev \
    libncurses5 libncurses5-dev libusb-1.0-0 libusb-1.0-0-dev \
    libusb-dev python3-dev python3-mako python3-numpy python3-requests \
    python3-scipy python3-setuptools python3-ruamel.yaml ninja-build

Note

DPDK support is disabled by default.

Building UHD

For arm64, we need to build the UHD driver from source.

Get source code:

git clone https://github.com/EttusResearch/uhd.git
cd uhd/host

Configure and build:

mkdir build && cd build
cmake -DCMAKE_POLICY_DEFAULT_CMD0167=NEW -GNinja ..
ninja
ninja test
sudo ninja install

Download FPGA images:

sudo /usr/local/lib/uhd/utils/uhd_images_downloader.py

Post-build Configuration

We now need to access the configuration files to properly configure the USRP devices and grant access to the USB devices.

Re-build the linker cache:

sudo ldconfig

Set up USB permissions for non-root users:

sudo cp /usr/local/lib/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger

Testing Installation

We can now verify the installation and access the USRP serial number.

Check USB device detection:

lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...
Bus 001 Device 067: ID 2500:0020 Ettus Research LLC USRP B210

Search for UHD devices:

uhd_find_devices

[INFO] [UHD] linux; GNU C++ version 14.1.1 20240720; Boost_108300; UHD_4.7.0.0-0-ga5ed1872
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
  serial: 32FCXXX
  name: MyB210
  product: B210
  type: b200

Note

Please notice the serial number. It will be used to identify the USRP device in the 5G stack.

Get device details:

sudo uhd_usrp_probe

[INFO] [UHD] linux; GNU C++ version 14.1.1 20240720; Boost_108300; UHD_4.7.0.0-0-ga5ed1872
[INFO] [B200] Loading firmware image: /usr/local/share/uhd/images/usrp_b200_fw.hex...
...
[INFO] [B200] Actually got clock rate 16.000000 MHz.
...
|       Device: B-Series Device
|     _____________________________________________________
|    /
|   |       Mboard: B210
|   |   serial: 32FCXXX
|   |   name: MyB210
|   |   product: 2
|   |   revision: 4
|   |   FW Version: 8.0
|   |   FPGA Version: 16.0
|   |
|   |   Time sources:  none, internal, external, gpsdo
|   |   Clock sources: internal, external, gpsdo
|   |   Sensors: ref_locked
...

And run a final performance test:

/usr/local/lib/uhd/examples/benchmark_rate --rx_rate 10e6 --tx_rate 10e6

[INFO] [UHD] linux; GNU C++ version 14.1.1 20240720; Boost_108300; UHD_4.7.0.0-0-ga5ed1872
...
Benchmark rate summary:
Num received samples:     100235043
Num dropped samples:      0
Num overruns detected:    0
Num transmitted samples:  100062000
Num sequence errors (Tx): 0
Num sequence errors (Rx): 0
Num underruns detected:   0
Num late commands:        0
Num timeouts (Tx):        0
Num timeouts (Rx):        0

Done!