pub unsafe extern "C" fn bt_le_scan_start(
param: *const bt_le_scan_param,
cb: Option<unsafe extern "C" fn(_: *const bt_addr_le_t, _: i8, _: u8, _: *mut net_buf_simple)>,
) -> i32
Expand description
@brief Start (LE) scanning
Start LE scanning with given parameters and provide results through the specified callback.
@note The LE scanner by default does not use the Identity Address of the local device when @kconfig{CONFIG_BT_PRIVACY} is disabled. This is to prevent the active scanner from disclosing the identity information when requesting additional information from advertisers. In order to enable directed advertiser reports then @kconfig{CONFIG_BT_SCAN_WITH_IDENTITY} must be enabled.
@note Setting the param.timeout
parameter is not supported when
@kconfig{CONFIG_BT_PRIVACY} is enabled, when the param.type is @ref
BT_LE_SCAN_TYPE_ACTIVE. Supplying a non-zero timeout will result in an
-EINVAL error code.
@param param Scan parameters. @param cb Callback to notify scan results. May be NULL if callback registration through @ref bt_le_scan_cb_register is preferred.
@return Zero on success or error code otherwise, positive in case of protocol error or negative (POSIX) in case of stack internal error. @retval -EBUSY if the scanner is already being started in a different thread.