01 Overview
This example demonstrates the ESP32 as a BLE GATT client (Central): scanning for BLE peripherals, filtering by name or service UUID, establishing a connection, discovering services, enabling notifications, and continuously receiving data.
Typical use case is an IoT gateway: the ESP32 collects data from multiple low-power sensors (e.g., temperature/humidity, heart rate, fitness bands) and uploads it to the cloud via Wi-Fi or Ethernet.
Unlike the GATT Server example, the ESP32 actively initiates connections rather than waiting to be connected. If your product requires a phone to connect directly to the ESP32, use Server mode instead.
The example is based on the Bluedroid stack, suitable for complex GATT operations. For low-power or simpler connections, consider NimBLE or ESP-BLE-MESH.
This example does not cover specific sensor protocols; it provides a generic GATT client framework. Actual products must customize service discovery and data parsing according to the sensor's datasheet.