Main Content

setsdruip

Set IP address for USRP radio

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

Description

info = setsdruip(currentIP,newIP) sets a new IP address newIP for a USRP™ radio with the IP address currentIP.

Note

setsdruip supports USRP X3xx series devices and small form-factor pluggable port 0 (SFP+ port 0) only.

The function calls the UHD™ application usrp_burn_mb_eeprom, provided by Ettus Research™, as a system command and returns the command output in info. You must power-cycle the radio for the IP address change to take effect.

example

[info,status] = setsdruip(currentIP,newIP) additionally returns the status of the system command execution status.

Examples

collapse all

Set the IP address of a USRP radio at IP address 192.168.10.2 to 192.168.10.8.

info = setsdruip('192.168.10.2','192.168.10.8')
Checking radio connections...
info = 
    'Creating USRP device from address: addr=192.168.10.2
     □[0;32m[INFO] [UHD] □[0;39mlinux; GNU C++ version 12.3.0; Boost_108100; UHD_4.2.0.0-vendor
     □[0;32m[INFO] [X300] □[0;39mX300 initialization sequence...
     □[0;32m[INFO] [X300] □[0;39mMaximum frame size: 1472 bytes.
     □[0;32m[INFO] [X300] □[0;39mRadio 1x clock: 200 MHz
     
     Fetching current settings from EEPROM...
         EEPROM ["ip-addr0"] is "192.168.10.2"
     
     Setting EEPROM ["ip-addr0"] to "192.168.10.8"...
     Power-cycle the USRP device for the changes to take effect.
     
     Done
     '

Input Arguments

collapse all

Current IP address of a USRP X3xx series radio, specified as dotted-quad character vector or a dotted-quad string scalar.

Data Types: char | string

New IP address to be assigned to the USRP X3xx series radio, specified as dotted-quad character vector or a dotted-quad string scalar. The current IP address of the radio, CurrentIP, is replaced with new IP address, NewIP.

Note

If you change the subnet address of the radio, which is the third number in the IP address quad-dotted character vector, you must reconfigure the Ethernet port of your host computer with the same subnet address so that the host computer can communicate with the radio.

Data Types: char | string

Output Arguments

collapse all

New IP address of the USRP radio, returned as a character vector or string scalar.

Data Types: char | string

Status of the system command execution, returned as a nonnegative integer. A nonzero value indicates an error.

Tips

If you set a new IP address on a USRP radio, any saved radio configurations associated with that radio will no longer be valid. You can modify saved radio configurations or create a new one using the Radio Setup wizard.

Version History

Introduced in R2013a

expand all