ble_app_hrs_rscs_relay Peer Manager Error

I am developing a new architecture for my project. So, I am getting data from the peripheral, a custom nrf52832 card. Also, I create my custom service to send data and add it to the relay device, nrf52840. With this architecture, I am gathering data from the peripheral and sending it to the relay. Also, I am sending my own data from the relay to the phone side. As a result, I am seeing two services on the phone side, one of which is the service coming from the peripheral side, and the other service is coming from the relay side. But I am getting a peer_manager_error. I think a resource conflict occurred while I was getting data from the relay and the peripheral side. What should I do? Are there any recommendations for this? 

<error> peer_manager_sm: Could not perform security procedure. smd_params_reply() or smd_link_secure() returned Unknown error code. conn_handle: 1
<error> peer_manager_handler: Unexpected fatal error occurred: error: Unknown error code
<error> peer_manager_handler: Asserting.
<error> app: ERROR 12290 [Unknown error code] at C:\nRF5_SDK_17.1.0_ddde560\components\ble\peer_manager\peer_manager_handler.c:295

Parents
  • Hi,

    Erorr 12290 is 0x3002 whihc is BLE_ERROR_INVALID_CONN_HANDLE. Does this happen consistently, or for instance only if the link is disconnector (for any reason) during pairing, so that the handle is no longer valid for that reason?

  • Sorry for the late reply. There was a problem with notifications. Yes, this happens frequently. After starting the device and sending data for a while, it gets the same error. I think the reason is that during the continuous data transfer. Because on the one hand, I increased my incoming notification rate to every 50 ms. In other words, it sends 20 data per second. Could this be the reason?

  • Hi,

    A high notification rate could cause issues in some cases, particularily if the rate is so high that it is difficult to catch up after packet losses if the link conditions are bad. taht does not explain why the connection handle is invalid, though. I can think fo two main causes:

    • The link is disconnected for some reason, but due to timing or priorities, it is still used elsewhere. This could happen, and needs to be handled.
    • Something has corrupted the conn_handle variable. 

    The first thing I would do was to log connects and disconnects, including the connection handle, and also log the connection handle where you get this assert. Then go back and analyze the log to see if this conn handle makes sense, and if so, if it could be that the link was just disconnected. There could be other issues as well, but this seems most likely and is what I would check first.

Reply
  • Hi,

    A high notification rate could cause issues in some cases, particularily if the rate is so high that it is difficult to catch up after packet losses if the link conditions are bad. taht does not explain why the connection handle is invalid, though. I can think fo two main causes:

    • The link is disconnected for some reason, but due to timing or priorities, it is still used elsewhere. This could happen, and needs to be handled.
    • Something has corrupted the conn_handle variable. 

    The first thing I would do was to log connects and disconnects, including the connection handle, and also log the connection handle where you get this assert. Then go back and analyze the log to see if this conn handle makes sense, and if so, if it could be that the link was just disconnected. There could be other issues as well, but this seems most likely and is what I would check first.

Children
No Data
Related