Access of CCCD value per each bonded device

mihir_t
Posts: 3
Joined: Sun Aug 11, 2019 10:32 am

Access of CCCD value per each bonded device

Postby mihir_t » Sun Aug 11, 2019 10:52 am

Hi all,

As par Bluetooth Core Spec 4.2, each bonded device has its instantiation of Client Characteristic Configuration Descriptor.
"The Client Characteristic Configuration descriptor value shall be persistent across connections for bonded devices."
"Each client has its own instantiation of the Client Characteristic Configuration. Reads of the Client Characteristic Configuration only shows the configuration for that client and writes only affect the configuration of that client".

On ESP-IDF v3.2, i need to access the CCCD value for each bonded device after connecting with BLE server application.
Based on the CCCD value per connection, i have to control the notification on BLE server.

So kindly suggest some way to access it.

Regards,
Mihir Tailor
Regards,
Mihir Tailor

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Access of CCCD value per each bonded device

Postby chegewara » Wed Aug 14, 2019 8:52 pm

You have to track CCCD value for every connected client device, for example create structure that will keep CCCDs values and client address. When you want/need to send notification/indication just check if client registered for it. But this is only required if you are working on battery and want to use less power, because even if you send notification to all connected clients each client shall discard notification if didnt register for it.

Who is online

Users browsing this forum: Bhaydar, Bing [Bot], ok-home and 77 guests