Module rubble::att[][src]

Expand description

Implementation of the Attribute Protocol (ATT).

ATT always runs over L2CAP channel 0x0004, which is connected by default as soon as the Link-Layer connection is established.

ATT is used by GATT, the Generic Attribute Profile, which introduces the concept of Services and Characteristics which can all be accessed and discovered over the Attribute Protocol.

Attributes

The ATT server hosts a list of Attributes, which consist of the following:

  • A 16-bit Attribute Handle (Handle) uniquely identifying the attribute.
  • A 16- or 128-bit UUID identifying the attribute type. This provides information about how to interpret the attribute’s value (eg. as a little-endian 32-bit integer).
  • The attribute’s value, consisting of a dynamically-sized byte array of up to 512 Bytes.
  • A set of permissions, restricting the operations that can be performed on the attribute.

Attribute Grouping

The higher-level protocol layer using ATT (ie. GATT) may define a set of attribute types as Grouping Attributes. These attribute types are allowed for use in Read By Group Type requests, and can also influence the behavior of other requests (such as Find By Type Value).

All Grouping Attributes can be seen as the start of a group of attributes. Groups are formed by indicating the Group End Handle to the client, which is the handle of the last attribute in the group. The Group End Handle isn’t known by the ATT server and must be provided by the higher-level protocol (GATT).

Structs

An ATT server attribute

An Attribute Protocol server providing read and write access to stored attributes.

An ATT server handle that can send packets and initiate actions.

A 16-bit handle uniquely identifying an attribute on an ATT server.

A (de)serializable handle range that has been checked for validity.

An empty attribute set.

Enums

ATT protocol UUID (either a 16 or a 128-bit UUID).

Traits

Trait for attribute sets that can be hosted by an AttributeServer.