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

Disconection occured in a random way[Reason : BLE_HCI_CONNECTION_TIMEOUT]

Hi,

I'm interfacing acceleration via BLE using NRF52.

I'm using timer to get the sensor value and update the characteristic value related to this sensor using sd_ble_gatts_hvx every timeout_ticks value configured in app_timer_start API.

When i set timeout_ticks above 500 ms, the BLE works corrcetly, in the opposite case, a disconnection event occured in a random way with the following reason : BLE_HCI_CONNECTION_TIMEOUT.

Thank you in advance.

Parents
  • Hi Peter, thanks for the answer. My project is based on SDK14 exemples. I'm using softdevice s132 on nRF52. To get and update over sd_ble_gatts_hvx the acceleration value, i'm using the following steps :

    1. Create new timer :
     err_code = app_timer_create(&m_acceleration_mesurement_id,  APP_TIMER_MODE_REPEATED, acceleration_sample_handler);
    
    1. Start timer when BLE_GAP_EVT_CONNECTED occured in ble_evt_handler API in the main file:

      case BLE_GAP_EVT_CONNECTED:
         app_timer_start(m_acceleration_mesurement_id, ACCELERATION_SAMPLE_TIME, NULL);
          m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
          break;
      

    3.Every ACCELERATION_SAMPLE_TIME value the following scenario will be executed :

           GetAcceleration
           acceleration_update
    

    When ACCELERATION_SAMPLE_TIME above 500ms, the BLE operate correctly. Thx

Reply
  • Hi Peter, thanks for the answer. My project is based on SDK14 exemples. I'm using softdevice s132 on nRF52. To get and update over sd_ble_gatts_hvx the acceleration value, i'm using the following steps :

    1. Create new timer :
     err_code = app_timer_create(&m_acceleration_mesurement_id,  APP_TIMER_MODE_REPEATED, acceleration_sample_handler);
    
    1. Start timer when BLE_GAP_EVT_CONNECTED occured in ble_evt_handler API in the main file:

      case BLE_GAP_EVT_CONNECTED:
         app_timer_start(m_acceleration_mesurement_id, ACCELERATION_SAMPLE_TIME, NULL);
          m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
          break;
      

    3.Every ACCELERATION_SAMPLE_TIME value the following scenario will be executed :

           GetAcceleration
           acceleration_update
    

    When ACCELERATION_SAMPLE_TIME above 500ms, the BLE operate correctly. Thx

Children
No Data
Related