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

uart sample application failed

I download uart sample from Nordic developer zone . at devzone.nordicsemi.com/.../is-there-a-serial-port-profile-for-ble

Because you had build the uart profile and iOS.so i want to use project to develop.

But,Now I found the bug,that is when i connect and enable service servel time(by macro CONN_SUP_TIMEOUT 4s),the dongle update Connection parameters Supervison Timeout 4000.0ms ,it will get "PackQueueSearch event code 0x0D". It make the APP(nRF6310) lit LED7(have a error) and can't reconnect 'advertising.

How to do fix this bug?

thank you.

ble_app_uart.zip

Parents
  • This happens since the ble_conn_params module got a new event in SDK 4.3.0, to say that connection parameters have been updated.

    Unfortunately, the default handler in 4.2, which was used in the UART application, checks the event type, and if it is not the correct, it basically asserts. The on_conn_params_evt() method in main should therefore be modified to be as follows:

    
    static void on_conn_params_evt(ble_conn_params_evt_t * p_evt)
    {
        uint32_t err_code;
        
        if(p_evt->evt_type == BLE_CONN_PARAMS_EVT_FAILED)
        {
            err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_CONN_INTERVAL_UNACCEPTABLE);
            APP_ERROR_CHECK(err_code);
        }
    }
    
    

    I'm sorry for the inconvenience caused. Please see this question for the updated app.

Reply
  • This happens since the ble_conn_params module got a new event in SDK 4.3.0, to say that connection parameters have been updated.

    Unfortunately, the default handler in 4.2, which was used in the UART application, checks the event type, and if it is not the correct, it basically asserts. The on_conn_params_evt() method in main should therefore be modified to be as follows:

    
    static void on_conn_params_evt(ble_conn_params_evt_t * p_evt)
    {
        uint32_t err_code;
        
        if(p_evt->evt_type == BLE_CONN_PARAMS_EVT_FAILED)
        {
            err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_CONN_INTERVAL_UNACCEPTABLE);
            APP_ERROR_CHECK(err_code);
        }
    }
    
    

    I'm sorry for the inconvenience caused. Please see this question for the updated app.

Children
No Data
Related