Attributes

The ATT layer defines how data is stored and accessed in a GATT server’s database. Data is stored in a GATT server in the form of data structures called Attributes. Attributes are the data units that both the ATT and GATT layers understand. Attributes hold user data as well as metadata describing the attribute itself, its type, security permissions, etc. Data exchange occurring between ATT and GATT servers and clients is in the form of attributes. Attributes are organized in attribute tables, which we will cover in the next topic.

Attributes structure

An attribute consists of 4 blocks of data:

Data stored in a GATT Server as attributes
  • Handle: A 16-bit unique index to a specific attribute in the attribute table in a specific GATT server. An attribute is addressed via its handle. You can think of it as the row number in the attribute table, although handles are not necessarily sequential.
  • Type/UUID: 16-bit Universal Unique Identifier, which refers to the attribute type. For example if this attribute declares a characteristic, this will be reflected in its Type field as it will hold a unique UUID used specifically to indicate declaring a characteristic.
  • Permissions: The security level required (authorization) to handle that attribute, in addition to indicating whether it’s a readable attribute, writeable, both, or non.
  • Value: The actual user data (ex: sensor reading) stored in the attribute. This field accepts any data type. It can hold a hear rate monitor value (beats per minute), a temperature reading, or even a string. However, it can also hold information about another attribute as we will see in subsequent topics.
Register an account
Already have an account? Log in
(All fields are required unless specified optional)

  • 8 or more characters
  • Upper and lower case letters
  • At least one number or special character

Forgot your password?
Enter the email associated with your account, and we will send you a link to reset your password.