Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
90
Ver.1.0.0
3.3.2.3 Master Updates Connection Parameters in Link Layer
After Master responds with “conn para update rsp” to accept the “conn para update req”
from Slave, Master will send a “LL_CONNECTION_UPDATE_REQ” command in Link
Layer.
Figure 3-28 BLE Sniffer Packet Sample: ll conn update req
Slave will mark the final parameter as the instant value of Master after it receives the
update request. When the instant value of Slave reaches this value, connection
parameters are updated, and the callback of the event
“BLT_EV_FLAG_CONN_PARA_UPDATE” is triggered.
The “instant” indicates connection event count value maintained by Master and Slave,
and it ranges from 0x0000 to 0xffff. During a connection, Master and Slave should always
ha
ve consistent “instant” value. When Master sends “conn_req” and establishes
connection with Slave, Master switches state from scanning to connection, and clears the
“instant” of Master to “0”. When Slave receives the “conn_req”, it switches state from
adve
rtising to connection, and clears the instant of Slave to “0”. Each connection packet
of Master and Slave is a connection event. For the first connection event after the
“conn_req”, the instant value is “1”; for the second connection event, the instant value is
2, and so on.
When Master sends a “LL_CONNECTION_UPDATE_REQ”, the final parameter “instant”
indicates during the connection event marked with “instant”, Master will use the values
corresponding to the former connection parameters of the
“LL_CONNECTION_UPDATE_REQ” packet. After the
“LL_CONNECTION_UPDATE_REQ” is received, the new connection parameters will be
used during the connection event when the instant of Slave equals the declared instant of
Master, thus Slave and Master can finish switch of connection parameters
synchronously.
3.4 ATT & GATT
3.4.1 GATT
Basic Unit “Attribute”
GATT defines two roles: Server and Client. In 826x BLE SDK, Slave is Server, and
corresponding Android/iOS device is Client. Server needs to supply multiple Services for
Client to access.
Each Service of GATT consists of multiple Attributes, and each Attribute contains certain
information.