This group includes scanning APIs.
Functions | |
at_ble_status_t | at_ble_scan_start (uint16_t interval, uint16_t window, uint16_t timeout, at_ble_scan_type_t type, at_ble_scan_mode_t mode, bool filter_whitelist, bool filter_dublicates) |
Start scan operation. More... | |
at_ble_status_t | at_ble_scan_stop (void) |
Stops an ongoing scan operation. More... | |
at_ble_status_t at_ble_scan_start | ( | uint16_t | interval, |
uint16_t | window, | ||
uint16_t | timeout, | ||
at_ble_scan_type_t | type, | ||
at_ble_scan_mode_t | mode, | ||
bool | filter_whitelist, | ||
bool | filter_dublicates | ||
) |
Start scan operation.
While the scan operation is ongoing, the application will always receive AT_BLE_SCAN_INFO event per found device.
In case of using AT_BLE_SCAN_GEN_DISCOVERY or AT_BLE_SCAN_LIM_DISCOVERY, also AT_BLE_SCAN_REPORT event will be received at the end of scan process or error occurred when trying to start scanning procedure
[in] | interval | Scan interval in 625us units, a value between AT_BLE_ADV_INTERVAL_MIN and AT_BLE_ADV_INTERVAL_MAX |
[in] | window | Scan window in 625us units, value between AT_BLE_SCAN_WINDOW_MIN and AT_BLE_SCAN_INTERVAL_MAX |
[in] | timeout | Scan time-out, between 0x0001 and 0x028F in scale of Seconds, 0x0000 disables time-out. |
[in] | type | Controls the type of scan to perform either Passive or Active at_ble_scan_type_t for more details. |
[in] | mode | Either General, Limited or Observer only, at_ble_scan_mode_t for more details |
[in] | filter_whitelist | If true, get scan results only from white-listed devices added by at_ble_whitelist_add otherwise scan results will be got from any advertising device. This filter should not be used with AT_BLE_ADV_GEN_DISCOVERABLE and AT_BLE_ADV_LIM_DISCOVERABLE modes ONLY. |
[in] | filter_dublicates | If true, scan event will be generated only once per device, if false multiple events will be issued |
Referenced by app_init(), ble_l2cap_disconnected(), and gap_dev_scan().
at_ble_status_t at_ble_scan_stop | ( | void | ) |
Stops an ongoing scan operation.
Referenced by ble_observer_custom_event(), ble_scan_info(), ble_scan_info_handler(), ble_scan_report_app_event(), pxp_monitor_scan_data_handler(), and pxp_monitor_start_scan().