NCS disconnect with reason 0x08 connection timeout when using bluetooth peripheral uart application

Hello,

We are using  NCS NRF connect SDK 2.4 with bluetooth peripheral uart sample application.

We see sometimes disconnect call back is called with reason 0x08. After this device is not broadcasting.

Could you please clarify the below.

1: Reason for this disconnect call back callled, is this because of local host or remote host?.

2: Is there anyway we can increase the connection time out value?.

3: What action needs to be done to make sure device broadcasts the manufacturing data in this scenario?.

Parents
  • Hello,

    1: Reason for this disconnect call back callled, is this because of local host or remote host?.

    The error code 0x08 is Connection Timeout Error code. This indicates that either the link supervision timeout has expired for a given connection or that the synchronization timeout has expired for a given broadcast.

    Is there anyway we can increase the connection time out value?.

    You can set the supervision time by using config option: CONFIG_BT_PERIPHERAL_PREF_TIMEOUT

    3: What action needs to be done to make sure device broadcasts the manufacturing data in this scenario?

    You can restart advertising when disconnection happens.

    BR

  • Thanks for the reply.  How do we make sure the synchronization timeout not to expire?.

    Also what API needs to be called to stop broadcasting the advertising packet. We are using the sample bluetooth peripheral application. 

Reply Children
  • Hello,

    Apologies for delayed response.

    The synchronization timeout is a feature of extended periodic advertisement.

    Regarding the advertising, you can use: 

    bt_le_adv_stop() and bt_le_adv_start() from bluetooth API.

    BR, Naeem
  • Thanks for the response. I am using bt_le_adv_stop()() before the advertisement start.  After setting the below connection parameters in the example sample perupheral_uart code, we are still seeing the connection timeout with error code 8.

    # Use connection parameters that ensure quick data transfer
    CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6
    CONFIG_BT_PERIPHERAL_PREF_MAX_INT=6
    CONFIG_BT_PERIPHERAL_PREF_LATENCY=99
    CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400

    This is seen in the remote host as well. Looks like remote host is using IOS app and unable to set this supervision timeout. 

    1: Is there anyway that remote host central (IOS based mobile app) can request for these parameters and we can send the same by sending through GATT server. If we do this can you share the example code that I can refer to implement the GATT connection in the peripheral.

     2: Is this connection timeout caused because of the remote host central (scanner mobile app) not set for the supervision timeout? 

Related