BLE Server Demonstration using FSCI application with Test Tool

cancel
Showing results for 
Search instead for 
Did you mean: 

BLE Server Demonstration using FSCI application with Test Tool

No ratings

BLE Server Demonstration using FSCI application with Test Tool

This post covers the below details.

  • Introduction to Framework Serial Communication Interface (FSCI).
  • BLE Server.
  • Useful Commands to create a GATT database.
  • Demonstrate the heart rate sensor profile using the FSCI black box application with Test Tool.

Framework Serial Communication Interface

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.

System Overview.PNG

 Figure 1. System Overview

  1. The Host Processor (Application layer and control for Connectivity Stack)
  2. The Black Box application (APIs to interact with the Connectivity Stack)

The below figure illustrates Interfacing between the host processor and black box application.

Protocol stack separation.PNG

 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.

FSCI based Application Structure.PNG

 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 Server

Bluetooth Low Energy allows exchange of information using the Generic Attribute Profile (GATT), GATT defines below two roles:

  1. Server: Device that stores the information.
  2. Client: Device that request for information from the server.

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.

  1. Static database: MACROs are used to add services, characteristics, etc.
  2. Dynamic database: APIs are used to add services, characteristics, etc. It is useful when runtime database update is required. This is the approach used by FSCI for the management of GATT databases.

The below figure shows an example of database hierarchy.

GATT Database.png

 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.

Useful commands to create GATT 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.

Attachments
Version history
Revision #:
1 of 1
Last update:
‎12-03-2020 11:50 AM
Updated by:
 
Contributors