This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Disconnection after BLE_GAP_EVT_LESC_DHKEY_REQUEST error 19 (0x13)

Hi all,

after call inside the BLE_GAP_EVT_LESC_DHKEY_REQUEST I got error 8, what can cause it? a CONNECTION_SUPERVISED_TIMEOUT? 

		static nrf_value_length_t peer_public_key_raw = { 0 };

		peer_public_key_raw.p_value = &p_ble_evt->evt.gap_evt.params.lesc_dhkey_request.p_pk_peer->pk[0];
		peer_public_key_raw.length = BLE_GAP_LESC_P256_PK_LEN;

		error = nrf_crypto_ecc_public_key_from_raw(NRF_CRYPTO_BLE_ECDH_CURVE_INFO,
			&peer_public_key_raw,
			&m_peer_public_key);
		APP_ERROR_CHECK(error);
		NRF_LOG_INFO("nrf_crypto_ecc_public_key_from_raw %d\r\n", error);

		error = nrf_crypto_ecdh_shared_secret_compute(NRF_CRYPTO_BLE_ECDH_CURVE_INFO,
			&m_private_key,
			&m_peer_public_key,
			&m_dh_key);
		APP_ERROR_CHECK(error);
		NRF_LOG_INFO("nrf_crypto_ecdh_shared_secret_compute %d\r\n", error);

		error = sd_ble_gap_lesc_dhkey_reply(connectionhandle, &m_lesc_dh_key);
		APP_ERROR_CHECK(error);
		NRF_LOG_INFO("sd_ble_gap_lesc_dhkey_reply %d\r\n", error);

device nRF52, SDK13

Thanks

Parents Reply Children
Related