Ways to remove ble bonding Info

chapman
Posts: 2
Joined: Mon May 21, 2018 7:51 am

Ways to remove ble bonding Info

Postby chapman » Mon May 21, 2018 8:04 am

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

f.h-f.s.
Posts: 215
Joined: Thu Dec 08, 2016 2:53 pm

Re: Ways to remove ble bonding Info

Postby f.h-f.s. » Mon Jun 04, 2018 7:59 am

This info is stored in the nvs flash

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

yotamkes
Posts: 1
Joined: Sun Nov 25, 2018 6:59 am

Re: Ways to remove ble bonding Info

Postby yotamkes » Sun Nov 25, 2018 7:54 am

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..)?

f.h-f.s.
Posts: 215
Joined: Thu Dec 08, 2016 2:53 pm

Re: Ways to remove ble bonding Info

Postby f.h-f.s. » Mon Nov 26, 2018 1:41 pm


eliasi
Posts: 2
Joined: Thu Jul 18, 2019 11:57 am

Re: Ways to remove ble bonding Info

Postby eliasi » Thu Jul 25, 2019 11:20 am

Hello
Is there a way to remove the ble bonding info in ArduinoIDE ?
I have a little experience with esp32.
I want a short and complete example.
Thank you
--------------------------------------------------
//example my code//

content2 = Serial.readStringUntil('\r');
if (content2=="RRR"){

??? remove bonded devices ???

}

-------------------------------------------------

Who is online

Users browsing this forum: No registered users and 355 guests