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

Issue with Peer Manager: NRF_ERROR_INVALID_ADDR. NRF_BREAKPOINT

Full error report:

<info> app: Connected
<error> peer_manager_sm: Could not perform security procedure. smd_params_reply() or smd_link_secure() returned NRF_ERROR_INVALID_ADDR. conn_handle: 0
<error> peer_manager_handler: Unexpected fatal error occurred: error: NRF_ERROR_INVALID_ADDR
<error> peer_manager_handler: Asserting.
<error> app: ERROR 16 [NRF_ERROR_INVALID_ADDR] at :0
PC at: 0x00000000
<error> app: End of error report

(Windows10, Segger 4.52c, SDK 15.2.0, nRF52832 dev board)

I'm starting with ble_uart example and I'm using it to drive three PWM lines to an RGB LED. When I use nRFConnect, it works perfectly. I send a command and value, the light changes.
Next is a custom Android app. However when I attempt to pair with my Android S10, I get the above error (This is outside of the custom app, just connecting in settings on the phone)

Since I started with the uart example, I added the peer manager myself from another example.
nRFConnect connects regardless if peer manager code is added or not.
Why does nRFConnect work but normal pairing from a phone does not?

Parents
  • Hi Connor, 
    The main difference between when you connect using nRFConnect and when you connect using the Bluetooth setting natively on the phone is that when connecting using Bluetooth setting it will automatically force pairing. This is not the case with nRFConnect which only connect without bonding if not required. 

    The error pointing to an issue with peer manager which makes sense because peer manager handle bonding activity. 

    Your integration of peer manager to the application may have a bug or something. I would suggest to add a break point in the code to find which exact function that throw the issue and why it throw the NRF_ERROR_INVALID_ADDR, either in smd_params_reply() or smd_link_secure()

  • Okay that makes sense.  I have decided to start with the template project and add NUS and my other application specific code.
    Problem now is ble_nus.c is complaining about  the function blcm_link_ctx_get() being not defined.  I believe I have everything I needed included to the project.  On the info center I can't seem to find where this function is defined.  
    Do I need to start another ticket for this issue?

    Edit: I resolved the issue and I can compile without error or warning.  On attempted pairing the board crashed giving an invalid address response.
    Adding peer manger seems to be a universally difficult feat.  I've been though many other ticket with the same issue without solutions.

    Is there an example that has both NUS and peer manager already initialized? 

  • Hi Connor, 
    I'm sorry for late response. Do you still have an issue integrate NUS into ble_app_template ? 

    blcm_link_ctx_get() is defined in ble_link_ctx_manager.c 
    If you see a function missing you can check where it's defined in the original ble_app_uart example. 

    Please let us know where you get the invalid address error when you integrate into ble_app_template. 

Reply Children
No Data
Related