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 to Indicate BLE 'Service Changed' (0x2A05) (IDFGH-9551) #1777
Comments
@mainr gattc is automatic to 'subscribe' the notification, client will get ESP_GATTC_SRVC_CHG_EVT |
Thanks for the response @Weijian-Espressif . To clarify:
Now some conditions arise that cause the STRUCTURE of the attribute table to change, such as exposing a new service (or removing an existing one, etc.). If adding, say the attributes now look like:
I understand the function of the 'service changed' notification is to inform the client that changes have occured, and it should flush its internal cache (GAP/GATT) for this device, and re-discover services. What I don't understand is what does the gatt server code running on the ESP32 need to do after modifying the GATT structure to trigger the notify/indicate to the client? Surely the notification is not automatic so that EVERY change to the GATT triggers notification? |
service_change_demo.zip |
Hi, is there the Arduino Framework version of this? |
Nothing? |
@Sladerix I don't find anything specific either 'range of...' is ambiguous at best but I 'guess' that in the end one sends a notify on this characteristic, which triggers the host side action. well, after starting to add the code, it seems u send a notify, then the client READS the 'range of' |
Under BLE standard 'Generic Attribute' (0x1801) there is a Characteristic 'Service Changed' (0x2A05) with 'indicate' property, which is supposed to be used to indicate that a range of handles in the BLE device have changed, so that they can be 're-discovered', updating any cached information.
How would I go about triggering this?
How do I specify the 'range of affected handles' that are affected by the change?
Does the client need to 'subscribe' to get the indication, or is this automatic (there is no 0x2902 descriptor to write to)?
Issue ( #1673 ) seems to indicate the 'service changed' notification is something other than what I interpret is is supposed to be.
The text was updated successfully, but these errors were encountered: