BLE connection issue when multiple WiFi present

Hi,

I am using nRF Connect SDK version 2.3.0, with nRF52833.

My application runs as a BLE Central and roughly performs the following - scans for a peripheral to connect to; if a peripheral is found it connects to it. After connecting, it performs MTU exchange (bt_gatt_exchange_mtu()), and once that completes successfully, it discovers some characterists on the peripheral and proceeds with some data exchange.

To start a connection, I use the default connection parameters - that is: bt_conn_le_create() with BT_CONN_LE_CREATE_CONN and BT_LE_CONN_PARAM_DEFAULT

So far everything has been working really well.

Last week, the device was placed into an environment with 75+ active WiFi networks. The BLE connection was initial established - that is bl_conn_le_create() succeeded, but the MTU exchange was always failing - the reason for the failure was - connection not active. That was occurring consistently. Only when the device was moved from that environment the MTU exchange started working.

The BLE Peripheral was always the same.

Unfortunately, I do not have access to that environment, and cannot measure/capture data from it.

I am trying to find out what parameters I can try adjusting, to help with this. Even though the Peripheral used is always the same physical device, I do not have control over it and cannot change it. I can only change the Central.

Thank you,

D.

  • Hi,

    It sounds like the connection fails to be established. When this happens, you will still receive the connection callback, giving the impression that you are connected. However, the disconnected callback will follow shortly after, with the disconnect reason being '62'. This reason corresponds to BT_HCI_ERR_CONN_FAIL_TO_ESTAB. This error indicates that while the central device was successful in sending the connection request, the peripheral device either did not receive it or did not acknowledge it, which most likely is caused by the interference from the WiFi networks in your case. 

    Excerpt from Bluetooth core spec. Vol. 1, Part F

    BT_HCI_ERR_CONN_FAIL_TO_ESTAB is an error you will see from time to time even under normal conditions and is normally fixed by trying to re-connect. After receiving the disconnect event, does your app try to connect again?

    Best regards,

    Vidar

  • Hi Vidar,

    Thank you for the detailed explanation. This is very helpful.

    No, currently my application will not try to re-connect. I will add re-connect - ex. try to connect, few times, before giving up.

    Do you think increasing the create connection timeout may help?

    Thank you,

    D.

  • Hi, 

    I'm glad to hear you found it helpful. 

    If the connection actually is terminated with BT_HCI_ERR_CONN_FAIL_TO_ESTAB, then I'm afraid there is much else you can do in SW than to try reconnecting again. The timeout for the connection establishment procedure is always 6 connection events regardless of the other connection parameters. 

    Best regards,

    Vidar

Related