hardware: CC2650EM_7ID
My application need Simple Profile Characteristic 4 work in GATT_PROP_INDICATE, my modify is following:
1. simplelink/ble_cc26xx_2_00_00_42893/Projects/ble/Profiles/SimpleProfile/CC26xx/simpleGATTprofile.c
static uint8 simpleProfileChar4Props = GATT_PROP_INDICATE;//GATT_PROP_NOTIFY;
2. in function simpleProfile_WriteAttrCB:
case GATT_CLIENT_CHAR_CFG_UUID:
status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len,
offset, GATT_CLIENT_CFG_INDICATE );
after lightBlue in ipad4 connected to simpleBLEPeripheral, click Listen for notifications of INDICATED VALUES of Characteristic 4。
then simpleBLEPeripheral crash 。
because simpleBLEPeripheral send data to lightBlue per 5 seconds in function SimpleBLEPeripheral_performPeriodicTask, SO when I comment the following code, simpleBLEPeripheral do not crash,but lightBlue can't get indicate value.
SimpleProfile_SetParameter:
case SIMPLEPROFILE_CHAR4:
if ( len == sizeof ( uint8 ) )
{
simpleProfileChar4 = *((uint8*)value);
// See if Notification has been enabled
#if 0
GATTServApp_ProcessCharCfg( simpleProfileChar4Config, &simpleProfileChar4, FALSE,
simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ),
INVALID_TASK_ID, simpleProfile_ReadAttrCB );
#endif
}
OR
simplelink/ble_cc26xx_2_00_00_42893/Projects/ble/Profiles/GATT/gattservapp_util.c
if ( pItem->value & GATT_CLIENT_CFG_INDICATE )
{
#if 0
status |= gattServApp_SendNotiInd( pItem->connHandle, GATT_CLIENT_CFG_INDICATE,
authenticated, pAttr, taskId, pfnReadAttrCB );
#endif
}
I can't find the reson of this crash , the code is seem that have no error。
where is reson of crash , is this bug of simpleBlePeripheral code ?