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

Is it possible to make a numeric comparison with nRF52832?

Hello.
I am developing a central operation using nrf52832 (S132 v7.0.1, SDK v17.0.0).

There is a numeric comparison as an authentication method, can I do it with sdk17.0.0?
I checked the following site, but I don't know if it can be done because it is not listed. If possible, please let me know the setting value.

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Flib_pm_usage.html

Best Regards.

  • Hi

    Yes, this is possible, but we don't have an example showing how to do it unfortunately. 

    I think the easiest way to implement this is to start out with the ble_app_gls example in the nRF5 SDK, which uses LESC pairing with passkey. 

    Passkey pairing is relatively similar to numeric comparison, and if you look at the Bonding: Numeric Comparison message sequence diagram you can see which events and functions are involved in doing numeric comparison authentication with LESC. 

    Best regards
    Torbjørn 

  • Hello.

    What I want to do is display a number on an external monitor and decide whether to connect or not depending on the response of the monitor.

    When I checked the sequence I was taught, I found that I should output the passkey of BLE_GAP_EVT_PASSKEY_DISPLAY to an external monitor. However, I don't know how to decide whether to connect or not depending on the response.

    Best Regards.

  • Hi

    You have to confirm both on the peripheral and the central side that the same passkey is displayed on both sides of the link.

    As the diagram shows on the peripheral side you can confirm by calling sd_ble_gap_auth_key_reply(BLE_GAP_AUTH_KEY_TYPE_PASSKEY, NULL), after the PASSKEY_DISPLAY event occurs. 

    Typically you would connect this to a button on your device, so that the user have to press a button to confirm, and another button in case they don't want to confirm the passkey. 

    Best regards
    Torbjørn

  • Hello.

    Sorry for the late reply.

    I found that calling sd_ble_gap_auth_key_reply (conn_handle, BLE_GAP_AUTH_KEY_TYPE_PASSKEY, NULL) succeeded in bonding, and calling sd_ble_gap_auth_key_reply (conn_handle, BLE_GAP_AUTH_KEY_TYPE_NONE, NULL) failed.
    You can use this result to decide whether or not to bond according to the response of the monitor.

    It was very helpful. Thank you very much.

    Best Regards.

  • Hi

    Thanks for the update. Good to hear that you got it working Slight smile

    Best regards
    Torbjørn

Related