This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

How to implement the static PIN type pairing?

Hi, How to implement the static PIN type pairing, when the server device doesn't have keyboard or display? Our requirement is, Master will initiate the pairing process and device should ask for the PIN (6 digit static), when master enters the correct PIN then the connection should be established between the device and the master. Is there any sample application for server with keyboard only IO capability?

Regards, Balaji

Parents
  • With the latest softdevice www.nordicsemi.com/.../S110-SoftDevice-v7.0 you will be able to set a static passkey.

    By using the API call sd_ble_opt_set() with the structure ble_gap_opt_passkey_t, then the passkey display event will come with the passkey you set.

    Code Sample:

    uint8_t passkey[] = "123456";
    ble_opt_t ble_opt;
    ble_opt.gap.passkey.p_passkey = &passkey[0];
    (void) sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &ble_opt);
    

    Use IO capability display in the sec params request.

Reply
  • With the latest softdevice www.nordicsemi.com/.../S110-SoftDevice-v7.0 you will be able to set a static passkey.

    By using the API call sd_ble_opt_set() with the structure ble_gap_opt_passkey_t, then the passkey display event will come with the passkey you set.

    Code Sample:

    uint8_t passkey[] = "123456";
    ble_opt_t ble_opt;
    ble_opt.gap.passkey.p_passkey = &passkey[0];
    (void) sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &ble_opt);
    

    Use IO capability display in the sec params request.

Children
Related