mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-01 04:20:33 +00:00
doc: check gatt client profile
This commit is contained in:
parent
e99e41f0b9
commit
0b27d9d1e2
@ -355,28 +355,27 @@ or both GATT roles.
|
|||||||
|
|
||||||
### GATT Client {#sec:GATTClientProfiles}
|
### GATT Client {#sec:GATTClientProfiles}
|
||||||
|
|
||||||
The GATT Client is used to discover services, and their characteristics
|
The GATT Client is used to discover services, characteristics
|
||||||
and descriptors on a peer device. It can also subscribe for
|
and their descriptors on a peer device. It allows to subscribe for
|
||||||
notifications or indications that the characteristic on the GATT server
|
notifications or indications that the characteristic on the GATT server
|
||||||
has changed its value.
|
has changed its value.
|
||||||
|
|
||||||
To perform GATT queries, provides a rich interface. Before calling
|
To perform GATT queries, it provides a rich interface. Before calling
|
||||||
queries, the GATT client must be initialized with *gatt_client_init*
|
queries, the GATT client must be initialized with *gatt_client_init*
|
||||||
once.
|
once.
|
||||||
|
|
||||||
To allow for modular profile implementations, GATT client can be used
|
To allow for modular profile implementations, GATT client can be used
|
||||||
independently by multiple entities.
|
independently by multiple entities.
|
||||||
|
|
||||||
To use it by a GATT client, you register a packet handler with
|
|
||||||
*gatt_client_register_packet_ handler*. The return value of that is
|
|
||||||
a GATT client ID which has to be provided in all queries.
|
|
||||||
|
|
||||||
After an LE connection was created using the GAP LE API, you can query
|
After an LE connection was created using the GAP LE API, you can query
|
||||||
for the connection MTU with *gatt_client_get_mtu*.
|
for the connection MTU with *gatt_client_get_mtu*.
|
||||||
|
|
||||||
GATT queries cannot be interleaved. Therefore, you can check if you can
|
Multiple GATT queries to the same GATT Server cannot be interleaved.
|
||||||
perform a GATT query on a particular connection using
|
Therefore, you can either use a state machine or similar to perform the
|
||||||
*gatt_client_is_ready*. As a result to a GATT query, zero to many
|
queries in sequence, or you can check if you can perform a GATT query
|
||||||
|
on a particular connection right now using
|
||||||
|
*gatt_client_is_ready*, and retry later if it is not ready.
|
||||||
|
As a result to a GATT query, zero to many
|
||||||
*le_event*s are returned before a *GATT_EVENT_QUERY_COMPLETE* event
|
*le_event*s are returned before a *GATT_EVENT_QUERY_COMPLETE* event
|
||||||
completes the query.
|
completes the query.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user