Skip to content

Commit c4a906c

Browse files
authored
Update BLEScanner.cpp
According to this post on the Nordic DevZone Forum (https://devzone.nordicsemi.com/f/nordic-q-a/14643/s130-permanent-advertising-scanning-during-operation), scanning automatically stops after receiving a BLE_GAP_EVT_TIMEOUT{BLE_GAP_TIMEOUT_SRC_SCAN} event. The _runnning [sic] flag should be set to false in this case.
1 parent 594a80a commit c4a906c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/Bluefruit52Lib/src/BLEScanner.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ void BLEScanner::_eventHandler(ble_evt_t* evt)
387387
case BLE_GAP_EVT_TIMEOUT:
388388
if (evt->evt.gap_evt.params.timeout.src == BLE_GAP_TIMEOUT_SRC_SCAN)
389389
{
390+
_runnning = false;
390391
if (_stop_cb) ada_callback(NULL, _stop_cb);
391392
}
392393
break;

0 commit comments

Comments
 (0)