Setup for Two Radios Connecting to One Host
To develop a transmitter and a receiver on the same computer, you need two supported radio hardware. For a list of supported hardware, see Hardware Support. In addition, your host must have two dedicated Ethernet connections with different MAC addresses, one for each radio hardware. To have simultaneous Internet access in the absence of a wireless connection, the host computer must have three Ethernet connections.
After the support package is installed, set up the two radio hardware using either a guided or manual setup.
The two radio hardware must be set up with different IP addresses.
The guided setup is recommended for Windows® operating systems.
Set up the first radio following the steps in Guided Host-Radio Hardware Setup. Note the assigned radio IP address in Configure Network Connection on the Host of the hardware setup process. The default value is 192.168.3.2.
Set up the second radio following the same steps. Configure it with a different IP address. In Configure Network Connection on the Host of the hardware setup process, update the second radio IP address with a different value. For example: 192.168.30.2.
Interacting with Two Radios
The internal IP address of each radio object, block, or System object™ interacting with a radio hardware must match the physical IP address assigned to the radio hardware during setup.
In these examples, the first radio hardware acts as a receiver and is assigned 192.168.3.2. The second radio acts as a transmitter and is assigned 192.168.30.2.
Run two instances of MATLAB® on the host: one for the receiver and one for the transmitter.
Create a radio object for interacting with the receiver and a radio object for interacting with the transmitter. In each object, update the
IPAddressproperty with the IP address of the radio hardware assigned during setup.
RxDevice = sdrdev('AD936x'); RxDevice.IPAddress = '192.168.3.2'; TxDevice = sdrdev('AD936x'); TxDevice.IPAddress = '192.168.30.2';
Create a block for interacting with the receiver and a block for interacting with the transmitter. In both blocks, update the corresponding block masks with the matching IP addresses.
Create a System object for interacting with the receiver and a System object for interacting with the transmitter. In each System object, set the corresponding IP addresses when you create the System objects.
rx = sdrrx('AD936x','IPAddress','192.168.3.2'); tx = sdrtx('AD936x','IPAddress','192.168.30.2');
Use this method for Linux® operating systems or when you cannot use the automated hardware setup process.
Set up the first radio, following the steps described in Manual Host-Radio Hardware Setup. Throughout the manual hardware setup, the radio hardware is configured with a default IP address: 192.168.3.2. Before setting up the second radio, you must update the default IP address assigned to the first radio.
Create a radio object for your board, and change the IP address of the board. For example:
RxDevice = sdrdev('AD936x'); RxDevice.IPAddress = '192.168.30.2';
The host network connection must be on the same subnet as the radio hardware. To meet this requirement, update the host network IP address as well. Follow the steps described in Step 3. Configure Host Computer, replacing the host network IP address with 192.168.30.
xis any number in the range 1 through 255, apart from 2.
Set up the second radio, following the steps described in Manual Host-Radio Hardware Setup. Leave the second radio with the default setting.
When operating the radios, make sure that the internal IP address of each radio object, block, or System object interacting with a radio hardware matches the physical IP address assigned to the radio during the manual hardware setup. See Interacting with Two Radios for details.