I'm trying to get the GAP Bond Manger to work in the Host Test Example using SPI.
I have added gapbondmgr.h to the project which uses the functions defined in the ICallBleAPI.c
example: GAPBondMgr_SetParameter()
I added the following code in the HostTestApp_init() function to setup the GAP Bond Manger:
// Setup the GAP Bond Manager
{
uint32_t passkey = 0; // passkey "000000"
uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8_t mitm = TRUE;
uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8_t bonding = TRUE;
GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t),
&passkey);
GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);
GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);
}
The CC2640 Software Developer's Guide mentions that the function callbacks for the GAP Bond Manger needs to be called after the GAP Role Profile has been started as shown below.
// Start the Device
VOID GAPRole_StartDevice(&SimpleBLEPeripheral_gapRoleCBs);
// Start Bond Manager
VOID GAPBondMgr_Register(&simpleBLEPeripheral_BondMgrCBs);
How do I do this if the External MCU initializes the GAP Profile using the GAP Device Initialization Command (0xFE00) TI HCI commands?
Won't the TI BLE Stack handle the GAP Device Initialization Command (0xFE00) and respond back to the External MCU without notifying the Host Test application?