Main Content

setsdruip

Set IP address for USRP radio

Add-On Required: This feature requires the Communications Toolbox Support Package for USRP Radio add-on.

Description

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

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 for a USRP radio at IP address 192.168.10.2 to 192.168.10.7.

info = setsdruip('192.168.10.2','192.168.10.7')
Checking radio connections...
info = 
    'Creating USRP device from address: addr=192.168.10.2
     [INFO] [UHD] Win32; Microsoft Visual C++ version 1936; Boost_108100; UHD_4.2.0.0-vendor
     [INFO] [USRP2] Opening a USRP2/N-Series device...
     [INFO] [USRP2] Current recv frame size: 1472 bytes
     [INFO] [USRP2] Current send frame size: 1472 bytes
     
     Fetching current settings from EEPROM...
         EEPROM ["ip-addr"] is "192.168.10.2"
     
     Setting EEPROM ["ip-addr"] to "192.168.10.7"...
     Power-cycle the USRP device for the changes to take effect.
     
     Done
     '

Input Arguments

collapse all

Current IP address of a USRP N2xx 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 N2xx 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.

Version History

Introduced in R2013a

expand all

See Also

Functions

Objects

Blocks