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

Connection Loss between nRF and Iphone

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(&params, 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, &params);
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.

Parents Reply
  • Can you attach the sniffer traces here here, you can also make the case private if desired.

    I looked at the data sheet for the ISP130301 and I could not figure out the accuracy of the 32 KHz crystal used in the ISP130301. Please reach out to the manufacturer and get the accuracy of the 32 KHZ crystal.

    Update the 

    ble_stack_init()
    function in SDK 12.x to set the crystal accuracy as stated by the manufacturer of the nRF51 module as the default used may not be correct.

Children
Related