You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of shutdown() does not reinitialise the GattServer. For instance, it does not reset the values of characteristicCount, serviceCount, descriptorCount, etc.
The text was updated successfully, but these errors were encountered:
thanks for raising this. It is a serious flaw. It could be affecting the functioning of Eddystone and similar services which rely upon being able to flush the GattServer based on a shutdown.
@rgrover: I believe there is more state that is not being handled correctly in shutdown(). For instance, if you have two targets, the first running as a GattServer and the second as a GattClient. If you connect the client to the server and then call shutdown() in both this will not clear the Gap state. In other words, if after the call to shutdown() I call getState() in Gap, then the client will tell me that it is currently "connected" and the server tells me it is "advertising" and "connected".
Clearly, this leaves the API into all sorts of inconsistency and further calls to other functions (even after calling init()) might start returning unexpected errors.
maybe BLE::shutdown() should call Gap::shutdown(), GattServer::shutdown(), etc.
We might need to create these additional shutdown virtual methods and leave them empty by default.
Thanks for pointing this out.
The implementation of
shutdown()
does not reinitialise theGattServer
. For instance, it does not reset the values of characteristicCount, serviceCount, descriptorCount, etc.The text was updated successfully, but these errors were encountered: