Skip to content

Commit e29d2bf

Browse files
workaround the set interval bug in gap
1 parent 7063af6 commit e29d2bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

BLE_Privacy/source/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ class PrivacyCentral : public PrivacyDevice {
385385

386386
_ble.gap().setCentralPrivacyConfiguration(&privacy_configuration);
387387

388-
389388
start_scanning();
390389
}
391390

@@ -447,11 +446,11 @@ class PrivacyCentral : public PrivacyDevice {
447446
if (_bonded) {
448447
/* if we bonded it means we have found the other device, from now on
449448
* wait at each step until completion */
450-
_ble.gap().setScanTimeout(0);
449+
_ble.gap().setScanParams(4, 4, 0 /*timeout*/);
451450
} else {
452451
/* otherwise only scan for a limited time before changing roles again
453452
* if we fail to find the other device */
454-
_ble.gap().setScanTimeout(5);
453+
_ble.gap().setScanParams(4, 4, 4/*timeout*/);
455454
}
456455

457456
_is_connecting = false;

0 commit comments

Comments
 (0)