This post covers the below details.
The Framework Serial Communication Interface (FSCI) is a software module and a protocol that supports interfacing the Protocol Host Stack (i.e. BLE, Thread, and ZigBee) with a host or a PC tool (Test Tool for Connectivity Products) using a serial communication interface (e.g. UART, USB, SPI, and I2C). The below figure shows interaction between different layers.
Figure 1. System Overview
The below figure illustrates Interfacing between the host processor and black box application.
Figure 2. Protocol stack separation
The Test Tool software for the connectivity products is an example of a host processor that can communicate with FSCI black boxes at various layers. The figure below shows FSCI based application structure.
Figure 3. FSCI based Application Structure
The FSCI module executes in the context of the Serial Manager task. For more details regarding FSCI and Serial Manager module refer to the ‘Connectivity Framework Reference Manual.pdf’ document available inside SDK Documentation at location <SDK_Documentation\docs\wireless\Common>.
The detailed description of the Bluetooth Low Energy Host Stack serial commands, communication packet structure, and usage of the Framework Serial Communication Interface is provided inside the ‘Bluetooth Low Energy Host Stack FSCI Reference Manual.pdf’ document available inside SDK Documentation at location <SDK_Documentation\docs\wireless\Bluetooth>.
The detail about FSCI Host is described here. An example of FSCI based BLE temperature sensor application is described in AN12896.
Bluetooth Low Energy allows exchange of information using the Generic Attribute Profile (GATT), GATT defines below two roles:
Going forward, this post describes how to implement a BLE Server using the FSCI black box application with Test Tool.
The server device can implement the GATT Database using below two methods.
The below figure shows an example of database hierarchy.
Figure 4. GATT Database
Service: It is a set of information. i.e., sensor location, sensor read value, etc. Bluetooth SIG has defined universally unique identifier (UUID) for various services and characteristics. This UUID will be useful to add services and characteristics to the database. Heart Rate, Battery Information, Device Information are examples of the service.
Characteristic and value: It is the actual entity where information and its value are stored when the characteristic and value are added into the database. i.e., Device information service can have characteristics like manufacturer name, model string, Hardware version, etc.
Descriptor: It is used to provide additional information regarding the characteristic and its value, e.g. format, scale, unit, etc.
Client Characteristic Configuration Descriptor (CCCD): It is a descriptor used by the client device to enable or disable the notifications or indications.
When the specific component is added using GATT_DB APIs, the stack will assign a handle to that component to index it in the database.
FSCI provides a set of commands for the management of the GATT Database. The most used ones are described below.
Table 1 Some of the Basic GATT_DB Command
Command |
Description |
No. of Handle assigned |
GATTDBDynamic-AddPrimaryServiceDeclaration.Request |
To add the primary service. |
1 |
GATTDBDynamic-AddCharacteristicDeclarationAndValue.Request |
To add the characteristic and its value. It will be added as part of previously added service. |
2 |
GATTDBDynamic-AddCharacteristicDescriptor.Request |
To add the descriptor for the previously added characteristic. |
1 |
GATTDBDynamic-AddCccd.Request |
To add the CCCD for the previously added characteristic. |
1 |
The attached Test Tool macro file demonstrates steps and setup required to implement a Heart Rate Sensor profile. The steps to execute it are described in the attached lab guide.