nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ ble_adv_data_parse()

uint8_t * ble_adv_data_parse ( const uint8_t * buf,
uint16_t len,
uint8_t ad_type )

#include <ble_adv_data.h>

Parse encoded Advertising or Scan Response data.

This function searches through encoded data or the data found in Advertising reports returns a pointer directly to the data within the data buffer.

Example code: ad_type_data = ble_adv_data_parse(&data, len, AD_TYPE);

Parameters
[in]bufEncoded advertising data.
[in]lenBuffer length.
[in]ad_typeType of data to search for.
Returns
A pointer to the data if found, or NULL if no data was found with the type ad_type, or if buf was NULL.