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

On PASSKEY re-input of LESC

Hi,

I am developing software supporting LEsecure using SDK 12.3 with nRF 51822.

Please tell me what to do when incorrect data is entered in "Passkey entry".

Currently we will send the input value again with sd_ble_gap_lesc_dhkey_reply, but it will be NRF_ERROR_INVALID_STATE.
Do I need to do something when I determine an error with BLE_GAP_EVT_AUTH_STATUS?

I really appreciate any help or comment.

Thanks

Parents
  • Hi.

    Have you looked at the Glucose Application example in the nRF5_SDK_12.3.0_d7731ad\examples\ble_peripheral\ble_app_gls folder? This shows the code needed for passkey, and there is also an demonstration of the example here.

    When you tried to use sd_ble_gap_lesc_dhkey_reply after you tried the incorrect passkey you get NRF_ERROR_INVALID_STATE because you are disconnected from the device.

    You can read this in the infocenter.

    - Andreas

  • thank you for your answer.

    I can not explain it well, I'm sorry.

    How can I get PASSKEY input again after incorrect data is entered and disconnected?

    After knowing the error, what API should I run?

    I really appreciate any help or comment.

  • Hi.

    You have to connect again. The devices disconnects after you tried to enter incorrect passkey in order to be more secure from brute-force attacks, if it had stayed connected the device would have been vulnerable to brute-force attacks.

    If you want to connect again use the sd_ble_gap_connect API found in ble_gap.h:

    SVCALL(SD_BLE_GAP_CONNECT, uint32_t, sd_ble_gap_connect(ble_gap_addr_t const *p_peer_addr, ble_gap_scan_params_t const *p_scan_params, ble_gap_conn_params_t const *p_conn_params)); 

    - Andreas

Reply
  • Hi.

    You have to connect again. The devices disconnects after you tried to enter incorrect passkey in order to be more secure from brute-force attacks, if it had stayed connected the device would have been vulnerable to brute-force attacks.

    If you want to connect again use the sd_ble_gap_connect API found in ble_gap.h:

    SVCALL(SD_BLE_GAP_CONNECT, uint32_t, sd_ble_gap_connect(ble_gap_addr_t const *p_peer_addr, ble_gap_scan_params_t const *p_scan_params, ble_gap_conn_params_t const *p_conn_params)); 

    - Andreas

Children
Related