Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

The disconnection problem when using nRF52832 on Redmi 5A

Hi, I found that there is a BLE_HCI_DIFFERENT_TRANSACTION_COLLISION when I use nRF52832 in secure connections.
The connection would disappear in 32 secs, but there won't be any problem if i don't use secure connections.
My cell phone is Redmi 5A, Android 8.1, and the bluetooth used is 5.0.
But the connection is fine when using Samsung Galaxy J2 Prime and Oppo A33.
Below is the log of wireshark. Does anyone know how to solve this problem?Redmi 5A.pcapng

Parents
  • Try to add the following line of codes to the BLE_GAP_EVT_CONNECTED event:

    //Add to BLE_GAP_EVT_CONNECTED event:
    
    ble_opt_t opt = {0};
    opt.gap_opt.auth_payload_timeout.conn_handle = m_conn_handle;
    opt.gap_opt.auth_payload_timeout.auth_payload_timeout = 300; 
    err_code = sd_ble_opt_set(BLE_GAP_OPT_AUTH_PAYLOAD_TIMEOUT, &opt);
    APP_ERROR_CHECK(err_code);
    

    This should initiate a ping request from the peripheral, before the peer send a ping request. It looks like the peer send two ping requests in a row (see two LL_PING_REQ with different sequence numbers) without waiting for peripheral to respond to the first (there should be a LL_PING_RSP between the two LL_PING_REQ), this is a violation of the BLE spec, the above code snippet should work around this problem by initiating the ping request from the peripheral instead. Presuming that is the issue.

Reply
  • Try to add the following line of codes to the BLE_GAP_EVT_CONNECTED event:

    //Add to BLE_GAP_EVT_CONNECTED event:
    
    ble_opt_t opt = {0};
    opt.gap_opt.auth_payload_timeout.conn_handle = m_conn_handle;
    opt.gap_opt.auth_payload_timeout.auth_payload_timeout = 300; 
    err_code = sd_ble_opt_set(BLE_GAP_OPT_AUTH_PAYLOAD_TIMEOUT, &opt);
    APP_ERROR_CHECK(err_code);
    

    This should initiate a ping request from the peripheral, before the peer send a ping request. It looks like the peer send two ping requests in a row (see two LL_PING_REQ with different sequence numbers) without waiting for peripheral to respond to the first (there should be a LL_PING_RSP between the two LL_PING_REQ), this is a violation of the BLE spec, the above code snippet should work around this problem by initiating the ping request from the peripheral instead. Presuming that is the issue.

Children
Related