BLE Pairing and security

Hi,

We would like to impelement Pairing and security features in our device. Our device will act as server in peripheral mode.  The cleint device should ask for 1 passkey which is ideependet for each of our device.

Could you please suggest which security mode we can approach?


Thanks,

Swapnil

Parents
  • Hi,

    I suggest you take a look at the Glucose Application. It supports LESC passkey pairing. You can use this implementation as a reference if you want to enable the same for another application.

    Also, you can add this to gap_init() if you want to set a static passkey:

        ble_opt_t ble_opt;
        uint8_t passkey[] = "123456";
    
        ble_opt.gap_opt.passkey.p_passkey = passkey;
        err_code = sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &ble_opt);
        APP_ERROR_CHECK(err_code);

    Best regards,

    Vidar

Reply
  • Hi,

    I suggest you take a look at the Glucose Application. It supports LESC passkey pairing. You can use this implementation as a reference if you want to enable the same for another application.

    Also, you can add this to gap_init() if you want to set a static passkey:

        ble_opt_t ble_opt;
        uint8_t passkey[] = "123456";
    
        ble_opt.gap_opt.passkey.p_passkey = passkey;
        err_code = sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &ble_opt);
        APP_ERROR_CHECK(err_code);

    Best regards,

    Vidar

Children
Related