Hello everyone,
I tried reading around the devzone and the infocenter, but I still didn't manage to solve my question.
In my scenario I'm using:
- an nRF52832 as a peripheral to allow users to pair to the nordic
- peer_manager to handle pairing and bonding
- UART to transmit data to another UART device which has a display capabilities and two buttons, that will be used as Yes/No.
- SoftDevice 6.1.1
The pairing capabilities are DISPLAY_YESNO on the nrf52, and need to be DISPLAY_YESNO or KEYBOARD_DISPLAY on the central side to require the Numeric Comparison capabilities.
Question 1:
Do you confirm that BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM(&sec_mode); will set the nrf52832 to accept only bonding requests that can satisfy the Numeric Comparison security capabilities?
Question 2:
How can I tell the SoftDevice if it should proceed with pairing? In other words: how can I tell the Yes/No answer to the SoftDevice?
The procedure I'm adopting is:
- Pairing request incoming: Peer manager handles SEC_PARAMS_REQUEST event and answers with SEC_PARAMS_REPLY
- I get the passkey via the BLE_GAP_EVT_PASSKEY_DISPLAY
- I send the passkey to the UART and I wait for the YES/NO (How can I tell if I need to answer yes/no, or if the user on their side will input the passkey I'm showing on the display?)
- If I had to answer Yes/No, I need to tell the softdevice to continue with pairing? Do I need to send, if correct, sd_ble_gap_auth_key_reply(BLE_GAP_AUTH_KEY_TYPE_PASSKEY,NULL) or, if failed, sd_ble_gap_auth_key_reply(BLE_GAP_AUTH_KEY_TYPE_NONE,NULL) ?
Thanks in advance,
Andrea