Version 2 (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_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" connected="1"/> <switch number="2" connected="1"/> <switch number="3" connected="1"/> <switch number="4" connected="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" connected="1"/> <switch number="2" connected="1"/> <switch number="3" connected="1"/> <switch number="4" connected="1"/> </rf_switch> <rf_switch name="rfsw2.sb1.cosmos-lab.org" num_of_switches="4"> <switch number="1" connected="1"/> <switch number="2" connected="1"/> <switch number="3" connected="1"/> <switch number="4" connected="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>