File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5_SDK13/source
targets/TARGET_NORDIC/TARGET_NRF5_SDK13 Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ ble_error_t nRF5xGap::connect(const Address_t peerAddr,
334
334
connParams.conn_sup_timeout = 600 ;
335
335
}
336
336
337
- ble_gap_scan_params_t scanParams;
337
+ ble_gap_scan_params_t scanParams ={ 0 } ;
338
338
339
339
#if (NRF_SD_BLE_API_VERSION <= 2)
340
340
/* Allocate the stack's whitelist statically */
@@ -363,6 +363,20 @@ ble_error_t nRF5xGap::connect(const Address_t peerAddr,
363
363
if (err != BLE_ERROR_NONE) {
364
364
return (ble_error_t )err;
365
365
}
366
+
367
+ scanParams.use_whitelist = (whitelistAddressesSize) ? 1 : 0 ;
368
+
369
+ if (addr.addr_type == ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE || addr.addr_type == ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE) {
370
+ /* If a device is using Resolvable Private Addresses Section 1.3.2.2 (Core spec v4.2 volume 6 part B),
371
+ it shall also have an Identity Address that is either a Public or Random Static address type.”
372
+ For connecting a static address must be provided by the application to the softdevice.
373
+ The softdevice will resolve the address and connect to the right device if present. */
374
+ addr.addr_id_peer = 1 ;
375
+ addr.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC;
376
+ } else {
377
+ addr.addr_id_peer = 0 ;
378
+ }
379
+
366
380
#endif
367
381
368
382
if (scanParamsIn != NULL ) {
Original file line number Diff line number Diff line change 42
42
#include "nrf_drv_common.h"
43
43
#include "lp_ticker_api.h"
44
44
45
+ #if defined(NRF52_ERRATA_20 )
46
+ #include "softdevice_handler.h"
47
+ #endif
45
48
46
49
//------------------------------------------------------------------------------
47
50
// Common stuff used also by lp_ticker and rtc_api (see "common_rtc.h").
You can’t perform that action at this time.
0 commit comments