[[TOC(depth=3)]]
= Service: RF Control =
This service is used to configure the RF front ends of the nodes. The functionality follows the descriptions on the [wiki:hardware/rf-front-end 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:
{{{
}}}
==== 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:
{{{
}}}
=== 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:
{{{
OK
}}}
=== Configure the TX chain ===
am1.cosmos-lab.org:5054/rf_control/set_tx_path?node=&power_amp=&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:
{{{
OK
}}}