BLE Connection Issue with nRF5340 Device

Hello,

I am using the nRF5340 in my project, and the device is capable of communicating with a mobile phone over BLE. However, we occasionally encounter a connection error when trying to connect to the device from our mobile application.

I captured the issue using Wireshark, and the device address at the time was E4:E6:0F:05:AF:C0. The device had sufficient battery and was in close proximity to the phone during the test. Despite this, the connection attempt fails intermittently.

Unfortunately, I couldn’t identify the root cause of the problem from the Wireshark logs. Could you please help me understand what might be causing this connection issue?

Thank you in advance.

e4_e6_0f_05_af_c0 connection error.pcapng

  • Hello,

    If you experience repeated BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED disconnect reasons, it may be that the peripheral device have whitelist enabled while advertising, whitelist on the peripheral device only allow previously bonded central devices to connect with the peripheral. You may need to enable pairing on the peripheral device to allow a new central device to connect and bond in this case.

    What may cause intermittent BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED disconnect reason:

    In a realistic end-user environment there are a lot of 2.4GHz traffic, it can be traffic from other Bluetooth devices communicating, it can be Bluetooth devices that are trying to scan or connect to the same peripheral device, it can be Wifi devices that typically have higher output power and use much higher bandwidth, other proprietary 2.4GHz equipment (even microwave ovens or USB3.0 noise). All this 2.4GHz traffic will interfere, and sometimes this interference will cause packets to not be received by the peer device. This is very normal in a wireless application. It's very difficult to estimate the amount of packet that can be lost, since it depends so much on the environment, but typically you will expect about 1-5% of the packets to be lost. This will mean that about 1-5% of the times you try to establish a connection you will experience a BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED on the central. How should you handle this? My suggestion is simply to try to connect again.

    Kenneth

  • Hi Kenneth,

    Yes, we are experiencing intermittent connection failures with our device. However, in the Wireshark capture I previously shared with you, I was not able to directly identify the BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED error.

    I’m curious how you determined that this specific error occurred based on the log. I reviewed the packets but couldn’t find a clear indication of that particular HCI error code.

    In the shared capture, the device attempts to connect to the mobile application, but a failure occurs during the process. However, I wasn't able to interpret the technical details that point to the cause of the failure.

    Could you please clarify if this specific error is present in the capture, and if so, which packet or message indicates it? Your feedback would help us better understand how to analyze similar issues moving forward.

    Thank you very much for your support.

Related