USRP Hardware Driver and Device Manual Version: 4.10.0.0_release
UHD and USRP Manual
Loading...
Searching...
No Matches
Device Identification

Identifying USRP Devices

Devices are addressed through key/value string pairs. These string pairs can be used to narrow down the search for a specific device or group of devices. Most UHD utility applications and examples have an --args parameter that takes a device address, which is expressed as a delimited string.

See uhd::device_addr_t for reference.

Note that the device "address" can also take configuration options. See Configuring Devices and Streamers for a list of those options.

Common device identifiers

Every device has several ways of identifying it on the host system:

Identifier Key Notes Devices Example Value
Serial # serial globally unique identifier All devices 12345678
IP Address addr unique identifier on a network All network devices 192.168.10.2
Resource resource unique identifier for USRP RIO devices (over PCI Express) X3x0 RIO0
Name name optional user-set identifier or hostname All devices my_usrp1 (User-defined value)
Type type hardware series identifier All devices usrp1, usrp2, b200, x300, n3xx, x4xx ...
Vendor/Product ID vid,pid Both must be provided, as well as type. All USB Devices vid=0x04b4,pid=0x8613

Device discovery via command line

Devices attached to your system can be discovered using the uhd_find_devices program. This program scans your system for supported devices and prints out an enumerated list of discovered devices and their addresses. The list of discovered devices can be narrowed down by specifying device address args.

uhd_find_devices

Device address arguments can be supplied to narrow the scope of the search.

uhd_find_devices --args="type=usrp1"

-- OR --

uhd_find_devices --args="serial=12345678"

Device discovery through the API

The device::find() API call searches for devices and returns a list of discovered devices.

uhd::device_addr_t hint; //an empty hint discovers all devices
Definition device_addr.hpp:39
static device_addrs_t find(const device_addr_t &hint, device_filter_t filter=ANY)
Find devices attached to the host.
std::vector< device_addr_t > device_addrs_t
A typedef for a vector of device addresses.
Definition device_addr.hpp:94

The hint argument can be populated to narrow the scope of the search.

hint["type"] = "usrp1";
-- OR --
hint["serial"] = "12345678";

Device properties

Properties of devices attached to your system can be probed with the uhd_usrp_probe program. This program constructs an instance of the device and prints out its properties, such as detected daughterboards, frequency range, gain ranges, etc...

Usage:

uhd_usrp_probe --args <device-specific-address-args>

Naming a USRP Device

For convenience purposes, users may assign a custom name to their USRP device. The USRP device can then be identified via name, rather than a difficult to remember serial or address.

A name has the following properties:

  • is composed of ASCII characters
  • is 0-20 characters
  • is not required to be unique

Set a custom name

Run the following commands:

cd <install-path>/lib/uhd/utils
./usrp_burn_mb_eeprom --args=<optional device args> --values="name=lab1_xcvr"

Discovery via name

The keyword name can be used to narrow the scope of the search. Example with the find devices utility:

uhd_find_devices --args="name=lab1_xcvr"

-- OR --

uhd_find_devices --args="type=usrp1, name=lab1_xcvr"

Discovery of MPM devices

By default MPM devices will be checked for reachability. To do this, the MPM finder routine will try to open an RPC connection to each of the IP addresses that the devices report. This will take some time as a TCP/IP connection needs to be established. Also, some IPs might not be reachable from each host in the network (e.g. for direct cabled QSFP connections). Then the check would run into a timeout which also delays the overall find.

You can set an mpm_check_reachability flag to control whether this reachability check should be performed or not. If performed, the find operation takes significantly more time to execute but it ensures that all reported IP addresses can be used to establish a connection to the devices. If the check is skipped, find executes much faster but can make no guarantee whether the host can open a connection to the reported IPs. The flag can be either given with the args option, like so

uhd_find_devices --args mpm_check_reachability=no

or as a setting in your Global section of your uhd.conf file.

The default value for mpm_check_reachability is true. The --args option overwrites the value of the uhd.conf file.