the passkez in BLE security

awaisahmed
Posts: 20
Joined: Sat May 12, 2018 5:02 pm

the passkez in BLE security

Postby awaisahmed » Fri Aug 24, 2018 3:46 pm

Hi all
i am working with esp/idf example "gatt_security_server"

i have got the feature of pass key which is required to access the BLE device. following are mz questions

1. who is generating this passkey ? sometime it is 5 digit sometime 6 ? can i have my own passkey ? for paring the device ?
2, what is exactly happening in encryption of BLE ? SMP ?
3, to see the passkey i always need to monitor my device which is not good option for all the time. it is possible to define the passkey once for parring ?

thanks

chegewara
Posts: 1067
Joined: Wed Jun 14, 2017 9:00 pm

Re: the passkez in BLE security

Postby chegewara » Sat Aug 25, 2018 5:16 pm

1. SMP stack (usually on server) is generating passkey; when i studied bt specs some time ago ive read it should be 6 digit passkey, but it seems to be 5-6 digits; when server is keypad only and client device is display then client device SMP is generating passkey; but to be honest im not 100% certain
3. https://esp32.com/viewtopic.php?f=13&t=6877

or you can use bonding/pairing without passkey and during pairing add device to whitelisted, finally you can allow to connect only whitelisted devices. For example you will need just one gpio/button, when its high on esp32 startup then you will allow to connect and pair new device and when its low - connect only whitelisted.

bpfeiffer
Posts: 2
Joined: Wed Mar 27, 2019 6:26 am

Re: the passkez in BLE security

Postby bpfeiffer » Mon May 06, 2019 1:12 pm

chegewara wrote: or you can use bonding/pairing without passkey and during pairing add device to whitelisted, finally you can allow to connect only whitelisted devices. For example you will need just one gpio/button, when its high on esp32 startup then you will allow to connect and pair new device and when its low - connect only whitelisted.
Hi chegewara,

do you have an example for this? I'm trying something similar like this but on arduino platform.

greetz

Who is online

Users browsing this forum: No registered users and 44 guests