Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vancentvan opened this issue Aug 17, 2020 · 1 comment
Open

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

vancentvan opened this issue Aug 17, 2020 · 1 comment

Comments

@vancentvan
Copy link

vancentvan commented Aug 17, 2020

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.

@vancentvan vancentvan reopened this Aug 19, 2020
@vancentvan vancentvan changed the title Ble connect failed on some phones, while succeed on some others. Not easy to reconnect to the same device after disconnect. Not easy to reconnect to the same device after disconnect. Aug 19, 2020
@Manasmd
Copy link

Manasmd commented Oct 28, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants