nrfxlib API 2.8.99
|
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.0, Vol 4, Part E, Section 7.8.63
The HCI_LE_Set_Periodic_Advertising_Enable 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 the advertising set corresponding to the Advertising_Handle parameter does not exist, the Controller shall return the error code Unknown Advertising Identifier (0x42).
If bit 0 of Enable is set to 1 (periodic advertising is enabled) and the advertising set contains partial periodic advertising data, the Controller shall return the error code Command Disallowed (0x0C).
If bit 0 of Enable is set to 1 and the Host has not issued the HCI_LE_Set_Periodic_Advertising_Parameters command for the advertising set, the Controller shall either use vendor-specified parameters or return the error code Command Disallowed (0x0C).
If bit 0 of Enable is set to 1 and the length of the periodic advertising data is greater than the maximum that the Controller can transmit within the chosen periodic advertising interval, the Controller shall return the error code Packet Too Long (0x45). If advertising on the LE Coded 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.
If bit 0 of Enable is set to 1 and the advertising set identified by the Advertising_Handle specified scannable, connectable, legacy, or anonymous advertising, the Controller shall return the error code Command Disallowed (0x0C). 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.
If bit 1 of Enable is set to 1 and the Controller does not support the Periodic Advertising ADI Support feature, the Controller shall return an error which should use the error code Unsupported Feature or Parameter Value (0x11).
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.
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.
[in] | p_params | Input parameters. |
0 | if success. |