hi team,
i was using nrf52840 with sd 5.0 and developed a custom application using ble_app_proximity in 14.1. my use case is my device should hand shake only with my mobile app. so made a code with time of 10 sec if i didnt enter the password after connecting to the device with in 10 sec the device will be automatically disconnected from the mobile app. the password is entered through the uart services.
i had tested the code in nrf connect app for android in below ways.
1. connected with device and disconnecting manually.
2 connected with device and not entering any password checking whether the disconnection happens after 10 sec automatically.
3. connected with device and entering wrong password checking whether the disconnection happens after 10 sec automatically.
4. connected with device and entering correct password checking whether connection remains for ever.
in above 4 cases. i am getting error in 1st case 0x3002, BLE_ERROR_INVALID_CONN_HANDLE, NRF_LOG_ERROR("SOFTDEVICE: ASSERTION FAILED"); .but all other 3 cases are working fine.
in the debug mode error falls in this line
sd_ble_gap_disconnect.
static void password_timeout_handler(void * p_context)
{
(void) p_context;
if (is_waiting_for_password)
{
uint32_t err_code = sd_ble_gap_disconnect(m_conn_handle,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
APP_ERROR_CHECK(err_code);
}
//is_waiting_for_password = true;
}
what will be the problem how to resolve this. any solution is appreciable.
thanks and regards,
karthikeyan.