T-vK / ESP32-BLE-Mouse

Bluetooth LE Mouse library for the ESP32 (Arduino IDE compatible)
724 stars 139 forks source link

Connection fail after IOS restore #25

Open hkg4788 opened 3 years ago

hkg4788 commented 3 years ago

Not sure this is BLE mouse library issue. Seem like ESP32 core bug.

I am using same ESP32 board with 3 three IOS device with no problem. After I restore IOS device A, ESP32 cannot connect anymore. However, device B and C still working.

Then, I use "pio run --target erase" the clear the ESP32 and re-upload the program. Device A start working again.

Seem like ESP32 core library cannot register new key (this key change after IOS restore), if the device address have registered already.

Any though on how to solve this issue? How can I clear the registered bond data OR limit the max bond device to 1 (auto de-bond every time).

T-vK commented 3 years ago

The BLE code really is mostly copy pasted from examples I found on the Internet. I've never really looked into the details of how it all works, so I don't really know how to address this issue. It is possible that this happens because of a bug in the HID libraries.