How to know service or characterisic uuid from witch notification event came from? I'm using S130 demo example.
Hi there,
ble_gattc_evt_hvx_t :: handle gives you the handle of the peer's attribute. You will have had to peform service discovery beforehand to know what this handle corresponds to, you can use:
sd_ble_gattc_primary_services_discover
sd_ble_gattc_characteristics_discover
sd_ble_gattc_descriptors_discover
to achieve that.
Carles
Fount out this. This gs_peripheral[peripheral_id].descriptor_handle is notification enable handle, but not my characteristic handle. In example, after discovering characteristic there is an increment of handle_range handle_range.start_handle = gsp_ble_evt->evt.gattc_evt.params.char_disc_rsp.chars[i].handle_value + 1; thats why i missed it.
Fount out this. This gs_peripheral[peripheral_id].descriptor_handle is notification enable handle, but not my characteristic handle. In example, after discovering characteristic there is an increment of handle_range handle_range.start_handle = gsp_ble_evt->evt.gattc_evt.params.char_disc_rsp.chars[i].handle_value + 1; thats why i missed it.