Hi Gentlemen,
i want to pair my mobile(central) with peripheral device by entering passkey note: No input or display on peripheral device
suggest the method with sample codes if possible am using sdk 8.0.0 and nrf51dk
Hi Gentlemen,
i want to pair my mobile(central) with peripheral device by entering passkey note: No input or display on peripheral device
suggest the method with sample codes if possible am using sdk 8.0.0 and nrf51dk
Without any input or display capabilities on your peripheral, you're stuck using the "Just Works" authentication model, so the link keys are generated automatically as if you had entered a passkey of all zeroes. The link will still be encrypted to guard against casual eavesdropping, but the key used to encrypt it is trivially obtained by a determined attacker.
Your only other option is to use an out-of-band method to generate the link keys, which implies you use some alternative method of authentication, like an NFC tag.
Is there any example code for oob other than gls because its mitm ..?
see in our previous bluetooth connection initially we give default passkey 0000 then from mobile we can set some passkey so that oly that user can connect with the device . so is there any example like that ??
if my peripheral device doesnt have keyboard or display then only option is just work ?? is there any option like setting password from my mobile and accessing with that password only, am confused with many replies there in forum
Hi, You can set static passkey in peripheral and all central should be able to pair using this passkey. Here is an example,
{
uint8_t passkey[] = "123456";
ble_opt_t ble_opt;
ble_opt.gap_opt.passkey.p_passkey = &passkey[0];
(void) sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &ble_opt);
}
And also set, sec_param.io_caps = SEC_PARAM_IO_CAPABILITIES; sec_param.mitm = 1;