Hi Nordic,
I'm using nRF51, SDK 12 and softdevice version S130 to stream data from nrf51 to iphone6 over BLE.
Sometimes, Few hours after launching streaming, the BLE communication between iphone and nrf51 is get lost.
Following the sniffing trace, the loss of connection was generated beacause nRF51 didn't respond to the connection event generated by smartphone.
nRF51 stream data using the code bellow :
memset(¶ms, 0, sizeof(params));
params.type = BLE_GATT_HVX_NOTIFICATION;
params.handle = p_translinks->rx_char_handles.value_handle;
params.p_data = data;
params.p_len = &length;
err_code = sd_ble_gatts_hvx(p_translinks->conn_handle, ¶ms);
if (err_code != NRF_SUCCESS &&
err_code != BLE_ERROR_INVALID_CONN_HANDLE &&
err_code != NRF_ERROR_INVALID_STATE &&
err_code != BLE_ERROR_NO_TX_PACKETS &&
err_code != NRF_ERROR_BUSY)
{
APP_ERROR_CHECK(err_code);
}
When testing our work in another place this issue appears in a systematic way.
Could someone please can explain to me the cause of this issue
Best Regards,
Mehdi.