Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
47
Ver.1.0.0
Figure 3-4, solid arrows indicate data transfer controllable via user APIs, while hollow
arrows indicate data transfer within the protocol stack which users are unable to involve
in.
Controller can still communicate with Host (L2CAP layer) via HCI; however, the HCI is no
longer the sole interface, and the APP layer can directly transfer data with Link Layer of
the Controller. Power Manager (PM) is embedded in the Link Layer, and the APP layer
can invoke related PM interfaces to set power management.
The implementation of Generic Access Profile is deleted from the Host layer, only the
service declaration of the GAP profile is retained in the APP layer. Data transfer between
the APP layer and the Host is no longer controlled via GAP; the ATT, SMP and L2CAP
can directly communicate with the APP layer via corresponding interfaces.
Generic Attribute Profile (GATT) is implemented in the Host layer based on Attribute
Protocol. Various Profiles and Services can be defined in the APP layer based on GATT.
Basic Profiles including HIDS, BAS, and OTA are provided in 5316 BLE SDK demo code.
Based on this architecture the following provides a basic introduction of 5316 BLE
protocol stack and user APIs of each layer.
Physical Layer is totally controlled by Link Layer, and it does not involve any other layers.
Though HCI still implements part of data transfer between Host and Controller, it is
basically implemented by the protocol stack of Host and Controller with few involvement
of the APP layer. Users only need to register HCI data callback processing function in the
L2CAP layer.
3.2 BLE Controller
3.2.1 BLE Controller Introduction
BLE Controller contains Physical Layer, Link Layer, HCI and Power Management.
Telink BLE SDK fully assembles Physical Layer in the library (the rf_drv.c file in
corresponding driver file), while user does not need to learn about it. Power Management
will be introduced in detail in section
This section will focus on Link Layer, and also introduce HCI related interfaces to operate
Link Layer and obtain data of Link Layer.
3.2.2 Link Layer State Machine
The figure below shows Link Layer state machine in BLE Spec. Please refer to
Core_v5.0
(Vol 6/Part B/1.1
“LINK LAYER STATES”) for more information.