nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ bt_scan_filter_enable()

int bt_scan_filter_enable ( uint8_t  mode,
bool  match_all 
)

#include <include/bluetooth/scan.h>

Function for enabling filtering.

The filters can be combined with each other. For example, you can enable one filter or several filters. For example, (BT_SCAN_NAME_FILTER | BT_SCAN_UUID_FILTER) enables UUID and name filters.

Parameters
[in]modeFilter mode: Filter modes.
[in]match_allIf this flag is set, all types of enabled filters must be matched before generating BT_SCAN_EVT_FILTER_MATCH to the main application. Otherwise, it is enough to match one filter to trigger the filter match event.
Returns
0 If the operation was successful. Otherwise, a (negative) error code is returned.