This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Control of indications

In my device I send data using a characteristic with indications. The client sets the indication and data is then sent. I understand that when a device is bonded the values of characteristics remain, and the value of the indication is persistent. This will mean that on the next connection, data will be sent immediately.

However it is important that I read some of the characteristics before data is sent (such as the clock in the device).

Is there a mechanism to reset the value of indications on disconnect, so that my client can read the characteristics and then enable the indication?

Parents
  • I have control of the client. I understand that if the client initialises the indications in the CCCD this setting is persistent in a bonded device, and thus will be set on the next connection.This will cause data to be sent as soon as connection is made. However I would like to read some characteristics before data is sent. Is there a way for the server to reset the CCCD so that indications are reset on connection?

  • Hi Malcolm, 

    Please clarify that you have control of the client which receive the notification, not the service side, where the notification is sent from , correct ? 

    In that case if you don't have control over the server, I can think of anything solution beside disabling CCCD before you disconnect, or only enable CCCD when you want to receive data and then turn it off after that. 

    Or you can try not to bond with the device.

Reply
  • Hi Malcolm, 

    Please clarify that you have control of the client which receive the notification, not the service side, where the notification is sent from , correct ? 

    In that case if you don't have control over the server, I can think of anything solution beside disabling CCCD before you disconnect, or only enable CCCD when you want to receive data and then turn it off after that. 

    Or you can try not to bond with the device.

Children
No Data
Related