Hi,
I would like to know how to detect the service change of the ANCS gatt server.
Thank you! Joseph
Hi,
I would like to know how to detect the service change of the ANCS gatt server.
Thank you! Joseph
@Joseph: According to the spec of ANCS " the NC (notification consumer) should look for and subscribe to the Service Changed characteristic of the GATT service in order to monitor for the potential publishing and unpublishing of the ANCS at any time."
What it means is the client should enable indication on the service changed characteristic. And it will receive an indication (BLE_GATTC_EVT_HVX event) when there's a service change.
[EDIT] changed from "need to" to "should"
@Joseph: There could be some diference in the API but the principle should be the same. I think you should be able to use the library with some minor modification.
You can also have a look at ble_app_alert_notification example in SDK v5.1.0, the ble_ans_c.c library handles the service discovery and enables CCCD.
@Joseph: There could be some diference in the API but the principle should be the same. I think you should be able to use the library with some minor modification.
You can also have a look at ble_app_alert_notification example in SDK v5.1.0, the ble_ans_c.c library handles the service discovery and enables CCCD.