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

Auto Reconnect? #10

Open
krdarrah opened this issue Feb 2, 2020 · 0 comments
Open

Auto Reconnect? #10

krdarrah opened this issue Feb 2, 2020 · 0 comments

Comments

@krdarrah
Copy link

krdarrah commented Feb 2, 2020

Great library, but been trying to get a reconnect project working. Occasionally, my device will disconnect, so I'd like it to just reconnect as soon as possible. On the Chrome BLE sample projects, they do have an example, and that does work... only problem is that the service and characteristics need to be retrieved again? And how can you do this without relaunching the scanner window?
https://googlechrome.github.io/samples/web-bluetooth/automatic-reconnect.html

So upon a successful reconnect, I tried to start notifications on a characteristic, but get an error:
p5.ble.js:11166 Uncaught (in promise) DOMException: Characteristic with UUID c97f391f-a6c4-4778-afac-05f797bbdc5f is no longer valid. Remember to retrieve the characteristic again after reconnecting.

Any ideas how this can work? Thanks!

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

1 participant