68
SWRU271H–October 2010–Revised April 2019
Submit Documentation Feedback
Copyright © 2010–2019, Texas Instruments Incorporated
Creating a Custom Bluetooth Low Energy Application
Chapter 7
SWRU271H–October 2010–Revised April 2019
Creating a Custom Bluetooth Low Energy Application
7.1 Overview
After reading the preceding sections, you should understand the general system architecture, application,
Bluetooth Low Energy stack framework to implement a custom Bluetooth Low Energy application. This
following section provides guidance on where and how to start writing a custom application and some
considerations.
7.2 Configuring the Bluetooth Low Energy Stack
You must decide which role and purpose the custom application should have. If the application is related
to a specific service or profile, start with one of those. An example application includes the heart rate
sensor project. TI recommends starting with one of the following SimpleBLE sample projects:
• SimpleBLECentral
• SimpleBLEPeripheral
• SimpleBLEBroadcaster
• SimpleBLEObserver
When deciding the role and purpose of the application, choose from the appropriate libraries in
Section 5.8.
7.3 Define Bluetooth Low Energy Behavior
Use the Bluetooth Low Energy protocol stack APIs to define the system behavior such as adding profiles,
defining the GATT database, configuring the security model, and so forth. Use the concepts in Chapter 5
and the Bluetooth Low Energy API reference in the appendices A through G of this guide.
7.4 Define Application Tasks
Ensure the application contains callbacks from the various stack layers and event handlers to process
OSAL messages. You can add other tasks by following the guidelines in Chapter 3.
7.5 Configure Hardware Peripherals
Add drivers as specified in Chapter 6. If drivers do not exist for a given peripheral, create a custom driver.
7.6 Configuring Parameters for Custom Hardware
You must adjust several software parameters when working with custom hardware.
7.6.1 Board File
You can find the board file (hal_board_cfg.h) in the sample projects by doing the following:
1. Click HAL.
2. Click Target.
3. Click CC2540EB.
4. Click Config.