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

SDK11 S130 BLE Disconnect

HI:

      I Select the SDK11 as my BLE master.  

                           " nRF5_SDK_11.0.0_89a8197 \ examples \ ble_central \ ble_app_multilink_central \ pca10028 \ s130\arm5_no_packs ".

     I Select the Test board as my BLE master:   PCA10028 v1.2.0      2016.15     681374555

     softdevice: S130

      my probem:   

               My BLE master  can  connect with my ble slave ; this is OK.

               But, when My BLE Slave power cut off;  or restart,  the BLE Master will restart, too.    why???

 

thank you!

             

    

     

  • Hi,

    It may look like you are experiencing an assert on the master here, by default the application is setup to run NVIC_SystemReset() on assert, however if you set DEBUG then you can set a breakpoint in app_error_fault_handler() or app_error_save_and_stop() to find identify error code, line number and file name causing the assert.

    Best regards,
    Kenneth

  • Thank you for your apply. Now, I have a new problem.

    My MCU: nRF51822-QFAA

    I Select the SDK9 as my BLE slave:  nRF51_SDK_9.0.0_2e23562\examples\ble_peripheral\ble_app_template\pca10028\s110

    Phenomenon of problem:

            When my BLE Slave device connect success, My BLE Master will send data to slave.

            When receive the data, My salve device will  active disconnect。Call this function: "My_BLE_Disconnect_Fun()"

    //====================================================

    void My_BLE_Disconnect_Fun(void)
    {
    uint32_t err_code;

    if(My_Service.conn_handle == BLE_CONN_HANDLE_INVALID)
    { return; }

    err_code = sd_ble_gap_disconnect(My_Service.conn_handle, BLE_HCI_CONN_INTERVAL_UNACCEPTABLE);
    APP_ERROR_CHECK(err_code);
    }

    //====================================================

    int main(void)
    {
    uint32_t err_code;
    bool erase_bonds;

    // Initialize.
    timers_init();
    buttons_leds_init(&erase_bonds);
    ble_stack_init();
    device_manager_init(erase_bonds);
    gap_params_init();
    advertising_init();
    services_init();
    conn_params_init();

    // Start execution.
    application_timers_start();
    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);

    // Enter main loop.
    for (;;)
    {

    if(BLE_Rx_OK)
    {
        BLE_Rx_OK = false;
        if(OOL_Up_Fg == false)
        {
            BLE_Rx_Function();
        }
     }


      power_manage();
    }
    }

    //=============================================

    I  test discovery:

           When I call the function "My_BLE_Disconnect_Fun()", Sometimes it  restarts and sometimes the normal.

           Why ?? what  caused the restart???

    Thank you very much!

     Best regards,
    Dongxiaohuang

  • Likely one of the function calls return an err_code, this will trigger the assert_nrf_callback() -handler to execute, it may be setup to do a system reset(). You should check the assert_nrf_callback() for line number and error code.

Related