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

How can one ensure (wait for) characteristic subscription has been finished? #852

Open
4 tasks done
sskorokhodov opened this issue May 25, 2021 · 1 comment
Open
4 tasks done
Labels

Comments

@sskorokhodov
Copy link

sskorokhodov commented May 25, 2021

Hi guys,

Thank you very much for the brilliant RN component!

I'm trying to avoid a race condition when I subscribe to characteristic notifications. Right after, I write to another characteristic. Then I wait for notification about it from the first one as a result. I don't get the notification If the subscription is established after the write.

Right now, I haven't found any way to wait until the subscription has been established (i.e., the phone received a response from the peripheral about a successful subscription).

Also, I'm not sure that I've chosen the right approach. One solution could be to always send a notification with the current characteristic value when a subscription request is received by the peripheral. The phone can then proceed thereafter. But that requires changing the peripheral, which is not always possible.


  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm pretty sure that question is related to the library itself and not Bluetooth Low Energy or Classic in general.
@sutyum
Copy link

sutyum commented Apr 4, 2024

Did you find a solution?

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

No branches or pull requests

2 participants