Hardware Reference
In-Depth Information
Attribute Protocol (ATT)
The Attribute Protocol (ATT) is a simple client/server stateless protocol based on at‐
tributes presented by a device. In BLE, each device is a client, a server, or both, irre‐
spective of whether it's a master or slave. A client requests data from a server, and a
server sends data to clients. The protocol is strict when it comes to its sequencing: if a
request is still pending (no response for it has been yet received) no further requests
can be sent until the response is received and processed. This applies to both directions
independently in the case where two peers are acting both as a client and server.
Each server contains data organized in the form of attributes, each of which is assigned
a 16-bit attribute handle, a universally unique identifier (UUID), a set of permissions,
and finally, of course, a value. The attribute handle is simply an identifier used to access
an attribute value. The UUID specifies the type and nature of the data contained in the
value. For more information, see “UUIDs” on page 52 and “Attributes” on page 53 .
When a client wants to read or write attribute values from or to a server, it issues a read
or write request to the server with the handle. The server will respond with the attribute
value or an acknowledgement. In the case of a read operation, it is up to the client to
parse the value and understand the data type based on the UUID of the attribute. On
the other hand, during a write operation, the client is expected to provide data that is
consistent with the attribute type and the server is free to reject the operation if that is
not the case.
ATT operations
The set of operations possible over ATT fall within the following categories:
Error Handling
Used by the server to respond to any of the requests when an error occurs, this
includes only:
Error Response
Sent as a response to a request in lieu of the corresponding operation response
whenever an error prevented the request from being executed on the server.
Server Configuration
Used to configure the ATT protocol itself, this includes only:
Exchange MTU Request/Response
Exchange between client and server of their respective Maximum Transmission
Units (MTU or maximum packet size accepted).
Find Information
Used by the client to obtain information about the layout of the server's attributes,
they include:
Search WWH ::




Custom Search