To see the overview of the ESP32 Bluetooth stack architecture, follow links below:
Example code for this API section is provided in bluetooth directory of ESP-IDF examples.
Several examples contain detailed description. To see them please follow links below: