Main Content

Query and Set IP Addresses

Block Parameter IP Address

If theSDRu TransmitterorSDRu Receiverblock is connected to the USRP™ device, the valid IP address appears in theIP addressparameter in the block mask. You can also change the IP address of the connected USRP device.

  1. Open model with anSDRu TransmitterorSDRu Receiverblock.

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

  3. Type a dotted quad IP address in theIP addressfield present under Radio Connection.

System Object Property IP Address

If the SDRu Receiver or Transmitter System object™ is connected to USRP device, you can retrieve the valid IP address by querying theIPAddressproperty.

For example:

radio.IPAddress
ans = 192.168.10.2

You can change the IP address of the connected USRP device by using the same property.

radio.IPAddress ='192.168.10.4'
radio = struct with fields: IPAddress: '192.168.10.4'

Set IP Address with setsdruip Function

The functionsetsdruipsets 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 192.168.30.22 to 192.168.30.20 with this command:

setsdruip('192.168.30.22', '192.168.30.20');

See Also

Functions

Related Topics