Bluetooth issues with Espressif ESP32

I'm working with an Espressif ESP32-C5 device. The firmware on the device is based on Espressif's base software, which provides Wifi provisioning services via Bluetooth. My firmware also provides its own Bluetooth services too.

When the Espressif part of the firmware connects to Wifi, it re-initializes the entire Bluetooth stack, eliminating all of its own services. Mine get added back, but my app starts failing and doing weird things at this point. I believe it is due to iOS caching the GATT configuration and not recognizing that it has changed.

If I restart my phone, the problem is cleared. But this is not a good solution to the problem.

I need a way to let iOS know that it should clear any cached information related to this device. How can I do that?

Bluetooth issues with Espressif ESP32
 
 
Q