Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
st_ble_gap_adv_data_t Struct Reference

Advertising data/scan response data/periodic advertising data. More...

Data Fields

uint8_t adv_hdl
 Advertising handle identifying the advertising set to be set advertising data/scan response/periodic advertising data. More...
 
uint8_t data_type
 Data type. More...
 
uint16_t data_length
 The length of advertising data/scan response data/periodic advertising data (in bytes). More...
 
uint8_t * p_data
 Advertising data/scan response data/periodic advertising data. More...
 
uint8_t zero_length_flag
 Operation when the data_length field is 0. More...
 

Detailed Description

Advertising data/scan response data/periodic advertising data.

Field Documentation

◆ adv_hdl

uint8_t st_ble_gap_adv_data_t::adv_hdl

Advertising handle identifying the advertising set to be set advertising data/scan response/periodic advertising data.

Valid range is 0x00 - 0x03.

Note
If the "Balance" or "Compact" library is used, this field is ignored.

◆ data_type

uint8_t st_ble_gap_adv_data_t::data_type

Data type.

macro description
BLE_GAP_ADV_DATA_MODE (0x00) Advertising data.
BLE_GAP_SCAN_RSP_DATA_MODE(0x01) Scan response data.
BLE_GAP_PERD_ADV_DATA_MODE(0x02) Periodic advertising data.
Note
If the "Balance" or "Compact" library is used, BLE_GAP_PERD_ADV_DATA_MODE is not allowed.

◆ data_length

uint16_t st_ble_gap_adv_data_t::data_length

The length of advertising data/scan response data/periodic advertising data (in bytes).

In case of Legacy Advertising PDU, the length is 0 - 31 bytes.
In case of Extended Advertising PDU, the length is 0 - 1650 bytes.

Note that the length of the advertising data/scan response data in the BLE_MAX_NO_OF_ADV_SETS_SUPPORTED number of the advertising sets may not exceed the buffer size(4250 bytes) in Controller.

In case of periodic advertising data, the length is 0 - 1650 bytes.
Note that the length of the periodic advertising data in the BLE_MAX_NO_OF_ADV_SETS_SUPPORTED number of the advertising sets may not exceed the buffer size(4306 bytes) in Controller.

When this field is 0, the operations specified by the zero_length_flag is executed.

Note
If the "Balance" or "Compact" library is used, the length is 0 - 31 bytes.

◆ p_data

uint8_t* st_ble_gap_adv_data_t::p_data

Advertising data/scan response data/periodic advertising data.

When the data_length field is 0, this field is ignored.

◆ zero_length_flag

uint8_t st_ble_gap_adv_data_t::zero_length_flag

Operation when the data_length field is 0.

If the data_length is other than 0, this field is ignored.

macro description
BLE_GAP_DATA_0_CLEAR(0x01) Clear the advertising data/scan response data/periodic advertising data in the advertising set.
BLE_GAP_DATA_0_DID_UPD(0x02) Update Advertising DID without changing advertising data. If the data_type field is BLE_GAP_ADV_DATA_MODE, this value is allowed.
Note
If the "Balance" or "Compact" library is used, this field is ignored.