Skip to content

Commit

Permalink
#58 Receive "scan_evt timeout" on serial monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
redakker committed Nov 20, 2023
1 parent fc91234 commit 0822cd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/bluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ void BlueTooth::loop() {
if (millis() - lastRun > (BT_DEFAULT_SCAN_DURATION_IN_SECONDS * 1000) + 2000) {
// Otherwise makes no sens to scan and sent it over
if (networkConnected) {
BLEScanResults foundDevices = pBLEScan->start(BT_DEFAULT_SCAN_DURATION_IN_SECONDS, false);
// Clear result is before the scan, because there is an assumption that the clear result makes an issue right after the scan
// Details: - https://github.com/redakker/blecker/issues/58
// - https://github.com/espressif/arduino-esp32/issues/5860
//
pBLEScan->clearResults(); // delete results fromBLEScan buffer to release memory

BLEScanResults foundDevices = pBLEScan->start(BT_DEFAULT_SCAN_DURATION_IN_SECONDS, false);
lastRun = millis();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/webcontent.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ BLEcker
<a class="button w100" href="/">home</a>
<a class="button w100" href="/update">update</a>
<!--<a class="button w100 button-danger" id="reset" href="#">reset</a>-->
<div class="version" id="version">v1.11 - 159</div>
<div class="version" id="version">v1.11 - 160</div>
<div class="version" id="chip"></div>
<div id="footer">
<div><a href="https://github.com/redakker/blecker" target="_blank">blecker</a></div>
Expand Down Expand Up @@ -1564,7 +1564,7 @@ BLEcker
<a class="button w100" href="/">home</a>
<a class="button w100" href="/update">update</a>
<!--<a class="button w100 button-danger" id="reset" href="#">reset</a>-->
<div class="version" id="version">v1.11 - 159</div>
<div class="version" id="version">v1.11 - 160</div>
<div id="footer">
<div><a href="https://github.com/redakker/blecker" target="_blank">blecker</a></div>
</div>
Expand Down

0 comments on commit 0822cd1

Please sign in to comment.