Difference between attributes and services in BLE

12.5k Views Asked by At

I would like to know what is the difference between attributes and service in GATT in BLE specification, and where we can find attributes, are they in service, characteristics or in descriptors?

1

There are 1 best solutions below

1
On BEST ANSWER

In summary ... services, characteristics, and descriptors ... are attributes :-)

The BLE standard provides the ATT protocol that defines the concept of attributes. All attributes are defined inside a table and they have a handle, a type (with a UUID), a value (and permissions). On top of ATT protocol in the BLE stack, you have GATT and GAP. The GATT protocol defines services, characteristics, and descriptors and each of them is an attribute. For example, a characteristic is an attribute with a handle, a type (a UUID that tells us that the attribute is a characteristic) and a value (the characteristic properties with a handle to the attribute value and so on). Inside the characteristic, you have an attribute that is the value of the characteristic and one or more descriptors that are themselves attributes.

You can see the attribute concept as the abstract type you can define concrete types like service, characteristic and descriptors.

I can suggest seeing the following video (intro on BLE) by Nordic.