Hardware Reference
In-Depth Information
discovery, it can then start reading and writing attributes found in the server, as
well as receiving server-initiated updates.
Server
The GATT server corresponds to the ATT server discussed in “Attribute Protocol
(ATT)” on page 26 . It receives requests from a client and sends responses back. It
also sends server-initiated updates when configured to do so, and it is the role
responsible for storing and making the user data available to the client, organized
in attributes. Every BLE device sold must include at least a basic GATT server that
can respond to client requests, even if only to return an error response.
It is worth mentioning once more that GATT roles are both completely independent of
GAP roles (see “Roles” on page 36 ) and also concurrently compatible with each other.
That means that both a GAP central and a GAP peripheral can act as a GATT client or
server, or even act as both at the same time.
UUIDs
A universally unique identifier (UUID) is a 128-bit (16 bytes) number that is guaranteed
(or has a high probability) to be globally unique. UUIDs are used in many protocols
and applications other than Bluetooth, and their format, usage, and generation is speci‐
fied in ITU-T Rec. X.667 , alternatively known as ISO/IEC 9834-8:2005 .
For efficiency, and because 16 bytes would take a large chunk of the 27-byte data payload
length of the Link Layer, the BLE specification adds two additional UUID formats: 16-
bit and 32-bit UUIDs. These shortened formats can be used only with UUIDs that are
defined in the Bluetooth specification (i.e., that are listed by the Bluetooth SIG as stan‐
dard Bluetooth UUIDs).
To reconstruct the full 128-bit UUID from the shortened version, insert the 16- or 32-
bit short value (indicated by xxxxxxxx , including leading zeros) into the Bluetooth Base
UUID:
xxxxxxxx-0000-1000-8000-00805F9B34FB
The SIG provides (shortened) UUIDs for all the types, services, and profiles that it
defines and specifies. But if your application needs its own, either because the ones
offered by the SIG do not cover your requirements or because you want to implement
a new use case not previously considered in the profile specifications, you can generate
them using the ITU's UUID generation page .
Shortening is not available for UUIDs that are not derived from the Bluetooth Base
UUID (commonly called vendor-specific UUIDs ). In these cases, you'll need to use the
full 128-bit UUID value at all times.
Search WWH ::




Custom Search