Refresh server service cache.
Posted: Fri Aug 14, 2020 3:24 am
Hello,
I have use esp32 with Arduino IDE and Neil Kolban esp32 BLE_Client example.
I have a server with hidden UUID that needs to write a byte to other UUIDs to activate.
For my code, I can write and activate the UUID but its need to refresh service and characteristic UUID to receive new UUID
but I'm stuck with
[Codebox] esp_ble_gattc_cache_refresh((uint8_t*)bleClient->getPeerAddress().getNative()); [/Codebox]
It seems to do nothing so I need to reset the device to receive a new list of UUID.
Anyone have an idea to refresh the server or to retrieve a new list of UUID without reset device.
I have write a value to custom UUID to activate hidden UUID and refresh it so the program can see new characteristic UUID.
After I write to UUID I've call this API to refresh GATT service cache
`esp_err_t errRc = esp_ble_gattc_cache_refresh(*getPeerAddress().getNative());
if (errRc != ESP_OK) {
log_e("esp_ble_gattc_open: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
return false;
}
else return true;`
this function returns True but There's no new characteristic found
I have use esp32 with Arduino IDE and Neil Kolban esp32 BLE_Client example.
I have a server with hidden UUID that needs to write a byte to other UUIDs to activate.
For my code, I can write and activate the UUID but its need to refresh service and characteristic UUID to receive new UUID
but I'm stuck with
[Codebox] esp_ble_gattc_cache_refresh((uint8_t*)bleClient->getPeerAddress().getNative()); [/Codebox]
It seems to do nothing so I need to reset the device to receive a new list of UUID.
Anyone have an idea to refresh the server or to retrieve a new list of UUID without reset device.
I have write a value to custom UUID to activate hidden UUID and refresh it so the program can see new characteristic UUID.
After I write to UUID I've call this API to refresh GATT service cache
`esp_err_t errRc = esp_ble_gattc_cache_refresh(*getPeerAddress().getNative());
if (errRc != ESP_OK) {
log_e("esp_ble_gattc_open: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
return false;
}
else return true;`
this function returns True but There's no new characteristic found