The application shall ... when GATTC_SVC_CHANGED_CFG_IND

In the RW-BLE-GATT-IS documentation it is mentioned (section 4.4.4.1 GATTC_SVC_CHANGED_CFG_IND):

“It contains the new configuration set by the device. The application shall take care of the given configuration before sending an indication. It will also keep this configuration disconnection of a link with a bonded device in order to remind it once a new connection occurs.”

Could you please explain the very last sentence with other words? Thank you in advance.

@darrew

“It contains the new configuration set by the device. The application shall take care of the given configuration before sending an indication. It will also keep this configuration disconnection of a link with a bonded device in order to remind it once a new connection occurs.”

Our understanding is as:

After bonding, it will have a event triggered. GATTC_SVC_CHANGED_CFG_IND.
A. It tells application ccc_value (Client Characteristic Configuration Description value) has changed.

B. Application will check if it this is new. If this is new, it will save enable bit for svc_changed_ind_enable into NVR (in case there is disconnection).

C. There is disconnection. The bonded client try to reconnect.
Server will have GAPC_connection_cfm to confirm which should have this bit to show if both has been bonded before.

Here you can see GAPC_connection_cfm restore this bit and include it for gapc connection confirmation.

Thank you for using our community forum!

In other words, on every GAPC_CONNECTION_CFM the application shall communicate svc_changed_ind_enable to the stack, the value of which must be the boolean version of the last value ind_cfg received on GATTC_SVC_CHANGED_CFG_IND. Is this correct?

Hi @darrew
Yes. Your understanding is correct.
That boolean value could be updated by using GATTC_SVC_CHANGED_CFG_IND.

Why should the application communicate this value to the BLE stack if the application is responsible to a) store this value in non-volatile form and b) send an indication to the peer device as per GATTC_SendSvcChangedCmd ?

Hi @darrew ,
Please see the procedures I described before, you could understand this.

  1. GATTC_SVC_CHANGED_CFG_IND happens after new bonding, – save this bool value to NVR for next reconnection.
  2. Disconnect → reconnect → will have GAPC_CONNECTION_CFM which will use this bool value to tell “we have bonded or not before”.
1 Like