Page 1 of 1

Ways to remove ble bonding Info

Posted: Mon May 21, 2018 8:04 am
by chapman
I want to know is there any ways to remove the ble bonding info on GATT client.

By using the GATT security client example, a esp32 GATT client can successfully bond to a ble GATT server device.
However, once the GATT server device is 's bonding information is removed by some means (e.g. factory reset), the esp gatt client cannot bond again this device even the following api is called:

esp_ble_set_encryption(param->open.remote_bda, ESP_BLE_SEC_ENCRYPT);
No pairing response can be obtained later.

Maybe the old bonding information for that device in the esp32 gatt client is still keeping at some where, so that the device cannot be bonded.

So my question is : how can we remove the ble bonding information in ESP GATT client?
or is there any way to initiate the bonding even old bonding info is existed?

Thank you

Re: Ways to remove ble bonding Info

Posted: Mon Jun 04, 2018 7:59 am
by f.h-f.s.
This info is stored in the nvs flash

try bta_gattc_co_cache_reset() https://github.com/espressif/esp-idf/se ... eset&type=

Re: Ways to remove ble bonding Info

Posted: Sun Nov 25, 2018 7:54 am
by yotamkes
Hi, I have almost the same problem, please help!

The esp32 GATT client can successfully bond to a ble GATT server device.
- Its successfully reconnects after devices out of range, reboot GATT server device and reboot esp32 GATT client.

However, once the GATT server device is 's bonding information is removed by some means (e.g. factory reset), the esp GATT client can bond again this device, but:
- its fail to reconnect after rebooting esp32 GATT client. (out of range reconnect work and reconnect after reboot GATT server device also work.

I tried to delete the pairing info of the GATT server device by using bta_gattc_co_cache_reset(bda) each time I got pairing request (case ESP_GATTS_CONNECT_EVT:) and its not worked.

Its looks like that the bda of the GATT server device is changed after factory reset, and because of that its fails.

Any ideas how to delete the pairing info of the GATT server device (before factory reset pairing info..)?

Re: Ways to remove ble bonding Info

Posted: Mon Nov 26, 2018 1:41 pm
by f.h-f.s.