Main Content

Installation for Targeting NI USRP Radios

To target NI™ USRP™ radio devices with Wireless Testbench™, you must install and configure third-party tools and additional support packages.

For details about which NI USRP radios you can target, see Supported Radio Devices.

Note

Generating a bitstream with this workflow is supported only on a Linux® operating system (OS). For details about host system requirements, see System Requirements.

Connect and Set Up an NI USRP Radio

The Wireless Testbench software provides hardware targeting support through Wireless Testbench Support Package for NI USRP Radios. For instructions on how to install the support package, see Install Support Package for NI USRP Radios.

To connect and set up your radio, use the radioSetupWizard function to open the Radio Setup wizard and follow the steps. To see your previously saved radio setup configurations, use the radioConfigurations function.

You can generate a bitstream with this workflow without connecting to and setting up your radio.

Install Vivado

Install Vivado® development tools version 2019.1 and the AR73068 patch.

Install and Configure Python

Step 1: Install Compatible Python Version

Check if you have a compatible Python® version by using running this code in MATLAB®. Compatible Python versions are 3.9, 3.10, and 3.11.

!bash -i -c 'python3 -V'
If you have a compatible version, proceed to step 2.

If your system-wide Python version is incompatible, you can choose to update your system-wide Python version, or download a pre-built standalone version of Python to use with MATLAB.

 Option A: Install Compatible Python Version System-Wide

 Option B: Download Pre-Built Standalone Version of Python to Use with MATLAB

Step 2: Install Compatible Python Packages in Virtual Python Environment

Install compatible Python packages in a virtual Python environment and add them to the MATLAB path. This enables you to configure a Python environment to use with MATLAB without affecting the system-wide Python environment.

  1. In a terminal, create a virtual Python environment. These instructions use your local home directory, but you can choose any location where you have write privileges. If you installed a compatible Python version in step 1 run this code in the same terminal.

    python3 -m venv /home/$USER/python/environments/wt

  2. Install compatible versions of these required Python packages: numpy, ruamel.yaml, pyyaml, and mako.

    /home/$USER/python/environments/wt/bin/python3 -m pip install "numpy>=1.11,<2.0" "ruamel.yaml>=0.15,<0.18" "pyyaml>=3.13.0" "mako>=0.4.2"

Step 3: Add Executables to MATLAB Path

In a new MATLAB session, use the setenv function to add the path to the executables in the virtual Python environment to the existing path. Set the executablesPath variable to the location of your virtual Python environment and run this code.

executablesPath = ['/home',getenv('USER'),'/python/environments/wt/bin'];
setenv('PATH',[executablesPath,':',getenv('PATH')])
Run this code at the start of each MATLAB session, or add it to your MATLAB startup script. For details, see Specify Startup Options.

Step 4: Verify Python Installation in MATLAB

  1. Verify that MATLAB is using a compatible Python version by using running this code. Compatible Python versions are 3.9, 3.10, and 3.11.

    !bash -i -c 'python3 -V'

  2. Verify that MATLAB is using compatible Python package versions. The compatible version ranges are detailed in the table.

    Python PackageCompatible Version Range
    numpyGreater than or equal to 1.11 and less than 2.0
    ruamel.yamlGreater than or equal to 0.15 and less than 0.18
    pyyamlGreater than or equal to 3.13.0
    makoGreater than or equal to 0.4.2

    To display the installed Python package versions, run this code.

    !bash -i -c 'python3 -m pip freeze'

Install Xterm

Confirm that the Xterm terminal emulator is installed by entering the following code in a terminal:

which xterm

If no executable can be found, install Xterm. Run one of the following commands, depending on your Linux distribution:

  • Ubuntu or Debian

    sudo apt install xterm

  • Red Hat or openSUSE

    sudo dnf -y install xterm

Related Topics