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

How do I know if my CCCD handles is set and how many CCCD handles usually are there?

Sorry that I'm asking 2 questions in one go, but they are closely related.

Problem: got 0x00000008, INVALID_STATE error when calling sd_ble_gatts_hvx, looked it up, it's most likely CCCD not set.

The thing is I've been migrating from nrf51 to 52, and the code worked back in nrf51, and I'm very very sure that my Android program set the CCCD which enabled the notification.

And now after moved to nrf52840 @s140, it's not working so well, so I'm asking:

  1. how do I verify using keil's debug mode, that the cccd is really set? My memory is kind of fuzzy, I used the nrf panel or something which was too much hassel to use.

  2. how many cccd handles are there? I may have more than 1, I'm completely unsure, but based on my impression, there should be only 1 per connection? Or maybe there are 1 per attribute? Can't remember.

Related