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
Ways to remove ble bonding Info
Re: Ways to remove ble bonding Info
This info is stored in the nvs flash
try bta_gattc_co_cache_reset() https://github.com/espressif/esp-idf/se ... eset&type=
try bta_gattc_co_cache_reset() https://github.com/espressif/esp-idf/se ... eset&type=
Re: Ways to remove ble bonding Info
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..)?
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
https://github.com/espressif/esp-idf/bl ... pi.h#L1164
https://github.com/espressif/esp-idf/bl ... emo.c#L273
This example shows how to remove all bonds
https://github.com/espressif/esp-idf/bl ... emo.c#L273
This example shows how to remove all bonds
Re: Ways to remove ble bonding Info
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 ???
}
-------------------------------------------------
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 305 guests