nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ sdc_hci_cmd_le_write_rf_path_compensation()

uint8_t sdc_hci_cmd_le_write_rf_path_compensation ( const sdc_hci_cmd_le_write_rf_path_compensation_t * p_params)

#include <softdevice_controller/include/sdc_hci_cmd_le.h>

LE Write RF Path Compensation.

The description below is extracted from Core_v6.0, Vol 4, Part E, Section 7.8.76

The HCI_LE_Write_RF_Path_Compensation command is used to indicate the RF path gain or loss between the RF transceiver and the antenna contributed by intermediate components. A positive value means a net RF path gain and a negative value means a net RF path loss. The RF_TX_Path_Compensation_Value parameter shall be used by the Controller to calculate the radiative Tx power level used in HCI commands, HCI events, Advertising physical channel PDUs, and Link Layer Control PDUs using the following equation:

Radiative Tx power level = Tx power level at RF transceiver output + RF_TX_Path_Compensation_Value

For example, if the Tx power level is +4 (dBm) at RF transceiver output and the RF_TX_Path_Compensation_Value is -1.5 (dB), the radiative Tx power level is +4+ (-1.5) = 2.5 (dBm).

The RF_RX_Path_Compensation_Value parameter shall be used by the Controller to calculate the RSSI value reported to the Host using the following equation:

Rx power level at RF transceiver input = Rx power level at antenna + RF_RX_Path_Compensation_Value

For example, if the Rx power level is -45 (dBm) at RF transceiver input and the RF_RX_Path_Compensation_Value is -3.2 (dB), the Rx power level at antenna is -41.8 (dBm).

The default values for the RF path compensation are vendor-specific.

This command can be issued at any time. If this command is issued during an ongoing over-the-air RF activity, the Controller may apply the Tx path compensation immediately or after a vendor-specific delay.

The Controller shall apply a change to the Tx path compensation value either by leaving the power at the transceiver output unchanged and altering the radiative Tx power level or by altering the power at the transceiver output to maintain any previously chosen radiative Tx power level.

If the Host needs to maintain a specific radiative transmit power level for an advertising set, it should disable that set before issuing this command then, after the command completes, reissue the HCI_LE_Set_Extended_Advertising_Parameters command for that set and then re-enable it.

Event(s) generated (unless masked away): When the HCI_LE_Write_RF_Path_Compensation command has completed, an HCI_Command_Complete event shall be generated.

If the command leads to a change in the local radiative transmit power level for an LE ACL connection, then the Controller shall generate an HCI_LE_Transmit_Power_Reporting event if local reporting is enabled and shall initiate a Link Layer Power Change Indication procedure (see [Vol 6] Part B, Section 5.1.18) if remote reporting is enabled.

Parameters
[in]p_paramsInput parameters.
Return values
0if success.
Returns
Returns value between 0x01-0xFF in case of error. See Vol 2, Part D, Error for a list of error codes and descriptions.