1.1.2.1.1.4.49 BLE_GAP_SetExtAdvParams

C

uint16_t BLE_GAP_SetExtAdvParams(BLE_GAP_ExtAdvParams_T *p_extAdvParams, int8_t *p_selectedTxPower);

Description

Configure the extended advertising parameters.

Note

This API belongs to extended advertising feature. It will be disallowed if any one API belongs legacy advertising feature is issued before. Categories of advertising APIs and events for details of advertising APIs.

BLE_GAP_AdvInit and BLE_GAP_ExtAdvInit are required for this API.

Coding scheme is S=8 (S: Transmitted Symbols) in advertising PDU when coded phy is used. BLE_GAP_SetExtAdvCodingScheme is provided to change the coding scheme. The API is suggested to call after BLE_GAP_SetExtAdvParams API.

If legacy advertising PDU types are being used, and the advertising set already contains data, the type shall be one that supports advertising data and the amount of data shall not exceed 31 bytes.

If extended advertising PDU types are being used then:

  • The advertisement shall not be both connectable and scannable.

  • High duty cycle directed connectable advertising shall not be used (bit 3 = 0).

This API only accepts 2 configurations from 2nd advertising set:

  1. Event property is non-connectable and non-scannable: This advertising set will use Non-RPA automatically and change periodically. Default address timeout is 15 minutes if application never set local privacy by BLE_GAP_SetLocalPrivacy.

  2. Event property is connectable or scannable: peer address must in resolving list and local privacy must be enabled. This peer address should not use the same IRK with other advertising set. This advertising set will use RPA. It is recommened to clear and re-configure all advertising sets after calling BLE_GAP_SetLocalPrivacy or BLE_GAP_SetResolvingList.

Parameters

ParameterDescription
[in] p_extAdvParamsPointer to BLE_GAP_ExtAdvParams_T structure buffer.
[out] p_selectedTxPowerPoint to the real transmit power level. (Unit: dBm)

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully configure the extended advertising parameters.
MBA_RES_OOMInternal memory allocation failure.
MBA_RES_INVALID_PARAInvalid parameters.
MBA_RES_COMMAND_DISALLOWEDCommand disallowed.