Main Content

findsdru

Status of USRP radios connected to host computer

Add-On Required: This feature requires the Wireless Testbench™ Support Package for NI™ USRP™ Radios add-on.

Description

radios = findsdru returns a structure that contains the model number, IP address, serial number, and status of each USRP™ radio that is connected to the host computer.

example

radios = findsdru(IPAddress) returns information for only the USRP radio with the specified IP address.

example

radios = findsdru(serialNum) returns information for only the USRP radio with the specified serial number.

radios = findsdru(___,StatusOnly=logical) specifies the option to return the detailed status of the radio, in addition to the input arguments in the previous syntaxes.

example

Examples

collapse all

Get the model number, IP address, serial number, and status of each USRP radio that is connected to the host computer and has been set up using the Radio Setup wizard.

radios = findsdru
Checking radio connections...
radios=1×2 struct array with fields:
    Platform
    IPAddress
    SerialNum
    Status

Query the contents of the first element in the array.

radios(1)
ans = struct with fields:
     Platform: 'N320/N321'
    IPAddress: '192.168.20.2'
    SerialNum: '3202230'
       Status: 'Success'

Use the radioConfigurations function to query the name, hardware, and IP address of any radio configurations you have saved using the Radio Setup wizard.

radios = radioConfigurations
radios = struct with fields:
         Name: "MyRadio"
     Hardware: "USRP X310"
    IPAddress: "192.168.40.2"

Get the serial number and status of the USRP radio associated with the first saved radio configuration by specifying the IP address. Set the StatusOnly flag to false to get the detailed status information.

findsdru(radios(1).IPAddress,StatusOnly=false)
Checking radio connections...
ans = struct with fields:
     Platform: 'X310'
    IPAddress: '192.168.40.2'
    SerialNum: '31D3D75'
       Status: 'Success'

Input Arguments

collapse all

IP address of the USRP radio that is connected to the host computer, specified as a dotted-quad character vector.

Data Types: char

Serial number of the USRP radio that is connected to the host computer, specified as a character vector.

Data Types: char

Option to get status of connected radios faster, specified as one of these options.

  • true — Enable the findsdru to return the radio status faster.

  • false — Enable the findsdru to get the detailed status regarding firmware compatibility, no response from the device, and other UHD errors.

For more information about the reduction in execution times, see Reduced execution time for findsdru.

Example: StatusOnly=false

Data Types: logical

Output Arguments

collapse all

Information about connected USRP devices, returned as a structure containing these fields.

FieldsDescription
PlatformModel number of the USRP device
IPAddressIP address of the USRP device
SerialNumSerial number of the USRP device
StatusStatus information of the USRP device

The Status field of this structure displays one of the messages described in this table.

Status ValueDefinition
SuccessUSRP device is available.
No devices foundNo USRP devices found.
Not compatibleDevice with incompatible firmware. To communicate with this device, you must update the firmware to the version returned by the function getSDRuDriverVersion. You can update the firmware on your radio using the Radio Setup wizard.
Not responding

Device is not responding because of any of these reasons.

  • The device is not attached to the host computer.

  • No device with the specified IP address exists. If you saved a radio configuration when you set up your radio using the Radio Setup wizard, use the radioConfigurations function to find the IP address.

  • The subnet address of the host computer does not match the subnet address of the device. The subnet address is the third field of the IP address. Verify that the subnet value of the host and radio are the same. For example, your NIC has an IP address of 192.168.10.1, and the IP address of the USRP radio is 192.168.20.2. The IP addresses differ in the third octet.

  • The specified serial number is invalid.

BusyDevice is in use. The device is already owned by a block, a block dialog, or a System object™.
Unknown errorUnknown problem.

Version History

Introduced in R2012b

expand all