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

How to use Static Passkey for a no-display-no-output peripheral

I'm looking to implement the following security schema:

  • The peripheral does not have a display nor input capabilities
  • A smartphone will connect to the device
  • The peripheral will pair (but not bond) with the smartphone
  • Pairing will require the smartphone user to enter a 6-digit passkey
  • Upon successful pairing, the passkey can be changed via the mobile application
  • A physical button on the peripheral will enable resetting the passkey to a default

Some questions:

  • Is it possible to implement this schema in nRF52840, s140, SDK15? If so, what are the required steps.
  • Does this schema provide MITM protection (assuming I change the passkey often)?

I know there are a lot of security and passkey relate questions out there, but I couldn't quite find the answers I needed. Thanks!

Parents Reply Children
  • Hi Sigurd,

    I implemented and working fine. Later I saw your post. Now I got confidence. 

    Hi Rana,

    I am not sure which example you are using. I am using nRF52832, SDK_15.3.0, S132 SoftDevice and Segger for flashing the image. I am using ‘ble_app_blinky’.

    One more change to be done

    1) In ble_evt_handler() You need to comment below case as it replies with "Pairing not supported".

         

    case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
    {
        // Pairing not supported
        err_code = sd_ble_gap_sec_params_reply(m_conn_handle,
                                               BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP,
                                               NULL,
                                               NULL);
        APP_ERROR_CHECK(err_code);
    }
    break;

    Thanks & Regards

    Vishnu Beema

  • Hi beemavishnu

    I was able to achieve paring with static passkey .

    The thing is u need to build the static passkey function before connection and paring function 

    As for bonding u can change its parameter to no bond or bond once 

Related