I use cordova-plugin-ble-central plugin for my Cordova application. It connects to an ESP32 board using BT. In case I use sequence:
1) ble.scan
2) ble.connect
It works fine. When I store device ID found during scan operation and used for connect function and I use it without prior scan, the connect function fails with error:
Could not find peripheral
In case I perform ble.scan and I connect using the stored ID from previous session, the connection is successful. Is there a way, how to connect without scanning the devices?
CodePudding user response:
No this can generally not be done reliably, at least not on Android. See the full explanation in my answer here https://stackoverflow.com/a/43482099.