Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Peer Manager accept pairing with non acceptable parameters

Hi,

I'm currently developping a peripheral. This one uses Peer Manager module to handle pairing.
This peer manager is configured properly with pm_sec_params_set (as far as I can say), and accept pairing and probably bonding (I did not test it fully).

My problem is that it seems that my peer manager accept as well pairing with wrong security parameters. For example, say i configured my peer manager to be on security mode 1 level 3, It seems to accept as well pairing with security mode 1 level 2.

So my questions are:

- Is it possible that I misunderstood my logs ?

- Is there somewhere in the peer manager configuration the possibility to refuse pairing if Central security parameters does not meets mine, or shall I code it in my peer manager event handler ? On which event ?

- Reading the doc, I found some mention of functions pm_handler_disconnect_on_insufficient_sec and so on, that seems to do what I want, could you provide me with an example ?

- Is it possible that I short-circuit the peer manager, if by any chance I have another observer at lower level ? (The one I'm thinking about only log, but maybe another module could do something ?)

All the best,

Parents
  • Hi, 

     

    - Is it possible that I misunderstood my logs ?

    Could you provide the log?

     

    - Is there somewhere in the peer manager configuration the possibility to refuse pairing if Central security parameters does not meets mine, or shall I code it in my peer manager event handler ? On which event ?

    Please see this post

     

    - Reading the doc, I found some mention of functions pm_handler_disconnect_on_insufficient_sec and so on, that seems to do what I want, could you provide me with an example ?

    Unfortunately, we don't have the example with pm_handler_disconnect_on_insufficient_sec. You can check the documentation for the usage:

    Auxiliary standard function for disconnecting on insufficient connection security.

    This function disconnects whenever the connection security succeeds, that is whenever it receives a PM_EVT_CONN_SEC_SUCCEEDED, but the established security does not fulfill the provided criteria.

    Note
    In normal circumstances, this function should be called for every Peer Manager event.
    This function is a supplement to pm_handler_on_pm_evt, not its replacement.

     

    - Is it possible that I short-circuit the peer manager, if by any chance I have another observer at lower level ? (The one I'm thinking about only log, but maybe another module could do something ?)

     I don't understand the question. Do you mean unpair or reject to pair? Could you elaborate more?

    -Amanda H.

Reply
  • Hi, 

     

    - Is it possible that I misunderstood my logs ?

    Could you provide the log?

     

    - Is there somewhere in the peer manager configuration the possibility to refuse pairing if Central security parameters does not meets mine, or shall I code it in my peer manager event handler ? On which event ?

    Please see this post

     

    - Reading the doc, I found some mention of functions pm_handler_disconnect_on_insufficient_sec and so on, that seems to do what I want, could you provide me with an example ?

    Unfortunately, we don't have the example with pm_handler_disconnect_on_insufficient_sec. You can check the documentation for the usage:

    Auxiliary standard function for disconnecting on insufficient connection security.

    This function disconnects whenever the connection security succeeds, that is whenever it receives a PM_EVT_CONN_SEC_SUCCEEDED, but the established security does not fulfill the provided criteria.

    Note
    In normal circumstances, this function should be called for every Peer Manager event.
    This function is a supplement to pm_handler_on_pm_evt, not its replacement.

     

    - Is it possible that I short-circuit the peer manager, if by any chance I have another observer at lower level ? (The one I'm thinking about only log, but maybe another module could do something ?)

     I don't understand the question. Do you mean unpair or reject to pair? Could you elaborate more?

    -Amanda H.

Children
Related