This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Added Peer Manage to ble_app_blinky

Hi All,

I want to add pairing and binding functions to the blinky project.

But nothing happens when I connect.

Please help me,thank you.

Here is my project => Lab10_PeerManager_pairing.zip

I'm using SDK v17.1.0

Best regards,

Kai

Parents
  • Hi Kai,

    I had a biref look at your project and see one issue that is clearly incorrect. In your handling of the BLE_GAP_EVT_SEC_PARAMS_REQUEST you reply that pairing is not supported. You need to remove this. In fact, there is no need to handle this event at all, as it is handled by the peer manger library.

    Einar

  • Hi Einar,

    Finally I refer to the example of gls.

    I observed that pairing needs to use these few lines of code =>

    err_code = pm_conn_secure(p_ble_evt->evt.gap_evt.conn_handle, false);
                if (err_code != NRF_ERROR_BUSY)
                {
                    APP_ERROR_CHECK(err_code);
                }

    Now I have two questions : 1. why bps example does not use this API.

                                                2. My program has a pairing function after adding that API, but the phone will jump 2 times to                                                      notify before it can be connected.

    Best regards,

    Kai

  • Sorry, I am still not able to understand your question. Please explain in detail, and preferably also provide logs or method to reproduce the issue you are describing to make things clearer.

  • Hi Einar,

    Do you actually use an Android phone to run my program?

  • Hi,

    No, I have not tested with an Android device yet (I do not have immediate access to one, and I am still not sure about what to test - all the tests I have been able to do both from iOS and nRF Connect for Desktop shows everything working as expected with regard to pairing). The thread you link to does not describe a common problem, and I do not see any reason in what you have written before that indicate it is related. However, I have yet to get a proper description about what the problem is, so I do not know what to look for.

    If you want me to look into this, then please elaborate on the issue. Currently my understanding is that "pairing function appear", and if you by that mean does not appear by itself, that is expected. With your current code you need to initiate it from the Android side, and it will not happen automatically. Again, please describe in more detail both what is happening and what you want.

  • Hi Einar,

    I had no idea how to tell you the problem, so I made a video.

  • Hi,

    I am not able to understand the text on the popups, but in the end there it looks like the state is connected and bonded. Is that not expected? I am unfortunately still at a loss about what the problem is.

Reply Children
Related