A GATT Server contains data organized in the form of attributes. An attribute is a piece of labeled, addressable data; or metadata about the attribute:
- Contained within the Server
- Accessed by the Client
An attribute has the following structure:
Attribute Handle
The Attribute Handle is a unique 16-bit identifier:
- Makes the attribute "addressable"
- Does not change
Handle values grow in an ordered sequence on a server (gaps are allowed) and are discovered by the Client during a Discovery Procedure.
Attribute Type (Universally Unique Identifier (UUID))
The Attribute Type determines the kind of data present in the value of the attribute and uses a 2-byte or 16-byte UUID. Examples include:
- Service UUID
- Characteristic UUID
- Profile UUID
- Vendor-Specified UUID
Attribute Value
The Attribute Value holds the actual data content, which is accessible by a Client. It can also hold metadata about the attribute (depending on the type).
There are no restrictions on the type of data it can contain. However, the maximum length is limited to 512 bytes by the BLE specification
Attribute Permissions
Attribute Permissions are attribute metadata that specify:
- ATT access operations allowed on the Attribute Value
- Read Operations
- Write Operations
- No Operations
- Security requirements
- Encryption (level required)
- Authorization required (Yes/No)