Open szyglowicz opened 8 years ago
Has there been any thought on surfacing an event for a disconnected peripheral when acting as the central?
Since we've turned most of the GATT level API synchronous, the only asynchronous event is disconnected by remote peripheral, or the signal breaks up.
Let me know if the following API works in your use case.
// Disconnected returns a channel, which is closed when the client disconnects.
ble.Client.Disconnected() <-chan struct {}
Anything that fits your pattern should be fine
Steve
On Sep 26, 2016, at 4:41 AM, Tzu-Jung Lee notifications@github.com wrote:
Since we've turned most of the GATT level API synchronous, the only asynchronous event is disconnected by remote peripheral, or the signal breaks up.
Let me know if the following API works in your use case.
// Disconnected returns a channel, which is closed when the client disconnects. ble.Client.Disconnected() <-chan struct {} — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
As a client, Is there a way to get the disconnect notification when a peripheral disconnects. I used blesh and it does not see the device go away. In all other libraries, there is a way to know if the device goes away via a callback notification. I assume there is one here as well. And there may be other notifications as well that may be of interest.