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

Send Passkey from central to peripheral

I want to implement static passkey based bonding, using the nrf51822 on both sides[Central is not a Mobile phone].My sw for peripheral side is working with a mobile device.But in the actual applkication i have to use a nrf51822 chip.The host controller on the central side has a display & keyboard entry...

Please suggest good code examples/documents as i am unable to find one.

  • Then I guess you say that you have a display on the peripheral, and you have set a static passkey. If that is the case you should say that you have a keyboard on the central. Then you will get the BLE_GAP_EVT_AUTH_KEY_REQUEST event, and you need use the static passkey in the reply sd_ble_gap_auth_key_reply(). See this MSC for more information.

    You can also say that you have keyboard on the peripheral and on the central. Then you will get the BLE_GAP_EVT_AUTH_KEY_REQUEST event on both sides. And you reply with the same passkey on both sides with sd_ble_gap_auth_key_reply().

Related