Should I also stop reading characteristic when disconnecting? #796
Replies: 2 comments 2 replies
-
@alessandrofrancesconi have you found an answer? |
Beta Was this translation helpful? Give feedback.
-
Ok version 2 of my answer...
first understand what your doing by calling I dug into my ble device firmware and noticed that the notification sub is volatile unless the device is bonded. So expect that if not bonded it doesn't matter what you choose to do upon disconnecting as notifications will always be disabled.
You can only ask yourself if you must stop, and if you decide you must stop then you must do it before disconnecting (or after reconnecting in the case of a bonded device) Also see |
Beta Was this translation helpful? Give feedback.
-
I'm using Plugin.BLE 3.0.0
When connecting to a known device, I also start listening to a particular characteristic. Simplified code:
At a certain point, I will disconnect from the device with:
await this.Ble.Adapter.DisconnectDeviceAsync(<...>);
Should I also call
readChar.StopUpdatesAsync()
here? Or is it handled internally by the library?If I must stop it, should I do it before or after disconnection?
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions