[][src]Module rubble::att

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 (AttHandle) 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

TODO: Figure out how the hell this works and write it down in human-readable form.

Structs

AttError

An error on the ATT protocol layer. Can be sent as a response.

AttHandle

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

AttPermission

Permissions associated with an attribute

Attribute

An ATT server attribute

AttributeServer

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

ByGroupAttData

Attribute Data returned in Read By Group Type response.

ByTypeAttData

Attribute Data returned in Read By Type response.

NoAttributes

An empty attribute set.

Enums

AccessPermission
AttUuid

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

AuthenticationPermission
AuthorizationPermission
EncryptionPermission
ErrorCode

Error codes that can be sent from the ATT server to the client in response to a request.

Traits

AttributeProvider

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