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

◆ sdc_hci_cmd_le_set_periodic_adv_enable()

uint8_t sdc_hci_cmd_le_set_periodic_adv_enable ( const sdc_hci_cmd_le_set_periodic_adv_enable_t * p_params)

#include <softdevice_controller/include/sdc_hci_cmd_le.h>

LE Set Periodic Advertising Enable.

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

This command is used to request the Controller to enable or disable the periodic advertising for the advertising set specified by the Advertising_Handle parameter (ordinary advertising is not affected).

If the advertising set is not currently enabled (see the HCI_LE_Set_Extended_Advertising_Enable command), the periodic advertising is not started until the advertising set is enabled. Once the advertising set has been enabled, the Controller shall continue periodic advertising until the Host issues an HCI_LE_Set_Periodic_Advertising_Enable command with bit 0 of Enable set to 0 (periodic advertising is disabled). Disabling the advertising set has no effect on the periodic advertising once the advertising set has been enabled.

The Controller manages the timing of advertisements in accordance with the advertising parameters given in the HCI_LE_Set_Periodic_Advertising_Parameters command.

If bit 0 of Enable is set to 0 and the Controller supports the Periodic Advertising ADI Support feature, then the Controller shall ignore bit 1.

Enabling periodic advertising when it is already enabled can cause the random address to change. Disabling periodic advertising when it is already disabled has no effect.

Errors:

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

Type   Condition                                                                     Error code
MC     Advertising_Handle does not identify an existing advertising set.             Unknown Ad
                                                                                     vertising
                                                                                     Identifier
                                                                                     (0x42)
MC     Bit 0 of Enable is set to 1 and the advertising set contains partial          Command
       periodic advertising data.                                                    Disallowed
                                                                                     (0x0C)
MC     Bit 0 of Enable is set to 1 and the Host has not issued the                   Command
       HCI_LE_Set_Periodic_Advertising_Parameters command for the advertising set.   Disallowed
       The Controller may use vendor-specific periodic advertising parameters        (0x0C)
       instead of reporting an error.
MC     Bit 0 of Enable is set to 1 and the length of the periodic advertising data   Packet Too
       is greater than the maximum that the Controller can transmit within the       Long
       specified periodic advertising interval. If advertising on the LE Coded       (0x45)
       PHY, the S=8 coding shall be assumed unless the current advertising
       parameters require the use of S=2 for an advertising physical channel, in
       which case the S=2 coding shall be assumed for that advertising physical
       channel.
MC     Bit 0 of Enable is set to 1 and Advertising_Handle identifies an              Command
       advertising set with scannable, connectable, legacy, or anonymous             Disallowed
       advertising.                                                                  (0x0C)
M      Bit 1 of Enable is set to 1 and the Controller does not support the           Unsupporte
       Periodic Advertising ADI Support feature.                                     d Feature
                                                                                     or
                                                                                     Parameter
                                                                                     Value
                                                                                     (0x11)

Event(s) generated (unless masked away):

When the HCI_LE_Set_Periodic_Advertising_Enable 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.