Controllers auto reconnect after Bluetooth keys are forgotten
I am using ## [1.5.2] - 2023-02-04 - Bluepad32 v3.6.0 with "esp-idf-arduino-bluepad32-template". I have an ESP32-WROOM-32.
I am using Ps4 and Xbox One controller. When I have one of the controllers connected to ESP32 and forget the Bluetooth keys, the controller stays connected. When I forget the Bluetooth keys and restart the esp32, the controller reconnects automatically once the ESP32 powers up. This is all while enableNewBluetoothConnections is set to false. I believe that once the controller is forgotten on ESP32, the controller should need go through the full first-time pairing process. Read below for the situation and more details.
This issue was sparked by my comment in Discord: "I have noticed that the controllers save the device they are last connected to. This is fine. But when I use the BP32.forgetBluetoothKeys() function, the keys get cleared from ESP32 but the controller still reconnects to the ESP32. I have BP32.enableNewBluetoothConnections(false) set. Why do the controllers auto reconnect even though I have cleared the Bluetooth keys and have new Bluetooth connections set to false? What does clearing the Bluetooth keys do? Note: If I pair the controller to my phone, forget the controller from my phone, then I must enable new Bluetooth connections on ESP32 before it will pair. I also need to set up the controller as if I was connecting to the ESP32 for the first time (hold Share + PS button on DS4 or hold the top button on Xbox One controller)."
Thanks for the help!