The presence of a callback during the BLE scan prevents the creation of the devices vector.
The correct device must be selected and returned to the calling loop instead of relying on the vector containing all BLE devices.
I'll see if I can tweak the code but I'm a noob with Arduino stuff.
https://github.com/espressif/arduino-esp32/issues/4627#issuecomment-751400018
The presence of a callback during the BLE scan prevents the creation of the devices vector. The correct device must be selected and returned to the calling loop instead of relying on the vector containing all BLE devices. I'll see if I can tweak the code but I'm a noob with Arduino stuff.