bt_le_set_scan_params()

Set up the desired scan interval when searching for device advertisements.

Synopsis:

#include <btapi/btle.h>
 
int bt_le_set_scan_params(uint16_t interval, uint16_t window, bt_le_advert_scan_type_t type)

Since:

BlackBerry 10.2.0

Arguments:

interval

The scan interval used when no connections exist. Range (N * 0.625 msec): 0x0004 to 0x4000

window

The scan window used during the scan. Range (N * 0.625 msec): 0x0004 to 0x4000

type

The scan type used when listening for advertisements. Default: Passive scan.

Library:

libbtapi (For the qcc command, use the -l btapi option to link against this library)

Description:

Returns:

EOK on successful registration of scan parameters, -1 if an error occurred with the errno value set. These are some of the error codes that can be returned:
  • EINVAL: The parameters provided are out of range.
  • ENOMEM: Sufficient memory is not available to perform the request.
  • ESRVRFAULT: An internal error has occurred.