Version 1 (modified by 5 years ago) ( diff ) | ,
---|
Table of Contents
Service: RF Switch
This service is used to configure the RF switch boxes attached to certain nodes in sb1.cosmos-lab.org and sb2.cosmos-lab.org allowing the experimenter to select how nodes and antennas are connected.
Usage
All the available methods are accessible from the a testbed console via an HTTP API located at am1.cosmos-lab.org:5054/rf_switch
. This API can be interacted with via a command line tool such as "curl" or any script using a "REST client" library.
Get the current configuration
This API call is used to get the current configuration of the RF front end(s) with respect to a node or list of nodes. The response will specify the parameters of the TX chain for the node(s) in question. It will show for a given node's rf_port
, what antenna
would be used if it were connected
, whether the power amplifier (power_amp
) is on or off, and the lower frequency (f_lower
) and upper frequency (f_upper
) of the filters.
HTTP API Path: am1.cosmos-lab.org:5054/rf_swtich/status
Parameters:
Name Decription Required Acceptable Input name Comma separated list of RF switch box FQDNs Y (list of RF switch boxes)
Example 1
HTTP Request:
am1.cosmos-lab.org:5054/rf_control/get_tx_path?node=sdr1-s1-lg1.bed.cosmos-lab.org
Response:
<response status="OK"> <nodes> <node name="sdr1-s1-lg1.bed.cosmos-lab.org"> <rf_port number="0" antenna="1" connected="true" power_amp="ON" f_lower="4900" f_upper="6200"/> <rf_port number="1" antenna="3" connected="true" power_amp="ON" f_lower="4900" f_upper="6200"/> <rf_port number="2" antenna="" connected="false"/> <rf_port number="3" antenna="" connected="false"/> </node> </nodes> </response>
In this example, node sdr1-s1-lg1.bed.cosmos-lab.org
has:
- TX of rf_port 0, connected to antenna 1, its power amplifier is on, and the filters are set to 4900-6200MHz
- TX of rf_port 1, connected to antenna 3, its power amplifier is on, and the filters are set to 4900-6200MHz
- TX of rf_port 2 is not connected to anything
- TX of rf_port 3 is not connected to anything
Example 2
HTTP Request:
am1.cosmos-lab.org:5054/rf_control/get_tx_path?node=sdr1-s1-lg1.bed.cosmos-lab.org,sdr2-s1-lg1.bed.cosmos-lab.org
Response:
<response status="OK"> <nodes> <node name="sdr1-s1-lg1.bed.cosmos-lab.org"> <rf_port number="0" antenna="1" connected="false" power_amp="OFF" f_lower="4900" f_upper="6200"/> <rf_port number="1" antenna="3" connected="false" power_amp="OFF" f_lower="4900" f_upper="6200"/> <rf_port number="2" antenna="" connected="false"/> <rf_port number="3" antenna="" connected="false"/> </node> <node name="sdr2-s1-lg1.bed.cosmos-lab.org"> <rf_port number="0" antenna="1" connected="true" power_amp="OFF" f_lower="4900" f_upper="6200"/> <rf_port number="1" antenna="3" connected="true" power_amp="OFF" f_lower="4900" f_upper="6200"/> </node> </nodes> </response>
Configure the RF switch
HTTP API Path: am1.cosmos-lab.org:5054/rf_control/set_tx_path
Parameters:
Name Decription Required Acceptable Input name Comma separated list of RF switch box FQDNs Y (list of RF switch boxes) switch Switch(es) to configure on the RF switch box Y 1, 2, 3, 4 port Port to select on RF switch Y 1, 2
Example 1
For sdr1-s1-lg1
in bed
testbed, connect TX RF ports 0 and 1 to their respective antennas, turn on the power amplifier, and request a frequency of 2.4-2.5 GHz.
HTTP Request:
am1.cosmos-lab.org:5054/rf_control/set_tx_path?node=sdr1-s1-lg1.bed.cosmos-lab.org&rf_port=0,1&power_amp=on&f_lower=2400&f_upper=2500
Response:
<response status="OK"> <message>OK</message> </response>