Understanding BLE basics
The fastest track to understand how BLE works is to look at its architecture diagram:
The architecture contains two major sections ā Controller and Host. The controller section manages the radio and the host section implements the stack providing an interface for applications. Therefore, it is possible to design a device with an application processor and a Bluetooth network co-processor separately or to use a single system-on-chip (SoC) having the Bluetooth radio embedded in it. ESP32 falls into the second category.
On the host side, ESP32 uses Bluedroid as the default Bluetooth host. The Bluedroid stack is an open source implementation of the Bluetooth standard for Android devices imported into ESP-IDF. Let's have a quick look at the host-level functionality that we need while developing applications.
The Generic Access Profile
Generic Access Profile (GAP) defines...