Closed JTerminator closed 6 months ago
After reading some more this seems to be a problem with the esp-idf or ESP32 hardware and RPA devices.
I also found this So I will have to use a workaround as the whitelist does not work with Android devices.
This issue can be closed.
Board
ESP32-6 Dev Module
Device Description
plain ESP32-C6-DevKitM-1
Version
other
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
80Mhz
PSRAM enabled
yes
Upload speed
921600
Description
This code first starts without a scanFilter, and any device can connect (for example with nRF Connect App). After the first connect the address of the peer device is added to the whitelist and advertising is restarted after setScanFilter(true, true). But no device can find the ESP in a new scan and it cannot reconnect. The expected behaviour would be, that the previously connected device can find and connect to the ESP.
I currently only have the ESP32-C6, so I cannot test it on a different ESP32(if somebody else could, it would be greatly appreciated). I read that the C6 has a maximum whitelist length of 15 instead of the 12 other ESPs have. Though when I use the esp_ble_gap_get_whitelist_size(uint16_t *length) I get a length of 12 on the first connect. And when I change the code to leave the scanFilters off, after the second connect, I get a whitelist length of 11.
Sketch
Debug Message
Debug Message (Level Verbose)
Other Steps to Reproduce
Upload to ESP -> Connect with nRF Connect -> Disconnect -> Scan
I have checked existing issues, online documentation and the Troubleshooting Guide