nrfxlib API 0.1.0
|
uint8_t sdc_hci_cmd_vs_set_power_control_request_params | ( | const sdc_hci_cmd_vs_set_power_control_request_params_t * | p_params | ) |
#include <softdevice_controller/include/sdc_hci_vs.h>
Set LE Power Control Request procedure parameters.
This command sets the parameters used in LE Power Control Request procedure by the Link Layer.
beta parameter is used to determine the weight of the previous average of RSSI values. A higher value lowers how much the current RSSI weighs into the average, flattening peaks, which also means the controller reacts slower on RSSI changes. The average RSSI is calculated using an exponential weighted averaging in a 12-bit fixed point fraction. avg[n] = gamma * avg[n - 1] + (1 - gamma) * rssi[n] Here, gamma equals beta/4096, and rssi[n] equals the current RSSI. For example, for gamma to be 0.25, set the beta parameter in the command to 1024.
Average RSSI and lower_limit parameter are used to calculate APR value the controller sends in LL_POWER_CONTROL_RSP.
When auto_enable parameter is set, the controller will keep average RSSI within [lower_limit, upper_limit] bounds. When the average RSSI goes out of these bounds, the controller will autonomously send LL_POWER_CONTROL_REQ requesting to adjust the peer's TX power so average RSSI becomes either lower_target_rssi or upper_target_rssi. The controller will not send such requests more often than specified by wait_period_ms parameter. The wait_period_ms parameter is needed to not repeat send requests for transmit power change without the remote having had the chance to react, as well as to avoid a busy controller. This value should be set depending on needs.
When apr_enable parameter is set, the controller will adjust local TX power according to APR value received from the peer in LL_POWER_CONTROL_RSP and the apr_margin parameter.
When this command is issued, the controller stores the parameters and uses them for the subsequent LE Power Control Request procedures across all the connections.
After HCI Reset, all parameters are set to the default values.
Event(s) generated (unless masked away): When the command has completed, an HCI_Command_Complete event shall be generated.
[in] | p_params | Input parameters. |
0 | if success. |