nrfxlib API 2.8.99
|
uint8_t sdc_hci_cmd_le_set_periodic_adv_subevent_data | ( | const sdc_hci_cmd_le_set_periodic_adv_subevent_data_t * | p_params, |
sdc_hci_cmd_le_set_periodic_adv_subevent_data_return_t * | p_return ) |
#include <softdevice_controller/include/sdc_hci_cmd_le.h>
LE Set Periodic Advertising Subevent Data.
The description below is extracted from Core_v6.0, Vol 4, Part E, Section 7.8.125
The HCI_LE_Set_Periodic_Advertising_Subevent_Data command is used by the Host to set the data for one or more subevents of PAwR in reply to an HCI_LE_Periodic_Advertising_Subevent_Data_Request event. The data for a subevent shall be transmitted only once.
When using more than one instance of this command to provide data, the Host may provide the data in any order. For example, if providing data for subevents 0 and 1 in separate commands, the first command can contain either subevent.
The Advertising_Handle parameter identifies the advertising set whose periodic advertising subevent data is being set. If the corresponding advertising set does not already exist, then the Controller shall return the error code Unknown Advertising Identifier (0x42). If the corresponding advertising set exists but has not been configured for Periodic Advertising with Responses, then the Controller shall return the error code Command Disallowed (0x0C).
The Num_Subevents_With_Data parameter is the number of subevent data contained in the parameter arrays.
The Subevent[i] parameter identifies the subevent of the PAwR that is being set. If the Host provides a subevent value that is outside of the range of subevents requested using the HCI_LE_Periodic_Advertising_Subevent_Data_Request event, then the Controller shall return the error code Command Disallowed (0x0C). If two elements of the array specify the same subevent, then the Controller shall return an error code which should be Invalid HCI Command Parameters (0x12).
The Response_Slot_Start[i] and Response_Slot_Count[i] parameters identify the starting response slot and the number of response slots that are expected to be used in this subevent. Note: If the Host does not expect any responses in a subevent, then it can set Response_Slot_Count[i] for that subevent to 0. If the Host expects one or more responses in a future subevent, then it can set Response_Slot_Start[i] and Response_Slot_Count[i] for that subevent appropriately either in the same command or a subsequent use of this command.
The Subevent_Data_Length[i] parameter determines the length of the Subevent_Data that is significant.
The Subevent_Data[i] parameter contains the advertising data to be transmitted in the subevent of the advertising set. If the combined data length is greater than the maximum that the Controller can transmit within the current subevent interval, then all data shall be discarded and the Controller shall return the error code Packet Too Long (0x45). If advertising on the LE Coded PHY, then 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 the Subevent_Data cannot be transmitted because, for example, the subevent where this data would have been sent has already passed or is too early, then the Controller shall return the error code Too Late (0x46) or Too Early (0x47) and discard the data.
If the Host sends this command without the Controller having issued an HCI_LE_Periodic_Advertising_Subevent_Data_Request event, or sends it twice for the same subevent of the same periodic advertising event, then the Controller shall return an error which should use the error code Command Disallowed (0x0C).
Event(s) generated (unless masked away): When the HCI_LE_Set_Periodic_Advertising_Subevent_Data command has completed, an HCI_Command_Complete event shall be generated.
[in] | p_params | Input parameters. |
[out] | p_return | Extra return parameters. |
0 | if success. |