wiki:Resources/Services/RFControl

Version 1 (modified by jkol, 5 years ago) ( diff )

Service: RF Control

This service is used to configure the RF front ends of the nodes. The functionality follows the descriptions on the RF front end page (eg. setting the filters for one TX chain applies the setting to both TX chains of the node).

Usage

All the available methods are accessible from the a testbed console via an HTTP API located at am1.cosmos-lab.org:5054/rf_control. 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.

Path: am1.cosmos-lab.org:5054/rf_control/get-tx_path

Parameters:

Name Decription Required Acceptable Input
node Comma separated list of node FQDNs Y list of node names

Example 1

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="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>
  </nodes>
</response>

Example 2

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>

Turn off power amplifiers

This API call is simply a shorthand to easily turn off the power amplifiers for a given node. Keep in mind that power amplifier state is shared between nodes in the same physical location (eg. sdr1-md1.bed.cosmos-lab.org and sdr2-md1.bed.cosmos-lab.org).

Path: am1.cosmos-lab.org:5054/rf_control/power_amp_off

Parameters:

Name Decription Required Acceptable Input
node Comma separated list of node FQDNs Y list of node names

Example 1

Turn off the power amplifier for sdr1-s1-lg1.bed.cosmos-lab.org.

Request: am1.cosmos-lab.org:5054/rf_control/power_amp_off?node=sdr1-s1-lg1.bed.cosmos-lab.org

Response:

<response status="OK">
  <message>OK</message>
</response>

Configure the TX chain

am1.cosmos-lab.org:5054/rf_control/set_tx_path?node=<comma separated list of nodes>&power_amp≤on,off>&rf_port≤0,1>

Path: am1.cosmos-lab.org:5054/rf_control/power_amp_off

Parameters:

Name Decription Required Acceptable Input
node Comma separated list of node FQDNs Y list of node names

f_center and f_bandwidth: From (f_center - f_bandwidth/2) to (f_center + f_bandwidth/2)

f_upper and f_lower: From (f_lower) to (f_upper)

f_lower and bandwidth: From (f_lower) to (f_lower + bandwidth)

f_upper and bandwidth: From (f_upper - bandwidth) to (f_upper)

Example 1

Request: am1.cosmos-lab.org:5054/rf_control/set_tx_path?node=sdr1-s1-lg1.bed.cosmos-lab.org

Response:

<response status="OK">
  <message>OK</message>
</response>
Note: See TracWiki for help on using the wiki.