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, The interrupt priority i'm running at RTC1 is 7.

    below, the treatment performed in acceleration_sample_handler() :

    	Acc_Value AccData;
    	static uint32_t err_code = NRF_SUCCESS;
    
      memset(&AccData, 0, sizeof(Acc_Value));
      readAcc(&AccData);
    	
    	err_code = ble_accs_acceleration_update(&m_accs, (uint8_t*)(&AccData));	
    	   
    	APP_ERROR_CHECK(err_code);
    

    I can't share the complete project but i can send you the main.c and board_definition.c if you want.

    Thank you

Reply
  • Hi Peter, The interrupt priority i'm running at RTC1 is 7.

    below, the treatment performed in acceleration_sample_handler() :

    	Acc_Value AccData;
    	static uint32_t err_code = NRF_SUCCESS;
    
      memset(&AccData, 0, sizeof(Acc_Value));
      readAcc(&AccData);
    	
    	err_code = ble_accs_acceleration_update(&m_accs, (uint8_t*)(&AccData));	
    	   
    	APP_ERROR_CHECK(err_code);
    

    I can't share the complete project but i can send you the main.c and board_definition.c if you want.

    Thank you

Children
No Data
Related