Query and Set IP Addresses

Block Parameter IP Address

If the SDRu Transmitter block is connected to USRP®[1] hardware, the valid IP address appears in the USRP IP Address parameter in the block mask. You can also change the IP address.

  1. Open model with an SDRu Transmitter or SDRu Receiver block.

  2. To open the block mask, double-click the block.

  3. Type a dotted quad IP address in the combo box.

System Object Property IP Address

If the SDRu Receiver or Transmitter System object™ is connected to USRP® hardware, you can retrieve the valid IP address by querying the IPAddress property.

For example:

ans =

You can change the IP address using the same property.

radio.IPAddress = ''
radio = 

  struct with fields:

    IPAddress: ''

Set IP Address with Function setsdruip

The function setsdruip sets the IP address of the USRP® device at an IP address that you provide. The current IP address is replaced with the new IP address.

For example, set the IP address of the USRP® radio at IP address to with the following command:

setsdruip('', '');

[1] USRP, USRP2, UHD, and Ettus Research are trademarks of National Instruments Corp.