Hi,
Where are scan requests sent? I'm trying to find the function that does this because I would like to disable it.
I only want to connect with a peripheral based strictly on its advertising data. I do not want any scan requests sent.
Thanks,
Mia
Hi,
Where are scan requests sent? I'm trying to find the function that does this because I would like to disable it.
I only want to connect with a peripheral based strictly on its advertising data. I do not want any scan requests sent.
Thanks,
Mia
A scanner that sends scan requests is called an active scanner.
ble_app_hrs_c, main.c:
static void scan_start(void)
{
...
m_scan_param.active = 0; // Setting "active" to 0, will disable scan requests.
m_scan_param.interval = SCAN_INTERVAL;
m_scan_param.window = SCAN_WINDOW;
...
}
It is defined the following way:
ble_gap.h
/**@brief GAP scanning parameters. */
typedef struct
{
...
uint8_t active : 1; /**< If 1, perform active scanning by sending scan requests.
This parameter is ignored when used with @ref sd_ble_gap_connect. */
...
} ble_gap_scan_params_t;Kristin,
That worked perfect. Thanks for the explanation!
-Mia