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

Secure connection using stored key.

Hi,

I am using nrf52832 in my custom board and I want to make secure connection between my two boards using stored keys.

Is there any example provide by nordic which I can refer to? 

Your timely help will be appreciated.

Note: there is no button or display attached in my board so I want to secure my connection using the keys previously stored in the device

Thanks,

KRA

Parents
  • I tried to pass passkey as a third parameter in sd_ble_gap_auth_key_rply().

    In my code:

    I copied the passkey I got from ble event to local variable named char passkey[6] 

    And passing the same in sd_ble_gap_auth_key_rply(conn_handle, BLE_GAP_AUTH_KEY_TYPE_PASSKEY, passkey) but got the same error code 0x08.

    I tried to connect using nrf connect with mobile( where my board is advertising with IO capabilities as display only amd my phone is scanning for the device), in my phone when I am trying to connect it shows me popup to manually enter the passcode. When I am entering the same passcode set as static one, the connection is established between my phone and device.

    Regards,

    KRA

Reply
  • I tried to pass passkey as a third parameter in sd_ble_gap_auth_key_rply().

    In my code:

    I copied the passkey I got from ble event to local variable named char passkey[6] 

    And passing the same in sd_ble_gap_auth_key_rply(conn_handle, BLE_GAP_AUTH_KEY_TYPE_PASSKEY, passkey) but got the same error code 0x08.

    I tried to connect using nrf connect with mobile( where my board is advertising with IO capabilities as display only amd my phone is scanning for the device), in my phone when I am trying to connect it shows me popup to manually enter the passcode. When I am entering the same passcode set as static one, the connection is established between my phone and device.

    Regards,

    KRA

Children
Related