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-in1.sb1.cosmos-lab.org | COSMOS Sandbox 1 | (see domain specific page) |
| rfsw1-in2.sb1.cosmos-lab.org | COSMOS Sandbox 1 | (see domain specific page) |
| 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 |
Please visit the individual sandbox specific pages in the wiki for detailed block diagrams of the possible RF connections that can be made.
All the available methods are accessible from the a testbed console via an HTTP API located at `am-rt1.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.
This API call is used to get the current configuration of the RF switch box(es). The response will specify the switch/port configurations of the RF switch box(es) in question.
HTTP API Path: `am-rt1.cosmos-lab.org:5054/rf_switch/status`
Parameters:
| = Name = | = Decription = | = Required = | = Acceptable Input = |
|---|---|---|---|
| name | Comma separated list of RF switch box FQDNs | Y | (list of RF switch boxes) |
HTTP Request:
am-rt1.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>
HTTP Request:
am-rt1.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>
HTTP API Path: `am-rt1.cosmos-lab.org:5054/rf_switch/set`
Parameters:
| = Name = | = Decription = | = Required = | = Acceptable Input = |
|---|---|---|---|
| name | Comma separated list of RF switch box FQDNs | Y | (list of RF switch boxes) |
| switch | Comma separated list of switch(es) to configure | Y | (list of switch numbers) |
| port | Port to select on RF switch | Y | 1, 2 |
For `rfsw1.sb1.cosmos-lab.org` and `rfsw2.sb1.cosmos-lab.org`, configure switches `2` and `3` to the second port.
HTTP Request:
am-rt1.cosmos-lab.org:5054/rf_switch/set?name=rfsw1.sb1.cosmos-lab.org,rfsw2.sb1.cosmos-lab.org&switch=2,3&port=2
Response:
<response status="OK">
<message>OK</message>
</response>