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

Passkey activation

Hello,

we try to use static passkey protection on our devices. we use nrf51 sdk12 with s130. We read a few threads for setting a static passkey like here, here and some other threads.. But we dont find any information or some routines for init and handle the passkey process, when connecting to a device. For example: where to put in the function sd_ble_opt_set() and where is the part in the code, where i can exactly activate the passkey is ON.

Our application: We want to connect with a smartphone as central to a peripheral nRF51 Hardware without display. This should be protected first with a static passkey we defined in main with the following code. We dont use MITM protection.

#define STATIC_PASSKEY        "111111"
uint8_t passkey[] =           STATIC_PASSKEY;
Parents
  • Hey Alex and Petter, sorry, but we dont get it.
    We tried different things.
    We took the ble_app_template example with 2 new Characteristics.
    In main:
    "#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_DISPLAY_ONLY"
    "#define STATIC_PASSKEY "111111"
    uint8_t passkey[] = STATIC_PASSKEY;

    in gap_params_init():
    err_code = sd_ble_gap_ppcp_set(&gap_conn_params);

    in our characteristic_add() for the secure characteristic:
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm);

    Now, when we are connected, we can see our characteristics. When we try to read out, there is the pin request. If i type in, the connection abort. There is no uart communication for mitm protection, so i think the static passkey is set correct!?

Reply
  • Hey Alex and Petter, sorry, but we dont get it.
    We tried different things.
    We took the ble_app_template example with 2 new Characteristics.
    In main:
    "#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_DISPLAY_ONLY"
    "#define STATIC_PASSKEY "111111"
    uint8_t passkey[] = STATIC_PASSKEY;

    in gap_params_init():
    err_code = sd_ble_gap_ppcp_set(&gap_conn_params);

    in our characteristic_add() for the secure characteristic:
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm);

    Now, when we are connected, we can see our characteristics. When we try to read out, there is the pin request. If i type in, the connection abort. There is no uart communication for mitm protection, so i think the static passkey is set correct!?

Children
No Data
Related