PebbleOS
Loading...
Searching...
No Matches
Functions

LE scanning. More...

Functions

bool pbl_bt_start_le_scan (bool active_scan, bool use_white_list_filter, bool filter_dups, uint16_t scan_interval_ms, uint16_t scan_window_ms)
 Start scanning.
 
bool pbl_bt_stop_le_scan (void)
 Stop scanning.
 
void pbl_bt_cb_le_scan_handle_report (const GAPLERawAdReport *data, int length)
 Called for each advertising report received while scanning.
 

Detailed Description

LE scanning.

Not implemented by the NimBLE backend: both calls succeed without scanning and no report is delivered.

// Active scan, duplicates filtered, 50% duty cycle.
if (pbl_bt_start_le_scan(true, false, true, 100, 50)) {
// Reports arrive through pbl_bt_cb_le_scan_handle_report().
}
// ...
bool pbl_bt_start_le_scan(bool active_scan, bool use_white_list_filter, bool filter_dups, uint16_t scan_interval_ms, uint16_t scan_window_ms)
Start scanning.
bool pbl_bt_stop_le_scan(void)
Stop scanning.

Function Documentation

◆ pbl_bt_cb_le_scan_handle_report()

void pbl_bt_cb_le_scan_handle_report ( const GAPLERawAdReport *  data,
int  length 
)
extern

Called for each advertising report received while scanning.

Parameters
dataThe report, followed by its advertising and scan response data.
lengthTotal length of data in bytes.

◆ pbl_bt_start_le_scan()

bool pbl_bt_start_le_scan ( bool  active_scan,
bool  use_white_list_filter,
bool  filter_dups,
uint16_t  scan_interval_ms,
uint16_t  scan_window_ms 
)

Start scanning.

Parameters
active_scantrue to send scan requests, false for a passive scan.
use_white_list_filtertrue to only report devices in the filter accept list.
filter_dupstrue to filter out duplicate reports.
scan_interval_msScan interval in milliseconds.
scan_window_msScan window in milliseconds, at most scan_interval_ms.
Returns
true on success.

◆ pbl_bt_stop_le_scan()

bool pbl_bt_stop_le_scan ( void  )

Stop scanning.

Returns
true on success.