[nRF Connect SDK] Disconnected by reason code 0x3d

1261.Archive.zip

Target nRF52832(nrf52dk_nrf52832)
SDK NCS v2.0.0
My project base: \nrf\samples\bluetooth\peripheral_hids_keyboard


Hello.

My customer is experiecing disconnection reason code 0x3d between Nokia 5.3 and Nordic.

2022-10-18 14:05:54.032 2587-3307 bt_stack pid-2587 V [VERBOSE1:gatt_attr.cc(245)] gatt_connect_cback: from 00:16:7f:3f:ae:fc connected: 0, conn_id: 0x0001reason: 0x003d

For now, we don't have BLE log and have Android logcat log only.
From log, they made disconnection three time for 3 hours. But I can't reproduce at all. (I don't have Nokia5.3 as well)

1. Can you guess who made this disconnection with this log?

2. Can we have any solution?

Parents
  • Hi Tim, 

    Error code 0x3d means: a message failed a Message Integrity Check (MIC)
    So for some reason the message passed CRC check  but failed the MIC check. It's required by spec that the nRF52 would need to disconnect when receiving this type of packet.  

    We would need to have a sniffer trace to really see which device causing this. There could be a chance that the Nokia 5.3 is doing something wrong. 

    Please ask the customer to test with the default example from the SDK without any modification. They can also try with other example (that require bond) instead of peripheral_hids_keyboard. Just so we can verify if the HID profile would cause any problem.  

  • Hello.

    1. sniff log
    It is not easy that we provide it immediately.

    2. sample
    Actually, we are using custom throughput sample with custom UUID but not HID.
    Today, one of our engineer visit customer and get RTT log.
    Then I believe we can provide disconnection reason code.

    If Android(Nokia5.3) made MIC error, what kind of error code Nordic BLE will have?
    Or Nordic made MIC error, what kind of error code Nordic BLE will have?

    Thanks.

  • hci_snoop20221025194512.cfa

    Hello.

    Now I just have heard how this issue made.

    Android: Nokia 5.3 (Android 11), Galaxy was fine.
    Steps:
    1) Connect Nokia5.3 to wifi. Nokia5.3 connect to Nordic too.
    2) Nokia5.3 move to weak signal area so that wifi disconnected.
    3) BLE disconnected (code 0x3d) this time 0x8(timeout)
    4) We always made this issue.
    BTW SPP device but not Nordic BLE was fine with this test.

    Here is snoop log regarding this issue.
    Can you please let us know any special thing in this log?
    #938 Disconnection message

  • Hi Tim, 
    Please double check and confirm if the disconnection reason was 0x3d (MIC error) or 0x08 (connection timeout). 
    If it's a connection timeout it's normal to explain it. It's just that the Nokia phone was out of range. 

    I assume the SPP device was a Bluetooth Classic device ? 

  • Hello.

    We did test and got result code 0x8 this time.
    So one of my colleagues is testing to get another log as well. I can get new log soon.

    In addition, I also test link loss timeout.
    I made connection and put Android into shield box.
    It disconnected 4~5 seconds later.
    Here is my source code.

    #define INTERVAL_MIN 15
    #define INTERVAL_MAX 15
    static struct bt_le_conn_param *conn_param = BT_LE_CONN_PARAM(INTERVAL_MIN, INTERVAL_MAX, 0, 400);

    bt_conn_le_param_update(current_conn, conn_param);

    I think it's okay. What's your opinion?

  • Hi Tim, 

    It's normal that the phone disconnect after you put it into a shield box. Depends on the connection timeout and depends on the latency on the phone on when it report the disconnection, a 4-5 seconds time out is normal. 

    Regarding the 0x3d issue, please try to capture sniffer trace , not just snoop log. 

  • Hello.

    I got Nokia5.3 and I found Nokia5.3 have some issue with handling BT connection when WiFi disconnect not only my project but classic and other BLE.
    We will reopen this case if we need further question.

    Thank you.

Reply Children
No Data
Related