主要内容

Setup for Two Radios Connecting to One Host

After the support package is installed, set up the two radio hardware by using the guided setup method.

Note

必须使用不同的无线电ID设置两个Adalm-Pluto无线电。

一个主机上两个收音机的指导设置

The guided setup is recommended for Windows®, Linux®, and OS X operating systems.

Note

When working with multiple radios, if devices are inserted or removed, the host computer assignment of USB addresses might change. Any time an SDR device is inserted or removed from a USB port, the host computer polls all USB ports and assigns or reassigns the radio addresses associated with connected devices.

USB address assignment for multiple radios

When operating on Windows keep these considerations in mind.

  • 当在单独的MATLAB中在同一主机上运行多个收音机时®sessions, for each MATLAB session the first radio is assignedusb:0,对于后续收音机,ID编号会增加一个。

  • Radios that are being used by one MATLAB are not seen by other MATLAB sessions. UsefindPlutoRadioand check the reported serial number to identify the radios seen in a particular MATLAB session.

To ensure that all assigned radio identities remain static, do not connect or disconnect radios after SDR objects have been created. The best practice is to connect radios and create SDR objects in this order:

  1. 清除所有SDR对象。

  2. Connect all radios.

  3. Check to confirm that the connected radios are recognized by running this command:

    findPlutoRadio

  4. 创建SDR对象。

To interface with the radio hardware, theRadioIDproperty of the radio object must match the radio ID of the radio hardware. Update theRadioIDproperty, if necessary.

When running multiple radios on the same host, the host assigns each radio a different radio ID. When identifying the radio by USB ID, the first radio is assignedusb:0,对于后续收音机,ID编号会增加一个。例如,要在同一主机计算机上连接的两个无线电分配ID,在MATLAB命令提示符处,请输入:

rx = sdrrx('Pluto','RadioID','usb:0'); tx = sdrtx('Pluto','RadioID','usb:1');

Interacting with Two Radios

The internal radio ID of each radio object, System object™, or block interacting with the radio hardware must match the radio ID assigned to the radio hardware during setup.

在这些示例中,分配了第一个电台,作为接收器usb:0. The second radio, acting as a transmitter, is assignedusb:1.

Tip

Run two instances of MATLAB on the host: one for the receiver and one for the transmitter.

When operating on Windows keep these considerations in mind.

  • 当在单独的MATLAB会话中在同一主机上运行多个收音机时,对于每个MATLAB会话,分配了第一个收音机usb:0,对于后续收音机,ID编号会增加一个。

  • Radios that are being used by one MATLAB are not seen by other MATLAB sessions. UsefindPlutoRadioand check the reported serial number to identify the radios seen in a particular MATLAB session.

Radio Objects

Create a radio object for interacting with the receiver, and a radio object for interacting with the transmitter. In both objects, update theRadioIDproperties with the assigned radio ID.

RxDevice = sdrdev('Pluto'); RxDevice.RadioID ='USB:0';
TxDevice = sdrdev('Pluto'); TxDevice.RadioID ='USB:1';

Radio System Objects

Create a System object for interacting with the receiver, and a System object for interacting with the transmitter. When you create both System objects, set the correspondingRadioIDproperty.

rx = sdrrx('Pluto',“ Radioid','USB:0'); tx = sdrtx('Pluto',“ Radioid','USB:1');

Radio Blocks

Create a block for interacting with the receiver, and a block for interacting with the transmitter. In both blocks, update the corresponding block with the matchingRadioIDparameter.

Set the radio ID for each connected radios.

相关话题