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

To use notification, I must enable the CCCD of my target characteristics, identified using UUID, right?

Hi, I want to enable notification for a specific characteristic, and to do that, I must write 0x01 (in java it's going to be "01,00" ) to the CCCD handle of this characteristic, right? Question #1

Please see this screen shot of a characteristic:

image description

You can see 3 items:

The first one charactersitic declaration, I believe it is freaking useless, whatever you read or write, it doesn't matter, it's not what I'm looking for.

Then you have the 2nd one, It's just he UUID, which is used to identify this characteristc.

Last, and most important, you have the 3rd item. I believe this is what I'm looking for, the CCCD handle, I must call functions and try to write 0x01 to it, and by that I mean

I must call in my android program a function that does business none other than writing CCCD handles.

But there are a lot of CCCD handles out there each corresponding to a characteristic. So I must tell this function to write the correct CCCD handle by feed it with the right UUID as parameter, the UUID I blacked out in the screen shot, right? Question #2

I hope I'm not getting it wrong here.

Please someone answer both Question #1 and Question #2???

Much obliged!

Related