nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ sdc_hci_cmd_le_set_ext_scan_response_data()

uint8_t sdc_hci_cmd_le_set_ext_scan_response_data ( const sdc_hci_cmd_le_set_ext_scan_response_data_t p_params)

#include <softdevice_controller/include/sdc_hci_cmd_le.h>

LE Set Extended Scan Response Data.

The description below is extracted from Core_v5.4, Vol 4, Part E, Section 7.8.55

The HCI_LE_Set_Extended_Scan_Response_Data command is used to provide scan response data used in scanning response PDUs. This command may be issued at any time after the advertising set identified by the Advertising_Handle parameter has been created using the HCI_LE_Set_- Extended_Advertising_Parameters command (see Section 7.8.53) regardless of whether advertising in that set is enabled or disabled.

If advertising is currently enabled for the specified advertising set, the Controller shall use the new data in subsequent extended advertising events for this advertising set. If an extended advertising event is in progress when this command is issued, the Controller may use the old or new data for that event.

If advertising is currently disabled for the specified advertising set, the data shall be kept by the Controller and used once advertising is enabled for that set. The data shall be discarded when the advertising set is removed.

Only the significant part of the scan response data should be transmitted in the advertising packets as defined in [Vol 3] Part C, Section 11.

The Host may set the scan response data in one or more operations using the Operation parameter in the command. If the combined length of the data exceeds the capacity of the advertising set identified by the Advertising_Handle parameter (see Section 7.8.57 LE Read Maximum Advertising Data Length command) or the amount of memory currently available, all the data shall be discarded and the Controller shall return the error code Memory Capacity Exceeded (0x07).

If Operation indicates the start of new data (values 0x01 or 0x03), then any existing partial or complete scan response data shall be discarded.

If the scan response data is discarded by the command or the combined length of the data after the command completes is zero, the advertising set will have no scan response data. The Fragment_Preference parameter provides a hint to the Controller as to whether advertising data should be fragmented. If the advertising set is non-scannable and the Host uses this command other than to discard existing data, the Controller shall return the error code Invalid HCI Command Parameters (0x12). If the advertising set uses scannable leg- acy advertising PDUs and either Operation is not 0x03 or the Scan_- Response_Data_Length parameter exceeds 31 octets, the Controller shall return the error code Invalid HCI Command Parameters (0x12).

If Operation is not 0x03 and Scan_Response_Data_Length is zero, the Controller shall return the error code Invalid HCI Command Parameters (0x12).

If advertising is currently enabled for the specified advertising set and Operation does not have the value 0x03, the Controller shall return the error code Command Disallowed (0x0C).

If the advertising set uses extended advertising and the combined length of the data is greater than the maximum that the Controller can transmit within the longest possible auxiliary advertising segment consistent with the current parameters of the advertising set (using the current advertising interval if advertising is enabled), all the data shall be discarded and 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 the advertising set uses scannable extended advertising PDUs, advertising is currently enabled for the specified advertising set, and Scan_Response_- Data_Length is zero, the Controller shall return the error code Command Disallowed (0x0C).

If the advertising set corresponding to the Advertising_Handle parameter does not exist, then the Controller shall return the error code Unknown Advertising Identifier (0x42).

Event(s) generated (unless masked away): When the HCI_LE_Set_Extended_Scan_Response_Data 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.