GAPRole Task
www.ti.com
32
SWRU271H–October 2010–Revised April 2019
Submit Documentation Feedback
Copyright © 2010–2019, Texas Instruments Incorporated
The Bluetooth Low Energy Protocol Stack
5.3 GAPRole Task
As in Section 3.2, the GAPRole task is a separate task (GAPRole_ProcessEvent) that simplifies the
application by handling most of the GAP layer functionality. This task is enabled and configured by the
application during initialization. Based on this configuration, many Bluetooth Low Energy protocol stack
events are handled directly by the GAPRole task and never passed to the application. Callbacks exist that
the application can register with the GAPRole task. This registration notifies the GAPRole task of certain
events. For peripheral events or Section C.3.2 for central events, see Section B.3.1.
Based on the configuration of the device, the GAP layer operates in one of the following four roles:
• Broadcaster – an advertiser that is nonconnectable
• Observer – scans for advertisements but cannot initiate connections
• Peripheral – an advertiser that is connectable and operates as a slave in a single link-layer connection
• Central – scans for advertisements and initiates connections and operates as a master in a single or
multiple link-layer connections (The Bluetooth Low Energy central protocol stack supports up to three
simultaneous connections.)
The Bluetooth Low Energy specification supports certain combinations of roles supported by the Bluetooth
Low Energy protocol stack. The CC254x does not support simultaneous peripheral and central device
roles. This functionality is supported by the CC2640. The peripheral and central roles are described in the
following sections.
5.3.1 Peripheral Role
The peripheral GAPRole task is defined in peripheral.c and peripheral.h. For descriptions of the full API
including commands, configurable parameters, events, and callbacks, see Appendix B.
The general steps to use this module are the following:
1. Initialize the GAPRole parameters, see Section B.2. Do this initialization in the application initialization
function (that is, SimpleBLEPeripheral_init()).