82670b96f8
This is a fix for missing scan responses after a first successfull scan. While running the BLE_scan.ino sketch with wantDuplicates=false, i got only one result with correct advertising and scan response length (31,26): pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks(), false); pBLEScan->start(scanTime, false); ... [W][BLEScan.cpp:109] handleGAPEvent(): bytes length: 31 + 26, addr type: 1 All following calls to start() just returned the advertising data without scan response data: pBLEScan->start(scanTime, false); [W][BLEScan.cpp:109] handleGAPEvent(): bytes length: 31 + 0, addr type: 1 With "wantDuplicates=true" i got: pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks(), true); pBLEScan->start(scanTime, false); [W][BLEScan.cpp:109] handleGAPEvent(): bytes length: 31 + 26, addr type: 1 [W][BLEScan.cpp:109] handleGAPEvent(): bytes length: 31 + 26, addr type: 1 [W][BLEScan.cpp:73] handleGAPEvent(): ESP_GAP_SEARCH_INQ_CMPL_EVT Devices found: 1 Scan done! pBLEScan->start(scanTime, false); [W][BLEScan.cpp:109] handleGAPEvent(): bytes length: 31 + 0, addr type: 1 [W][BLEScan.cpp:109] handleGAPEvent(): bytes length: 0 + 26, addr type: 1 [W][BLEScan.cpp:109] handleGAPEvent(): bytes length: 31 + 0, addr type: 1 [W][BLEScan.cpp:109] handleGAPEvent(): bytes length: 0 + 26, addr type: 1 Explicitly initializing m_scan_params.scan_duplicate of BLEScan solves this issue (In my case the un-initialized value was m_scan_params.scan_duplicate == 1073599044). Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com> |
||
---|---|---|
.github | ||
cores/esp32 | ||
docs | ||
libraries | ||
package | ||
tools | ||
variants | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
boards.txt | ||
CMakeLists.txt | ||
component.mk | ||
Kconfig.projbuild | ||
LICENSE.md | ||
Makefile.projbuild | ||
package.json | ||
platform.txt | ||
programmers.txt | ||
README.md |
Arduino core for the ESP32
Need help or have a question? Join the chat at
Contents
- Development Status
- Installation Instructions
- Decoding Exceptions
- Issue/Bug report template
- ESP32Dev Board PINMAP
Development Status
Installation Instructions
- Using Arduino IDE Boards Manager (preferred)
- Using Arduino IDE with the development repository
- Using PlatformIO
- Building with make
- Using as ESP-IDF component
- Using OTAWebUpdater
Decoding exceptions
You can use EspExceptionDecoder to get meaningful call trace.
Issue/Bug report template
Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as for reference.
Finally, if you are sure no one else had the issue, follow the ISSUE_TEMPLATE while reporting any issue.
ESP32Dev Board PINMAP
Tip
Sometimes to program ESP32 via serial you must keep GPIO0 LOW during the programming process