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

◆ ble_adv_data_short_name_find()

bool ble_adv_data_short_name_find ( const uint8_t * buf,
uint16_t len,
const char * name,
const uint8_t short_name_min_len )

#include <ble_adv_data.h>

Search encoded Advertising data for a device shortened name.

Parameters
[in]bufEncoded advertising data.
[in]lenBuffer length.
[in]nameName to search for.
[in]short_name_min_lenMinimum length of the shortened name.

If the shortened name in the Advertising data has the same length as the target name, this function will return false, since this means that the complete name is actually longer, thus different than the target name.

Return values
trueIf name was found among buf, as short local name.
falseIf name was not found among buf, or if buf or name was NULL.