1

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?

Gugu72
  • 2,052
  • 13
  • 35
user3523426
  • 836
  • 3
  • 11
  • 26

1 Answers1

1

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.

Emil
  • 16,784
  • 2
  • 41
  • 52