nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ sdc_hci_cmd_le_set_path_loss_reporting_params()

uint8_t sdc_hci_cmd_le_set_path_loss_reporting_params ( const sdc_hci_cmd_le_set_path_loss_reporting_params_t * p_params,
sdc_hci_cmd_le_set_path_loss_reporting_params_return_t * p_return )

#include <softdevice_controller/include/sdc_hci_cmd_le.h>

LE Set Path Loss Reporting Parameters.

The description below is extracted from Core_v6.3, Vol 4, Part E, Section 7.8.119

This command is used to set the path loss threshold reporting parameters for the ACL connection identified by the Connection_Handle parameter.

The path loss threshold-based mechanism is described in [Vol 6] Part B, Section 4.5.16. For each zone boundary, the upwards boundary shall equal the threshold plus the hysteresis and the downwards boundary shall equal the threshold minus the hysteresis.

The Min_Time_Spent parameter indicates the minimum time that the Controller shall observe the path loss has crossed the threshold before the Controller generates an event for the threshold crossing. The Host should specify a suitable value based on the connection interval, subrate factor, and Peripheral latency.

If the Host issues this command when path loss monitoring is enabled, the Controller shall override the existing path loss threshold reporting parameters with the parameters provided in this command.

The High_Threshold and the Low_Threshold parameters are common to all PHYs supported by the Controller. However, the Host can reissue this command with suitable parameters whenever a PHY switch is detected.

Errors:

See Section 4.5.2 for a list of error types and descriptions.

Type   Condition                                                    Error code
MC     High_Threshold + High_Hysteresis is greater than 0xFF.       Invalid HCI Command
                                                                    Parameters (0x12)
MC     Low_Threshold is less than Low_Hysteresis.                   Invalid HCI Command
                                                                    Parameters (0x12)
MC     Low_Threshold is greater than High_Threshold.                Invalid HCI Command
                                                                    Parameters (0x12)
MC     Low_Threshold + Low_Hysteresis is greater than               Invalid HCI Command
       High_Threshold – High_Hysteresis.                            Parameters (0x12)
MC     Connection_Handle does not identify a current ACL.           Unknown Connection
                                                                    Identifier (0x02)

Event(s) generated (unless masked away):

When the HCI_LE_Set_Path_Loss_Reporting_Parameters command has completed, an HCI_Command_Complete event shall be generated.

If the Host issues this command when path loss monitoring is enabled, and if the new parameters mean that the path loss is now in a different zone, an HCI_LE_Path_Loss_Threshold event shall be generated as soon as possible irrespective of the Min_Time_Spent parameter and the timer shall be reset.

If the Host issues this command with High_Threshold parameter set to 0xFF, then the Controller shall not generate an HCI_LE_Path_Loss_Threshold event with Zone_Entered set to 0x02.

Parameters
[in]p_paramsInput parameters.
[out]p_returnExtra return 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.