Problem with multiple connection in multirole device

Hello,

In my project, I have a device (nrf52833 custom board) which I want to operate in dual role (central/peripheral). I've followed a ble_app_hrs_rscs_relay example and got it working in some degree which includes:

  • pairing in both central and peripheral role works OK
  • connection securing in both roles works OK (when connecting one at the time)
  • disconnection in both roles works OK

The problem appears when the device is connected in peripheral role (with bonded nrfConnect app on android phone), and trying to connect in central role (another nrf52833 custom board peripheral device). In this case this is the output:

00> <error> peer_manager_sm: Could not perform security procedure. smd_link_secure() returned NRF_ERROR_INVALID_ADDR. conn_handle: 0
00> 
00> <error> peer_manager_handler: Asserting. pm_conn_secure() returned NRF_ERROR_INTERNAL on conn_handle 0.
00> 
00> <error> app: ERROR 3 [NRF_ERROR_INTERNAL] at ../../../../../../../resources/nRF5_SDK_17.0.2_d674dde/components/ble/peer_manager/peer_manager_handler.c:224
00> 
00> PC at: 0x00039603
00> 
00> <error> app: End of error report

I wanted to ask if there is maybe something I'm missing or some obvious reason for that error? 

I'm using SDK 17.0.2 

PS: I'm not sharing the project as it is large and it would be impossible to run it on any devkit as it requires this custom hardware setup to work

Related