Hello, first, a little background info:
I want to know if I have successfully set the CCCD handle or not with my Android program.
And endnode recommended that I use this function "sd_ble_gatts_value_get".
I tried with the following code:
#ifdef DEBUG
ble_gatts_value_t ble_gatts_value_cccd_acquire;
result = sd_ble_gatts_value_get (m_active_conn_handle,m_mesh_service.service_handle, &ble_gatts_value_cccd_acquire);
#endif
where: m_active_conn_handle is the current active gatt connection handle;
m_mesh_service.service_handle is the target gatt service I want to read one of its characteristic (and things get fuzzy from here), and its documentation is here:
ble_gatts_value_cccd_acquire is an empty struct that I plan to store my result in.
The final product:
isn't something very helpful...the length is 2, the offset is zero, and the p_value points to a part of the memory which aren't 0x0000 (notification disabled) or 0x0001 (notification enabled):
So... how do I use this function? It has only 3 parameters, and 2 of which are used to id the target value...shouldn't I use 3, one for id-ing the gatt connection, one for id-ing the service, one for id-ing the characteristic? Golly why must everything be so confusing!
So... how?