Our goal is to make our developer readers aware of GATT. Previously, we have discussed about Bluetooth, iBeacon and some theories on Internet of Things (IoT) such as Communication Standards for Wearable Computing, Influence of the Internet of Things (IoT) on Retail which eventually talked around the topic Bluetooth LE.
“GATT Services are collections of characteristics and relationships to other services that encapsulate the behaviour of a part of a device.” (by bluetooth.com
). The GATT protocol provides some commands for using in the client-server model.
GATT is the way to define how two Bluetooth Low Energy devices will transfer data using Services and Characteristics. GATT uses Attribute Protocol (ATT) to store Services, Characteristics as 16-bit IDs. GATT works when a dedicated connection has been established between two devices. Only one BLE peripheral only be connected to one central device at a time making the connections exclusive and avoiding confusion. GATT offers notifications and indications. So a client may request a notification from the server avoiding the need to poll the server which would need to be constantly operational.
---
Characteristics are the main thing to understand when are interacting our BLE peripherals. They can be used to send data to the BLE peripheral. We can implement a UART-type interface for the TX and the RX channels.
We do not need to learn a huge theory of GATT for working with ESP32, yet we must make our basics clear. Extensive information on GATT can be read from the official website for the developers :
1 2 3 | # https://www.bluetooth.com/specifications/gatt/services/ # |
Those who will use ESP32 avoiding Arduino IDE, they will find the documentation useful :
1 2 3 | # https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/bluetooth/esp_gatts.html # |
To work with ESP32 Arduino, you can use the Android App named “nRF Connect for Mobile”. It is the standard app used for BLE development. Neil Kolban extensively worked behind ESP32 Arduino BLE libraries. I am not going more deeper into ESP32 topic but our actual intention of writing this article is ESP32 development.
Tagged With gatt profile , what is the gatt , gatt attribute , Gatt profile ble benefit , hwhat is the gatt pro , The handle to the Bluetooth LE GATT profile attributes , what is ble gat profile , what is GATT on my computer