Page 1 of 1

Unable to set password in gatt_security_server example

Posted: Thu Aug 23, 2018 12:12 am
by Milan991
Hi everyone,

I want to implement BLE security using password authentication. My device don't have Display or Keyboard and I want to connect to it using Android. My idea is to enter six digit key on Android side which I manually set in ESP firmware.

For start I'm using gatt_security_server example from ESP-IDF and I can't find the way to manually set BLE password, every time ESP generates random six digit password.

Is there a way to set manual password and to disable random password generation in gatt_security_server example?

Thank you all for advises in advance.

Re: Unable to set password in gatt_security_server example

Posted: Fri Aug 24, 2018 10:35 am
by chegewara
There was request to add this feature and has been promised it will be added in v3.1 but i think it still is not implemented.

Re: Unable to set password in gatt_security_server example

Posted: Mon Aug 27, 2018 12:09 pm
by Milan991
Please let me know when it's added.

Thank you in advance.

Re: Unable to set password in gatt_security_server example

Posted: Tue Sep 11, 2018 11:44 pm
by Milan991
Solved in 892fc4a.

Re: Unable to set password in gatt_security_server example

Posted: Thu Sep 13, 2018 9:32 pm
by chegewara
Its nice feature but works only with 6 digit passkey.

EDIT For 5 digit or less passkey sometimes leading 0 is required.
https://github.com/espressif/esp-idf/is ... -421214524