-
Notifications
You must be signed in to change notification settings - Fork 138
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
Connected Clients Handling #7
Comments
From 'Introduction to GATT' from adafruit. That is how my old dongle works and it would solve my problems. |
The introduction on GATT from Adafruit you quoted is out of date and applies to the 4.0 specification. For host radios supporting 4.1 topology, which we require for "peripheral role" to be enabled, simultaneous connections to a peripheral are supported. With regard to your question, GattSession.Close (IDisposable) is implemented. If you are seeing issues with that, or with tracking subscribed clients, we would need tracing to diagnose what you are observing. We have instructions here, How to collect bluetooth logs. |
@mtbeaver Thank you for the answer. |
Seems like this is some confusion after the docs were moved to the new format. in WRL, the GattSession object implements Windows::Foundation::IClosable interface, which exposes the Close method. In C#, this is projected as IDisposable, which exposes it as Dispose. For your App, assuming it is C#, should be using the Dispose method on the session. You can see more details on how IClosable works here: Windows.Foundation.IClosable |
@mtbeaver Thanks again. But I figured as much and only asked because that does not seem to work. Calling Dispose on the session does indeed dispose the session on the windows side. But the peripheral still sees itself as connected and sending another message on a subscribed characteristic just creates new session object. I would expect Dispose/Close to actually disconnect the given peripheral. |
Hi there,
it would be nice to add a list of currently subscribed clients to the service views.
On my own GATT Server I see a lot of issues with keeping track of sessions/clients, events not firing on 'ungraceful' disconnects and so on. So it would be really helpful to see a nice sample for that. Would also be nice to expand the samples to notify selected clients only.
Pretty much SubscribedClientsChanged and GattSession.SessionStatusChanged to keep track of sessions/clients and expand on the NotifyValueAsync and show how to send notifications to selected clients only.
Also a question, do you know why GattSession.Close() is not implemented? I could really use that :)
The text was updated successfully, but these errors were encountered: