hello,
I have one problem to distinguish the following 2 functions : ble_srv_is_notification_enabled and ble_srv_is_indication_enabled
in on_write function, the two functions are checked in the same routine (if ((p_evt_write->handle == p_cus->custom_value_handles.cccd_handle))
currently I can check read/write/indication/notification request in app(android), and the each function is no problem, but if consolidating all, the notification and indication have this kind of issue,
please help to let me know the method to distinguish them.. maybe need to control firstly in the app as to the request : which communication need to be enabled between them.. is it right ?
and I need to know more to support the notification and indication function at the same time,
hvx_params.handle = p_cus->custom_value_handles.value_handle;
hvx_params.type = BLE_GATT_HVX_INDICATION;//BLE_GATT_HVX_NOTIFICATION; BLE_GATT_HVX_INDICATION
hvx_params.offset = gatts_value.offset;
hvx_params.p_len = &gatts_value.len;
hvx_params.p_data = gatts_value.p_value;
printf("hvx_params.p_data : %d \r\n", *hvx_params.p_data);
err_code = sd_ble_gatts_hvx(p_cus->conn_handle, &hvx_params);
the above code need to separate hvx_params.type with BLE_GATT_HVX_INDICATION or BLE_GATT_HVX_NOTIFICATION.
if possible, Could you please kindly provide the example code to support indication and notification at the same time ?
thankful for your support in advance,
thanks.