T-vK / ESP32-BLE-Mouse

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

how to reconnect the ble-mouse when device restarted? #37

Open jellybins opened 2 years ago

jellybins commented 2 years ago

when one device connected the ble-mouse successfully,if i restart the device,it can not reconnect again and can not find the ble-mouse by using any other device at the same time, except restart the ble-mouse,3q!

T-vK commented 2 years ago

Only one device can be connected to the mouse at a time. Did you make sure that you disconnected all other devices and that they didn't automatically reconnect?

jellybins commented 2 years ago

i see that only one device can be connected to the mouse at a time,but when i restart the one device(has connected the ble-mouse) it cannot reconnect again. and i tried to find the ble-mouse failed use any other devices at that time(to do this is just for confirm is the ble-mouse normal) .

jellybins commented 2 years ago

i resolve the problem by another way(when disconnect more than 5 times soft restart the dev board);and i saw the bleMouse.end() is an empty func do nothing.

ywz978020607 commented 2 years ago

But how to disconnect all devices in esp32? Is there any api i am missing?

ywz978020607 commented 2 years ago

i resolve the problem by another way(when disconnect more than 5 times soft restart the dev board);and i saw the bleMouse.end() is an empty func do nothing.

Wow, but how to soft restart? Could you show the code? soft restart will clear the device's info? When I restart the board, but the board will connect to PC automatically, but i want to disconnect by esp32 through pressing a button..

jellybins commented 2 years ago

i resolve the problem by another way(when disconnect more than 5 times soft restart the dev board);and i saw the bleMouse.end() is an empty func do nothing.

Wow, but how to soft restart? Could you show the code? soft restart will clear the device's info? When I restart the board, but the board will connect to PC automatically, but i want to disconnect by esp32 through pressing a button..

you should create a new issue,We're not talking about the same problem,and soft restart do not clear the info of device has connected。