Changes between Version 1 and Version 2 of Resources/Services/RFControl
- Timestamp:
- Mar 7, 2020, 5:25:48 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Resources/Services/RFControl
v1 v2 3 3 = Service: RF Control = 4 4 5 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). 5 This service is used to configure the RF front ends of the nodes. The functionality follows the descriptions and details 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). 6 7 '''NOTE:''' Where node names are required, please use the fully qualified domain name (FQDN) of the node (eg. `sdr1-s1-lg1.bed.cosmos-lab.org`). 8 9 [[BR]] 6 10 7 11 == Usage == 8 12 9 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. 13 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. 14 15 [[BR]] 10 16 11 17 === Get the current configuration === 12 18 13 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.19 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. 14 20 15 Path: {{{am1.cosmos-lab.org:5054/rf_control/get-tx_path}}} 21 HTTP API Path: `am1.cosmos-lab.org:5054/rf_control/get-tx_path` 16 22 17 23 Parameters: 18 ||= Name =||= Decription =||= Required =||= Acceptable Input =|| 19 || node || Comma separated list of node FQDNs || Y || list of node names || 24 ||= '''Name''' =||= '''Decription''' =||= '''Required''' =||= '''Acceptable Input''' =|| 25 || node || Comma separated list of node FQDNs || Y || (list of nodes) || 26 27 [[BR]] 20 28 21 29 ==== Example 1 ==== 22 Request: 23 {{{am1.cosmos-lab.org:5054/rf_control/get_tx_path?node=sdr1-s1-lg1.bed.cosmos-lab.org}}} 30 HTTP Request: 31 {{{ 32 am1.cosmos-lab.org:5054/rf_control/get_tx_path?node=sdr1-s1-lg1.bed.cosmos-lab.org 33 }}} 24 34 25 26 35 Response: 36 {{{ 27 37 <response status="OK"> 28 38 <nodes> 29 39 <node name="sdr1-s1-lg1.bed.cosmos-lab.org"> 30 <rf_port number="0" antenna="1" connected=" false" power_amp="OFF" f_lower="4900" f_upper="6200"/>31 <rf_port number="1" antenna="3" connected=" false" power_amp="OFF" f_lower="4900" f_upper="6200"/>40 <rf_port number="0" antenna="1" connected="true" power_amp="ON" f_lower="4900" f_upper="6200"/> 41 <rf_port number="1" antenna="3" connected="true" power_amp="ON" f_lower="4900" f_upper="6200"/> 32 42 <rf_port number="2" antenna="" connected="false"/> 33 43 <rf_port number="3" antenna="" connected="false"/> … … 35 45 </nodes> 36 46 </response> 37 }}} 47 }}} 48 49 In this example, node `sdr1-s1-lg1.bed.cosmos-lab.org` has: 50 * TX of rf_port 0, connected to antenna 1, its power amplifier is on, and the filters are set to 4900-6200MHz 51 * TX of rf_port 1, connected to antenna 3, its power amplifier is on, and the filters are set to 4900-6200MHz 52 * TX of rf_port 2 is not connected to anything 53 * TX of rf_port 3 is not connected to anything 54 55 56 [[BR]] 38 57 39 58 ==== Example 2 ==== 40 59 41 Request: 42 {{{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}}} 60 HTTP Request: 61 {{{ 62 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 63 }}} 43 64 44 45 65 Response: 66 {{{ 46 67 <response status="OK"> 47 68 <nodes> … … 60 81 }}} 61 82 83 [[BR]] 84 62 85 === Turn off power amplifiers === 63 86 64 87 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). 65 88 66 Path: {{{am1.cosmos-lab.org:5054/rf_control/power_amp_off}}} 89 HTTP API Path: `am1.cosmos-lab.org:5054/rf_control/power_amp_off` 67 90 68 91 Parameters: 69 ||= Name =||= Decription =||= Required =||= Acceptable Input=||92 ||= '''Name''' =||= '''Decription''' =||= '''Required''' =||= '''Acceptable Input''' =|| 70 93 || node || Comma separated list of node FQDNs || Y || list of node names || 71 94 72 ==== Example 1 ==== 73 Turn off the power amplifier for {{{sdr1-s1-lg1.bed.cosmos-lab.org}}}. 74 75 Request: 76 {{{am1.cosmos-lab.org:5054/rf_control/power_amp_off?node=sdr1-s1-lg1.bed.cosmos-lab.org}}} 77 78 Response: 79 {{{ 80 <response status="OK"> 81 <message>OK</message> 82 </response> 83 }}} 84 85 86 === Configure the TX chain === 87 am1.cosmos-lab.org:5054/rf_control/set_tx_path?node=<comma separated list of nodes>&power_amp=<on,off>&rf_port=<0,1> 88 89 Path: {{{am1.cosmos-lab.org:5054/rf_control/power_amp_off}}} 90 91 Parameters: 92 ||= Name =||= Decription =||= Required =||= Acceptable Input =|| 93 || node || Comma separated list of node FQDNs || Y || list of node names || 94 95 f_center and f_bandwidth: From (f_center - f_bandwidth/2) to (f_center + f_bandwidth/2) 96 97 f_upper and f_lower: From (f_lower) to (f_upper) 98 99 f_lower and bandwidth: From (f_lower) to (f_lower + bandwidth) 100 101 f_upper and bandwidth: From (f_upper - bandwidth) to (f_upper) 102 95 [[BR]] 103 96 104 97 ==== Example 1 ==== 105 Request: 106 {{{am1.cosmos-lab.org:5054/rf_control/set_tx_path?node=sdr1-s1-lg1.bed.cosmos-lab.org}}} 98 99 Turn off the power amplifier for `sdr1-s1-lg1.bed.cosmos-lab.org`. 100 101 HTTP Request: 102 {{{ 103 am1.cosmos-lab.org:5054/rf_control/power_amp_off?node=sdr1-s1-lg1.bed.cosmos-lab.org 104 }}} 107 105 108 106 Response: … … 112 110 </response> 113 111 }}} 112 113 [[BR]] 114 115 === Configure the TX chain === 116 117 HTTP API Path: `am1.cosmos-lab.org:5054/rf_control/set_tx_path` 118 119 Parameters: 120 ||= '''Name''' =||= '''Decription''' =||= '''Required''' =||= '''Acceptable Input''' =|| 121 || node || Comma separated list of node FQDNs || Y || (list of node names) || 122 || rf_port || Node RF port to configure || Y || 0, 1 || 123 || power_amp || Power amplifier state || N || on, off || 124 || f_center || Center frequency of range requested || * || (frequency in MHz) || 125 || f_bandwidth || Bandwidth of frequency range requested || * || (frequency in MHz) || 126 || f_lower || Lower end of frequency range requested || * || (frequency in MHz) || 127 || f_upper || Upper end of frequency range requested || * || (frequency in MHz) || 128 129 '''*''' The filter frequency selection parameters are not required if all are committed. However, to select a frequency range, at least two are required using the following format. 130 131 ||= '''1st Parameter''' =||= '''2nd Parameter''' =||= '''Effective frequency range''' =|| 132 || f_center || f_bandwidth || (f_center - f_bandwidth/2) to (f_center + f_bandwidth/2) || 133 || f_upper || f_lower || (f_lower) to (f_upper) || 134 || f_lower || f_bandwidth || (f_lower) to (f_lower + bandwidth) || 135 || f_upper || f_bandwidth || (f_upper - bandwidth) to (f_upper) || 136 137 [[BR]] 138 139 ==== Example 1 ==== 140 141 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. 142 143 HTTP Request: 144 {{{ 145 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 146 }}} 147 148 Response: 149 {{{ 150 <response status="OK"> 151 <message>OK</message> 152 </response> 153 }}}