SWRU271I October 2010 – January 2020 CC2540 , CC2540T , CC2541 , CC2541-Q1 , CC2640R2F
The GAPBondMgr implements most of the functions in the overview. This section describes what the application must do to configure, start, and use the GAPBondMgr. The GAPRole also handles some of the functionality of the GAPBondMgr. The GAPBondMgr is defined in gapbondmgr.c. gapbondmgr.h. describes the API including commands, configurable parameters, events, and callbacks. The steps to use this module are as follows. The SimpleBLECentral project is the example because it uses the callback functions from the GAPBondMgr.
The GAPBondMgr is configured and operates autonomously. When a connection is established, the GAPBondMgr initiates pairing and bonding depending on the configuration parameters from Step 1. You can set a few parameters asynchronously such as GAPBOND_ERASE_ALLBONDS. All communication between the GAPBondMgr and the application occurs through the callbacks that were registered in Step 2. The following is a flow diagram example from SimpleBLECentral of the GAPBondMgr, notifying the application that pairing has started. The following sections expand on these callbacks.