Version 3 (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.
RF Switch Boxes:
Name Location Connected Nodes/Devices rfsw1.sb1.cosmos-lab.org COSMOS Sandbox 1 rfdev3-1, rfdev3-2, rfdev3-5 rfsw2.sb1.cosmos-lab.org COSMOS Sandbox 1 rfdev3-2, rfdev3-4, rfdev3-6 rfsw-s1-lg1.sb2.cosmos-lab.org COSMOS Sandbox 2 sdr1-s1-lg1, sdr2-s1-lg1 rfsw-md1.sb2.cosmos-lab.org COSMOS Sandbox 2 sdr1-md1, sdr2-md1
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_switch/status?name=rfsw1.sb1.cosmos-lab.org
Response:
<response status="OK"> <rf_switch name="rfsw1.sb1.cosmos-lab.org" num_of_switches="4"> <switch number="1" port="1"/> <switch number="2" port="1"/> <switch number="3" port="1"/> <switch number="4" port="1"/> </rf_switch> </response>
Example 2
HTTP Request:
am1.cosmos-lab.org:5054/rf_switch/status?name=rfsw1.sb1.cosmos-lab.org&rfsw2.sb1.cosmos-lab.org
Response:
<response status="OK"> <rf_switch name="rfsw1.sb1.cosmos-lab.org" num_of_switches="4"> <switch number="1" port="1"/> <switch number="2" port="1"/> <switch number="3" port="1"/> <switch number="4" port="1"/> </rf_switch> <rf_switch name="rfsw2.sb1.cosmos-lab.org" num_of_switches="4"> <switch number="1" port="1"/> <switch number="2" port="1"/> <switch number="3" port="1"/> <switch number="4" port="1"/> </rf_switch> </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>