Hi, I have problem with notification. My action on central: After I discover characteristics I call function for registration cccd and I registrate cccd of first characteristic. Then I waiting for event BLE_GATTC_EVT_WRITE_RSP when I check characteristic handle and set my own flag and call cccd registration for another characteristic the same way. When I have set all my flags I write flag by sd_ble_gattc_write once within while loop. My action on peripheral: I read my flag by sd_ble_gatts_value_get ble_evt_dispatch. This flag I set in central as I have written above. If flag is OK, I will use sd_ble_gatts_hvx for each of my 5 characteristics.
My problem is that I call third sd_ble_gatts_hvx, I get error 0x3401. If I use sd_ble_gatts_sys_attr_set(m_conn_handle,NULL,0) I will get error NRF_ERROR_INVALID_STATE. Connection state is connected. So Where could be problem ? It works for two characteristics and there is no diference between other characteristics. Length of characteristics is 20 bytes.