This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Peer Management - Multiple Connections Error

SoftDevice: S132_5.1.0

Environment: I have 1 Device Advertising and about 200 "tags" waking up every 10 seconds and scanning for those advertisements and connecting,
I have set it so i can have up to 4 Peripherals connecting concurrently

I am experiencing a couple of errors with peer management

1. PM_EVT_CONN_SEC_FAILED with an error of  PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING I am finding this happens more frequently when i have multiple concurrent connections. 

2. PM_EVT_ERROR_UNEXPECTED with an error of NRF_ERROR_DATA_SIZE

My ble_gap_sec_params are as follows:

sec_params.bond = 1;
sec_params.mitm = 1;
sec_params.lesc = 0;
sec_params.keypress = 0;
sec_params.io_caps = BLE_GAP_IO_CAPS_NONE;
sec_params.oob = 1;
sec_params.min_key_size = 7;
sec_params.max_key_size = 16;
sec_params.kdist_own.enc = 1;
sec_params.kdist_own.id = 1
sec_params.kdist_peer.enc = 1;
sec_params.kdist_peer.id = 1;

The application is still functioning and seems to recover fine but i just don't understand why i am always getting these errors.

Any help would be appreciated.

Regards,

David Hutchinson

Parents
  • HI David, 
    Which SDK version are you using?

    Are you're using a static passkey since the IO capabilities are set to BLE_GAP_IO_CAPS_NONE and MITM protection is enabled?

    The PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING could indicate one of the peers has deleted the bonding information and the other one has not. Are you able to provide the call stack when you get the PM_EVT_ERROR_UNEXPECTED event? It would be useful to know where the NRF_ERROR_DATA_SIZE error is coming from. 

    Best regards

    Bjørn 

Reply
  • HI David, 
    Which SDK version are you using?

    Are you're using a static passkey since the IO capabilities are set to BLE_GAP_IO_CAPS_NONE and MITM protection is enabled?

    The PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING could indicate one of the peers has deleted the bonding information and the other one has not. Are you able to provide the call stack when you get the PM_EVT_ERROR_UNEXPECTED event? It would be useful to know where the NRF_ERROR_DATA_SIZE error is coming from. 

    Best regards

    Bjørn 

Children
No Data
Related