EspressifApp / EspBlufiForAndroid

EspBlufi is based on the BLUFI protocol, which connect with IOT devices for BLE data communication, realizes device config network, and custom data transmission and reception. EspBlufi is developed and maintained by Espressif Corp.
Other
314 stars 122 forks source link

Not easy to reconnect to the same device after disconnect. #22

Open vancentvan opened 4 years ago

vancentvan commented 4 years ago

I have tried this demo on both MI 4LTE phone. On MI 4LTE, target device could be connected successfully via ble. While once connection was disconnected, reconnect was not easy as expected. You have to be lucky enough to get connected again after tapping on connect button many times.

WechatIMG14

After connection was disconnected, when tapping on connect button several times, BluetoothProfile.STATE_DISCONNECTED was returned accordingly. That resulted in more user interactions and not quite good if ble connect and wifi connection were combined in one consecutive process in a project.

Any piece of advice could be appreciated.

Manasmd commented 1 year ago

I am having a similar issue, any idea why? Does it have to do with the GATT_WRITE_TIMEOUT = 5000L ?