Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

CCCD and Read properties

I'm confused about the difference between enabling CCCD property without a read property. CCCD means that the client will be indicated/notified when the characteristic has a new value. Using the nRF connect app, with CCCD enable when writing to the characteristic from the server side, the data is shown straight away. If using read instead I would need to press the read button to see the changes.

Would this mean that I wouldn't need to have both read and CCCD properties enabled?

Parents
  • Hi Jerome, 

    CCCD and read property is not directly related to each other. 
    CCCD is the control attribute that allow the server to send notification/indication of the value of the characteristic. 
    When the read property allow the client to read the value characteristic. 

    Even though the result of the two activity are the same, the value of the characteristic is delivered from the server to the client. But they are 2 different activities, one is that the server decides to send to the client the value (notification/indication). The other is that the client read the value from the server. 
    When you use notification, the server decide when to send the notification. When you use read, the client decide when to read the value. That's why you need to click on the read button on the phone to read the characteristic. 

    You don't have to have both CCCD and read properties but you can choose to have both if you want to support both, notification and read. 

Reply
  • Hi Jerome, 

    CCCD and read property is not directly related to each other. 
    CCCD is the control attribute that allow the server to send notification/indication of the value of the characteristic. 
    When the read property allow the client to read the value characteristic. 

    Even though the result of the two activity are the same, the value of the characteristic is delivered from the server to the client. But they are 2 different activities, one is that the server decides to send to the client the value (notification/indication). The other is that the client read the value from the server. 
    When you use notification, the server decide when to send the notification. When you use read, the client decide when to read the value. That's why you need to click on the read button on the phone to read the characteristic. 

    You don't have to have both CCCD and read properties but you can choose to have both if you want to support both, notification and read. 

Children
Related