nrfxlib API 3.3.99
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_v6.3, Vol 4, Part E, Section 7.8.55

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

Errors:

See Section 4.5.2 for a list of error types and descriptions.

Type   Condition                                                                     Error code
MC     The combined length of the data exceeds the capacity of the advertising set   Memory
       identified by Advertising_Handle (see Section 7.8.57) or the amount of        Capacity
       memory available. All the data shall be discarded.                            Exceeded
                                                                                     (0x07)
MC     The advertising set uses extended advertising and the combined length of      Packet Too
       the data is greater than the maximum that the Controller can transmit         Long
       within the longest possible auxiliary advertising segment consistent with     (0x45)
       the current parameters of the advertising set (using the current
       advertising interval if advertising is enabled). All the data shall be
       discarded.
MC     The advertising set is non-scannable and the command is used other than to    Invalid
       discard existing data.                                                        HCI
                                                                                     Command
                                                                                     Parameters
                                                                                     (0x12)
MC     The advertising set uses scannable legacy advertising PDUs and either         Invalid
       Operation is not 0x03 or Advertising_Data_Length exceeds 31 octets.           HCI
                                                                                     Command
                                                                                     Parameters
                                                                                     (0x12)
MC     Operation is not 0x03 and Scan_Response_Data_Length is zero.                  Invalid
                                                                                     HCI
                                                                                     Command
                                                                                     Parameters
                                                                                     (0x12)
MC     Operation is not 0x03 and the advertising set is enabled.                     Command
                                                                                     Disallowed
                                                                                     (0x0C)
MC     The advertising set uses scannable extended advertising PDUs, advertising     Command
       is enabled for the advertising set, and Scan_Response_Data_Length is zero.    Disallowed
       If advertising on the LE Coded PHY, the S=8 coding shall be assumed unless    (0x0C)
       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     Advertising_Handle does not identify an existing advertising set.             Unknown Ad
                                                                                     vertising
                                                                                     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.