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

◆ sdc_hci_cmd_le_set_random_address()

uint8_t sdc_hci_cmd_le_set_random_address ( const sdc_hci_cmd_le_set_random_address_t * p_params)

#include <softdevice_controller/include/sdc_hci_cmd_le.h>

LE Set Random Address.

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

The HCI_LE_Set_Random_Address command is used by the Host to set the LE Random Device Address in the Controller (see [Vol 6] Part B, Section 1.3).

If this command is used to change the address, the new random address shall take effect for advertising no later than the next successful HCI_LE_Set_Advertising_Enable command, for scanning no later than the next successful HCI_LE_Set_Scan_Enable command or HCI_LE_Set_Extended_Scan_Enable command, and for initiating no later than the next successful HCI_LE_Create_Connection command or HCI_LE_Extended_Create_Connection command.

Note: If the extended advertising commands are in use, this command only affects the address used for scanning and initiating. The addresses used for advertising are set by the HCI_LE_Set_Advertising_Set_Random_Address command (see Section 7.8.52).

If the Host issues this command when any of advertising (created using legacy advertising commands), scanning, or initiating are enabled, the Controller shall return the error code Command Disallowed (0x0C).

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

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.