![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
Library for handling the Bluetooth LE scanning. More...
Topics | |
| Filter types | |
| Scan configuration | |
| Scan configuration. | |
| Scan filters | |
| Scan filters. | |
Data Structures | |
| struct | ble_scan_filter_data |
| Scan filter data. More... | |
| struct | ble_scan_filter_match |
| Filter status. More... | |
| struct | ble_scan_evt |
| Scan library event. More... | |
| struct | ble_scan |
| Scan library instance. More... | |
Macros | |
| #define | BLE_SCAN_DEF(_name) |
| Macro for defining a ble_scan instance. | |
Typedefs | |
| typedef void(* | ble_scan_evt_handler_t) (const struct ble_scan_evt *scan_evt) |
| Bluetooth LE Scan event handler type. | |
Enumerations | |
| enum | ble_scan_evt_type { BLE_SCAN_EVT_FILTER_MATCH , BLE_SCAN_EVT_ALLOW_LIST_REQUEST , BLE_SCAN_EVT_ALLOW_LIST_ADV_REPORT , BLE_SCAN_EVT_NOT_FOUND , BLE_SCAN_EVT_SCAN_TIMEOUT , BLE_SCAN_EVT_CONNECTING_ERROR , BLE_SCAN_EVT_CONNECTED , BLE_SCAN_EVT_ERROR } |
| Scan events. More... | |
Functions | |
| bool | ble_scan_is_allow_list_used (const struct ble_scan *scan) |
| Check if the allow list is used. | |
| uint32_t | ble_scan_init (struct ble_scan *scan, struct ble_scan_config *config) |
| Initialize the library. | |
| uint32_t | ble_scan_start (const struct ble_scan *scan) |
| Start scanning. | |
| void | ble_scan_stop (const struct ble_scan *scan) |
| Stop scanning. | |
| uint32_t | ble_scan_filters_enable (struct ble_scan *scan, uint8_t mode, bool match_all) |
| Enable filtering. | |
| uint32_t | ble_scan_filters_disable (struct ble_scan *scan) |
| Disable filtering. | |
| uint32_t | ble_scan_filter_get (const struct ble_scan *scan, struct ble_scan_filters *status) |
| Get filter status. | |
| uint32_t | ble_scan_filter_add (struct ble_scan *scan, uint8_t type, const struct ble_scan_filter_data *data) |
| Add scan filter. | |
| uint32_t | ble_scan_all_filter_remove (struct ble_scan *scan) |
| Remove all filters. | |
| uint32_t | ble_scan_params_set (struct ble_scan *scan, const ble_gap_scan_params_t *scan_params) |
| Set the scanning parameters. | |
| void | ble_scan_on_ble_evt (const ble_evt_t *ble_evt, void *ble_scan) |
| Bluetooth LE event handler for the Scanning library. | |
| uint32_t | ble_scan_copy_addr_to_sd_gap_addr (ble_gap_addr_t *gap_addr, const uint8_t addr[BLE_GAP_ADDR_LEN]) |
| Convert the raw address to the SoftDevice GAP address. | |
Library for handling the Bluetooth LE scanning.
The Scan Library offers several criteria for filtering the devices available for connection. It can also be used without filtering. If an event handler is provided, the library generates an event on a filter match. An event is also raised if further configuration is required for use of allow list. The library can be configured to automatically connect to a device that matches the filter or a device from the allow list.