nrfxlib API 0.1.0
|
uint8_t sdc_hci_cmd_le_set_periodic_adv_params | ( | const sdc_hci_cmd_le_set_periodic_adv_params_t * | p_params | ) |
#include <softdevice_controller/include/sdc_hci_cmd_le.h>
LE Set Periodic Advertising Parameters [v1].
The description below is extracted from Core_v5.4, Vol 4, Part E, Section 7.8.61
The HCI_LE_Set_Periodic_Advertising_Parameters command is used by the Host to set the parameters for periodic advertising.
The Advertising_Handle parameter identifies the advertising set whose periodic advertising parameters are being configured. If the corresponding advertising set does not already exist, then the Controller shall return the error code Unknown Advertising Identifier (0x42).
The Periodic_Advertising_Interval_Min parameter shall be less than or equal to the Periodic_Advertising_Interval_Max parameter. The Periodic_Advertising_- Interval_Min and Periodic_Advertising_Interval_Max parameters should not be the same value to enable the Controller to determine the best advertising interval given other activities.
If the periodic advertising interval range provided by the Host (Periodic_Advertising_Interval_Min, Periodic_Advertising_Interval_Max) does not overlap with the periodic advertising interval range supported by the Controller, then the Controller shall return an error which should use the error code Unsupported Feature or Parameter Value (0x11).
The Periodic_Advertising_Properties parameter indicates which fields should be included in the advertising packet.
The Num_Subevents parameter identifies the number of subevents that shall be transmitted for each periodic advertising event. If the Num_Subevents parameter value is 0x00, then the Subevent_Interval, Response_Slot_Delay, Response_Slot_Spacing, and Num_Response_Slots parameters shall be ignored.
The Subevent_Interval parameter identifies the time between the subevents of PAwR. The Subevent_Interval shall be less than or equal to the Periodic_Advertising_Interval_Min divided by the Num_Subevents of the advertising set.
The Response_Slot_Delay parameter identifies the time between the start of the advertising packet at the start of a subevent and the start of the first response slot. The Response_Slot_Delay shall be less than the Subevent_Interval.
The Response_Slot_Spacing parameter identifies the time between the start of two consecutive response slots. The Response_Slot_Spacing shall be less than or equal to 10 × (Subevent_Interval - Response_Slot_Delay) / Num_Response_Slots. If the Num_Response_Slots parameter is set to 1, then the Controller shall ignore the Response_Slot_Spacing parameter.
The Num_Response_Slots parameter identifies the number of response slots in a subevent. If the Num_Response_Slots parameter value is 0x00, then the Response_Slot_Delay and Response_Slot_Spacing parameters shall be ignored.
If the advertising set identified by the Advertising_Handle specified scannable, connectable, legacy, or anonymous advertising, the Controller shall return the error code Invalid HCI Command Parameters (0x12).
If the Host issues this command when periodic advertising is enabled for the specified advertising set, the Controller shall return the error code Command Disallowed (0x0C).
If the Advertising_Handle does not identify an advertising set that is already configured for periodic advertising and the Controller is unable to support more periodic advertising at present, the Controller shall return the error code Memory Capacity Exceeded (0x07).
If the advertising set already contains periodic advertising data and the length of the data is greater than the maximum that the Controller can transmit within a periodic advertising interval of Periodic_Advertising_Interval_Max, 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.
Event(s) generated (unless masked away): When the HCI_LE_Set_Periodic_Advertising_Parameters command has completed, an HCI_Command_Complete event shall be generated.
[in] | p_params | Input parameters. |
0 | if success. |