Security procedure stopped by GATT client timeout

Hello everyone,

In this moment, I am working on a project where I connect to a pulse oximeter and extract some data. The central device is a nRF52840 in a custom board. My issue is the following:
I am pairing the pulse oximeter with the central. They bond, the link is encrypted and the pulse oximeter is added to the whitelist. Here am I able to extract data from the peripheral. Logs shown in the image bellow



My problem is when the pulse oximeter is reconnected later. It is found via whitelist and triggers the events: PM_EVT_BONDED_PEER_CONNECTED and PM_EVT_CONN_SEC_START. This procedure, however, is interrupted and finished by a LE_GATTC_EVT_TIMEOUT event which causes the disconnection of the peripheral. Logs shown in the image bellow 



Any comments on why this might be happening or how to fix this problem are appreciated.

Thank you!

PS: I am using the whitelist

Parents
  • In addition I would like to say that when the event PM_EVT_CONN_SEC_PARAMS_REQ happens, this is what I do:

        case PM_EVT_CONN_SEC_PARAMS_REQ:
            {
              PRINT_RAW("Secure parameters request\n");
                // Allow pairing request from an already bonded peer.
                pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};
                pm_conn_sec_config_reply(p_evt->conn_handle, &conn_sec_config);
            }break;

Reply
  • In addition I would like to say that when the event PM_EVT_CONN_SEC_PARAMS_REQ happens, this is what I do:

        case PM_EVT_CONN_SEC_PARAMS_REQ:
            {
              PRINT_RAW("Secure parameters request\n");
                // Allow pairing request from an already bonded peer.
                pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};
                pm_conn_sec_config_reply(p_evt->conn_handle, &conn_sec_config);
            }break;

Children
No Data
Related