Hardware Reference
In-Depth Information
Additional GAP Definitions
On top of all the roles, modes, and procedures, GAP also introduces two additional
items that are relevant to the interests of application developers.
Advertising Data Format
So far, we have been talking about the user data that can be carried by advertising (and
scan response) packets, but we have not mentioned the format in which this data must
be populated. The generic container is defined in the core specification in GAP, and it
simply consists of a sequence of data structures, each of which is made of length (1 byte),
AD Type (Advertising Data Type, 1 byte), and the actual data (variable length). Each
structure contains a separate item of user data.
The complete list of allowed AD Types is available in the Core Specification Supplement
(CSS, currently at version 4) at the Bluetooth SIG's Specification Adopted Documents
page . Table 3-3 describes the most commonly used AD Types in typical application
development. This list isn't exhaustive, though, so you might want to explore AD Types
further for more detailed information.
Table 3-3. AD Types
Name
Actual data
length in bytes
Description
Flags
1 (extendable)
Used to set limited or general discovery mode, as described in “Discovery” on
page 39
Local Name
variable
Partial or complete user-readable local name in UTF-8
Appearance
2
A 16-bit value describing the type of device sending the advertising packet
TX Power Level
1
The power level in dBm used to transmit the advertising packet, useful to
calculate path loss at the observer or central end
Service UUID
variable
A complete or partial list of GATT services offered by the device sending the
packet (as a GATT server)
Slave Connection
Interval Range
4
A suggestion to the central about the connection interval range that best fits
this peripheral
Service Solicitation
variable
A list of GATT services supported by the device sending the packet (as a GATT
client)
Service Data
variable
A UUID representing a GATT service and its associated data
Manufacturer Specific
Data
variable
Freely formattable data, to be used at the discretion of the implementation
Not all AD Types are useful in every situation, and the 31-byte advertising packet and
scan reponse size limits how many AD Types you can include, but it's important to
understand what types of information are available and which fields are relevant in
 
Search WWH ::




Custom Search