below is my develop environment .
TOOL : VSC - NRF CONNECT SDK 2.6.99
DEV : NRF7002DK
I am currently looking into the BLE GATT structure in NCS.
Since I need to use many characteristics within a BLE SERVICE,
I need to manage HANDLES efficiently. Therefore, I manage the VALUE_HANDLE among the CHARACTERISTICS within the SERVICE as follows:
Reference/
typedef struct {
void *1_data;
uint16_t 1_handle;
} ud_t;
struct ud_t m_ud;
If we declare the BT_GATT_SERVICE_DEFINE using USER_DATA and consider the srv structure as srv and the structure that goes into the user_data position as m_ud.1_data, then:
if (srv.attrs[i].user_data == &m_ud.1_data) {
m_ud.1_handle = bt_gatt_attr_get_handle(srv.attrs[i]);
}
This is how I plan to manage it. However, this method seems unsuitable for managing the cccd handle.
I would like to ask how I can organize the cccd_handle.
Please help me!