nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Advertising Data Encoder

Function for encoding the advertising data and/or scan response data, and passing them to the stack. More...

Enumerations

enum  ble_advdata_name_type_t {
  BLE_ADVDATA_NO_NAME,
  BLE_ADVDATA_SHORT_NAME,
  BLE_ADVDATA_FULL_NAME
}
 Advertising data name type. This contains the options available for the device name inside the advertising data. More...
 

Functions

uint32_t ble_advdata_set (const ble_advdata_t *p_advdata, const ble_advdata_t *p_srdata)
 Function for encoding and setting the advertising data and/or scan response data. More...
 

Data Structures

struct  ble_advdata_uuid_list_t
 UUID list type. More...
 
struct  ble_advdata_conn_int_t
 Connection interval range structure. More...
 
struct  ble_advdata_manuf_data_t
 Manufacturer specific data structure. More...
 
struct  ble_advdata_service_data_t
 Service data structure. More...
 
struct  ble_advdata_t
 Advertising data structure. This contains all options and data needed for encoding and setting the advertising data. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
BLE_ADVDATA_NO_NAME 

Include no device name in advertising data.

BLE_ADVDATA_SHORT_NAME 

Include short device name in advertising data.

BLE_ADVDATA_FULL_NAME 

Include full device name in advertising data.

Function Documentation

uint32_t ble_advdata_set ( const ble_advdata_t p_advdata,
const ble_advdata_t p_srdata 
)

This function encodes advertising data and/or scan response data based on the selections in the supplied structures, and passes the encoded data to the stack.

Parameters
[in]p_advdataStructure for specifying the content of the advertising data. Set to NULL if advertising data is not to be set.
[in]p_srdataStructure for specifying the content of the scan response data. Set to NULL if scan response data is not to be set.
Returns
NRF_SUCCESS on success, NRF_ERROR_DATA_SIZE if not all the requested data could fit into the advertising packet. The maximum size of the advertisement packet is BLE_GAP_ADV_MAX_SIZE.