Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Frequent disconnects

Hello, I'm getting these series of events often when the client is sending data to client. This is the the nRF SDK 17.



If I add a delay on the client app that is talking to the device, these message seems to go away for example 95% of the time. The was tested with two different apps one with a delay and one without.

The client app is doing, is connecting to the device and sending some data to it, and then it disconnects. I'm thinking if this might be a timing thing, and that the peripheral hasn't fully finished the connection process, by the time the app is sending data.


Any way of knowing, what the cause of this could be? Sniffing the packets is hard to do as the device is mitm protected, with a passkey.

Parents
  • So I think the problem has to do with the connection parameter update.

    My parameters are:

    #define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(5000) /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */
    #define NEXT_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(30000) /**< Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds). */
    #define MAX_CONN_PARAMS_UPDATE_COUNT 3                       /**< Number of attempts before giving up the connection parameter negotiation. */

    For the FIRST_CONN_PARAMS_UPDATE_DELAY I've tried a low value at 500, and a high value of 10000 but the results are the same, where it will disconnect with the debug message shown in the above post.

    If I look at the nRF app logs, it says Error 8 (0x8): GATT CONN Timeout.

Reply
  • So I think the problem has to do with the connection parameter update.

    My parameters are:

    #define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(5000) /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */
    #define NEXT_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(30000) /**< Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds). */
    #define MAX_CONN_PARAMS_UPDATE_COUNT 3                       /**< Number of attempts before giving up the connection parameter negotiation. */

    For the FIRST_CONN_PARAMS_UPDATE_DELAY I've tried a low value at 500, and a high value of 10000 but the results are the same, where it will disconnect with the debug message shown in the above post.

    If I look at the nRF app logs, it says Error 8 (0x8): GATT CONN Timeout.

Children
No Data
Related