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

some question about bonding and pairing

SDK: nRF5_SDK_11.0.0 Softdevice: s132_nrf52_2.0.0_softdevice project:examples\ble_peripheral\ble_app_hids_mouse\pca10040\s132\arm4

I have some questions about bonding。

(1)What's the difference between BLE_GAP_EVT_SEC_INFO_REQUEST and BLE_GAP_EVT_SEC_PARAMS_REQUEST ?

(2)Mobile phone send a pairing request to the slave, I need to press the button to confirm before the pair, how can I operate?

  • Hi HDU,

    If you have a look here and here.

    You will find the difference between the 2 events. One is to get the parameter for pairing, one is to get the bond information to re-establish encryption using stored case (reconnect after bond).

    2.For your purpose, when you receive BLE_GAP_EVT_SEC_PARAMS_REQUEST, in your application you can delay and wait for the button to be pressed before you send sd_gap_sec_params_reply(). If after 30 seconds the button is not pressed, there will be a timeout.

Related