SkillAgentSearch skills...

matlab-set-up-usrp-radio

Set up and verify a connection to an NI USRP radio (USRP E320, N300, N310, N320, N321, X300, X310, or X410) using Wireless Testbench

Install / Use

npx skills add matlab/matlab-agentic-toolkit --skill matlab-set-up-usrp-radio

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

93/100

Supported Platforms

Universal

Tags

Our assessment of matlab-set-up-usrp-radio

matlab-set-up-usrp-radio scores 93/100 on our quality scale, 819th of 4,646 Development & Engineering skills we index (top 18%).

Its SKILL.md is 21 KB long, well organised into 27 sections with 18 code examples: a thorough specification that gives an agent plenty to work with.

With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 18 days ago, so matlab-set-up-usrp-radio is actively maintained.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

matlab-set-up-usrp-radio compared with similar skills

All 4 of these similar skills score higher than matlab-set-up-usrp-radio; compare them before choosing.

SkillScoreStarsUpdatedFormat
matlab-set-up-usrp-radio (this skill)by matlab931.1k18d agoSKILL.md
ai-job-searchby MadsLorentzen10044.9ktodayCLAUDE.md
claude-howtoby luongnv8910041.7k3d agoCLAUDE.md
algorithmic-artby anthropics100177.9k11d agoSKILL.md
pptxby anthropics100177.9k11d agoSKILL.md

Frequently asked questions

How do I install matlab-set-up-usrp-radio?
Run npx skills add matlab/matlab-agentic-toolkit --skill matlab-set-up-usrp-radio. The install tabs above show the steps for each supported agent.
Which AI agents does matlab-set-up-usrp-radio work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is matlab-set-up-usrp-radio safe to use?
It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is matlab-set-up-usrp-radio still maintained?
The repository was last updated 18 days ago, so matlab-set-up-usrp-radio is actively maintained.

name: matlab-set-up-usrp-radio description: > Set up and verify a connection to an NI USRP radio (USRP E320, N300, N310, N320, N321, X300, X310, or X410) using Wireless Testbench. Use when connecting a USRP for the first time, configuring radio hardware, troubleshooting connection failures, or verifying a radio setup. Covers host inspection (OS, NIC type/speed/MTU), device discovery (findsdru, probesdru), UHD version checking, programmatic radio configuration, and basebandTransceiver verification. Also use when the user mentions USRP setup, radio not found, connection errors, dropped samples, or network configuration for SDR hardware. license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md compatibility: ">=R2026a" metadata: author: MathWorks version: "1.0"

Set Up USRP Radio with Wireless Testbench

Connect, configure, and verify a supported NI USRP radio for use with Wireless Testbench in MATLAB.

Required References — Load Immediately

When to Use

  • Connecting a USRP radio to a host computer for the first time
  • Configuring network settings (NIC, IP address, MTU) for USRP streaming
  • Running radioSetupWizard or radioConfigurations
  • Troubleshooting "radio not found", connection errors, or dropped samples
  • Verifying a radio setup works end-to-end

When Not to Use

These workflows each require a working radio connection first — use this skill for that setup step.

  • FPGA targeting or HDL workflows — check for a dedicated skill, or see Target NI USRP Radios
  • Generating or transmitting waveforms — check for a dedicated skill, or see Transmit and Capture
  • Triggered (wake-on-signal) capture with preamble/energy detection — use the matlab-detect-capture-usrp skill
  • Multi-device synchronization — check for a dedicated skill, or see Radio Management
  • comm.SDRuReceiver or comm.SDRuTransmitter path — this skill covers the modern Wireless Testbench path
  • Installing MATLAB or toolboxes — do not use or recommend mpm (MATLAB Package Manager). This skill assumes MATLAB and the Wireless Testbench support package are already installed.

Workflow

Follow these steps in order. Inspect the host and radio before creating any radio configuration. Every check catches a different class of failure.

Step 0: Verify Support Package

addons = matlab.addons.installedAddons;
if ~any(addons.Identifier == "NI_USRP")
    error("Install 'Wireless Testbench Support Package for NI USRP Radios' via Add-On Explorer.")
end

If missing, the user must install it via Add-On Explorer before proceeding.

Step 1: Inspect Host

Before touching the radio, gather host system information. This determines whether the hardware is capable of 10 GbE streaming.

Detect OS and Platform

if ispc
    platform = "Windows";
elseif ismac
    platform = "macOS";
else
    platform = "Linux";
end
fprintf("Platform: %s, MATLAB %s\n", platform, version)

Inspect Network Interfaces (Linux)

% List all network interfaces with speed, MTU, and driver info
[~, interfaces] = system('ip -o link show | grep -v "lo:"');
disp(interfaces)

Then for each interface that could connect to the USRP, check NIC details:

% Replace <iface> with the actual interface name (for example, enp1s0f0)
[~, nicDetails] = system('ethtool <iface> 2>/dev/null | head -30');
disp(nicDetails)

% Check if it's a USB dongle
[~, usbInfo] = system('readlink -f /sys/class/net/<iface>/device 2>/dev/null');
disp(usbInfo)  % If path contains "usb", it's a USB adapter

Inspect Network Interfaces (Windows)

[~, interfaces] = system('powershell "Get-NetAdapter | Format-Table Name, InterfaceDescription, LinkSpeed, MacAddress"');
disp(interfaces)

What to Look For

| Check | Good | Bad — will cause problems | |-------|------|--------------------------| | NIC type | Dedicated PCIe NIC (Intel X520/X710, Mellanox ConnectX) | USB-to-Ethernet dongle | | Link speed | See link speed table below | 100 Mbps or lower | | USB path | Not USB | USB hub, USB 2.0, low-performance chipset | | MTU | See table below — depends on NIC speed | Using wrong MTU for link speed |

Link Speed by Device

| Device | FPGA variant | Supported link speeds | Notes | |--------|--------------|----------------------|-------| | X410 | — | 10 GbE only | QSFP → 4 × SFP+ breakout cable required; native QSFP (100 GbE) not supported | | X310, N310, N320 | HG | 1 GbE and 10 GbE | Both speeds work with the HG variant the MATLAB installation includes | | E320 | 1G (default) | 1 GbE default; 10 GbE with XG variant | Defaults to 1G; switch to XG through sdruload for 10 GbE over SFP+ |

MTU and Jumbo Frames

| Link speed | MTU | Jumbo frames | Notes | |------------|-----|--------------|-------| | 10 GbE | 9000 | Enabled (9014 bytes) | Required for full-rate streaming | | 1 GbE (Linux) | 1500 | Disabled | Default is correct; jumbo frames not supported | | 1 GbE (Windows) | 1498 | Disabled | UHD 4.6 on Windows adds 2 bytes; MTU must be 1498. Expect a benign "send frame size" warning from UHD — safe to ignore |

X410 Note

The X410 has a QSFP28 connector but Wireless Testbench does not support native 100 GbE QSFP. You must use a QSFP → 4 × 10 GbE SFP+ breakout cable — each lane appears as a separate 10 GbE SFP+ port (Port 0–3).

E320 Note

The MATLAB installation includes the 1G FPGA variant by default. A standard 1 GbE NIC (PCIe or onboard) is correct for default operation. The E320 also has an SFP+ port — switch to the XG variant through sdruload for 10 GbE streaming (requires a 10 GbE NIC and SFP+ module).

Check MTU and Kernel Buffer Sizes (Linux)

[~, mtu] = system('cat /sys/class/net/<iface>/mtu');
fprintf("MTU: %s", mtu)

[~, rmem] = system('sysctl net.core.rmem_max');
[~, wmem] = system('sysctl net.core.wmem_max');
fprintf("%s%s", rmem, wmem)

USB dongle warning: USB-to-Ethernet adapters are unreliable for USRP streaming, even USB 3.0 models. They cause dropped samples, timeouts, and intermittent failures. If a USB dongle is detected, warn the user strongly and recommend a dedicated PCIe NIC. If the user must use a dongle (for example, laptop), suggest:

  • Connect laptop to power supply (USB power management throttles adapters)
  • Try alternative adapter models
  • Reduce sample rate to lower bandwidth demands

Detect bridge and virtual interfaces: If the host runs Hyper-V, Docker, libvirt, or NIC teaming, the USRP-facing NIC may be enslaved to a bridge. See references/bridge-detection.md for detection commands (Linux and Windows). If a bridge is found, set static IP and MTU on the bridge interface, not the physical NIC.

Step 2: Discover and Inspect Radio

Before running discovery, confirm with the user that the radio is powered on, cabled, and the Ethernet link LED is lit. E320 and N3xx devices take 30–60 seconds to boot after power-on — findsdru returns empty until the device finishes booting. If findsdru returns empty and the user needs cabling help, point them to the archived doc for their release: https://www.mathworks.com/help/releases/<release>/wireless-testbench/ug/resolve-issues-with-connecting-radio-to-host.html (derive <release> from version('-release')).

Use findsdru to discover devices — this is the only recommended MATLAB function for radio discovery. Do not use uhd_find_devices.

radios = findsdru

Returns a structure array with fields: Platform, IPAddress, SerialNum, Status. A Status of 'Success' means the device is reachable.

Multiple Devices Found

If numel(radios) > 1, list all discovered devices and ask the user which one to set up.

if numel(radios) > 1
    fprintf("Found %d devices:\n", numel(radios));
    for i = 1:numel(radios)
        fprintf("  [%d] %s at %s (Serial: %s) — %s\n", ...
            i, radios(i).Platform, radios(i).IPAddress, radios(i).SerialNum, radios(i).Status);
    end
end

Ask the user which device to configure. This skill sets up one radio at a time. For multi-device synchronization (shared clock, coordinated capture), a separate workflow is needed after each device is individually configured.

Target device not in results: If the user identifies a specific device (for example, "my E320") but that device does not appear in findsdru output, do not select a different device from the list. The target device is unreachable — skip directly to troubleshooting (Step 6) focused on why that specific device is not discovered. Common causes: wrong subnet on the NIC facing that device, dongle or NIC not configured, device still booting, or cabling issue. Never assume a discovered device "is" the user's target under a different name — each USRP model reports its actual platform string.

If no radio is found at all, the NIC is likely misconfigured (wrong subnet, interface down, or firewall). Go back to Step 1 and check specifically: is the interface up? Is there a static IP on the same subnet as the USRP (for example, 192.168.10.x)? Then retry findsdru. If it still fails, go to Step 6 (Troubleshooting).

Inspect the selected radio in detail:

% Use the IP address of the device the user selected
selectedRadio = radios(idx);  % idx = user's choice (e.g., 1)
info = probesdru(selectedRadio.IPAddress)

This returns motherboard, daughterboard, firmware, FPGA image, and the device-side UHD version.

Check UHD version match:

hostUHD = getSDRuDriverVersion

Compare the host UHD version with the device UHD version from the probesdru output. Version mismatch is a common failure. Each MATLAB release includes a specific UHD version. If mismatched, the radio configuration step (Step 4) attempts to update device firmware.

Default USRP IP addresses (factory defaults, all models):

| Port | Default IP | |------|-----------| | SFP+ Port 0 | 192.168.10.2 | | SFP+ Port 1 | 192.168.20.2 |

Step 3: Fix Host Issues

Based on Step 1 findings, fix any issues before proceeding to radio configuration.

Do not execute these commands directly — they require sudo (root privileges). Present them to the user and ask them to run the commands themselves. If the radio is already reachable through findsdru and no streaming issues are expected yet, skip to Step 4 and address host fixes later if dropped samples occur.

Linux — set static IP, MTU, and buffers:

# Set static IP on the same subnet as the USRP (replace <iface>)
sudo ip addr add 192.168.10.1/24 dev <iface>
sudo ip link set <iface> up

# Enable jumbo frames (REQUIRED for 10 GbE only — skip for 1 GbE)
sudo ip link set <iface> mtu 9000

# Increase kernel network buffers (REQUIRED for streaming)
sudo sysctl -w net.core.rmem_max=33554432
sudo sysctl -w net.core.wmem_max=33554432

For 1 GbE connections (for example, E320), leave MTU at the default 1500 — do not enable jumbo frames.

To make persistent, add to /etc/sysctl.conf and configure the interface in /etc/network/interfaces or NetworkManager.

Windows — adjust adapter settings (10 GbE):

  • Open Device Manager → Network Adapters → your NIC → Advanced
  • Set Jumbo Frame/Packet to 9014 bytes
  • Increase Receive Buffers and Transmit Buffers to maximum (adapter-dependent — check valid range first)
  • Disable interrupt moderation if available

Windows — adjust adapter settings (1 GbE, for example E320):

  • Set MTU to 1498 (required for UHD 4.6 on Windows — do not use 9000)
  • Leave Jumbo Frame/Packet disabled (1514 bytes)
  • In

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars1.1k
CategoryDevelopment
Updated18d ago
Forks134

Languages

MATLAB

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium