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

◆ sdc_hci_cmd_le_set_periodic_adv_subevent_data()

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.3, Vol 4, Part E, Section 7.8.125

This 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.

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.

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.

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 discard the data.

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     Advertising_Handle identifies an advertising set that has not been            Command
       configured for Periodic Advertising with Responses.                           Disallowed
                                                                                     (0x0C)
MC     Subevent[i] is outside of the range of subevents requested using the          Command
       HCI_LE_Periodic_Advertising_Subevent_Data_Request event.                      Disallowed
                                                                                     (0x0C)
M      Two elements of Subevent specify the same subevent.                           Invalid
                                                                                     HCI
                                                                                     Command
                                                                                     Parameters
                                                                                     (0x12)
MC     The combined data length of Subevent is greater than the maximum that the     Packet Too
       Controller can transmit within the current subevent interval. If              Long
       advertising on the LE Coded PHY, then the S=8 coding shall be assumed         (0x45)
       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     The Subevent_Data cannot be transmitted because, for example, the subevent    Too Late
       where this data would have been sent has already passed.                      (0x46)
MC     The Subevent_Data cannot be transmitted because, for example, the subevent    Too Early
       where this data would have been sent is too early.                            (0x47)
M      No HCI_LE_Periodic_Advertising_Subevent_Data_Request event has been issued.   Command
                                                                                     Disallowed
                                                                                     (0x0C)
M      This command is sent twice for the same subevent of the same periodic         Command
       advertising event.                                                            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.

Parameters
[in]p_paramsInput parameters.
[out]p_returnExtra return 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.