GATT profiles are a way of communication between the central Bluetooth and a peripheral device. Suppose I have an application that reads temperature from a sensor. My current setup is that the phone acts as a central, sensor attached to the bluetooth LE chip, as a peripheral.
So, I am communicating with the bluetooth LE chip using this profile. In the GATT profile declaration in the chip, I will define the service and two characteristics. Two characteristics:
- Sensor Protection
- Temperature value
The sensor has read and write permissions, while the temperature has only read permission.
So, in your application, when you want to read the temperature value, first write 0x01 to the enabler characteristic, and then read the value from the temperature value.
To define features and services, bluetooth has the concept of UUID and pens. UUIDs are globally unique, and pens are assigned to the chip.
Services include all the available features. So, in the hierarchy, you have profiles that can have several services, which, in turn, can have several characteristics.
To explain everything in the answer would be too much. Why don't you learn the basic concepts here ? I found these documents really useful.
source share