Hi:
I'm modifying multi-role demo project, and attend to use one characteristic to indicate data change. But it looks like that there are something wrong. I use Packet Sniffer captured the packet:
my code is as follows:
uint8_t test[] = "12345";
static attHandleValueInd_t ind;
void processSendReq(void)
{
uint8_t ret;
ind.pValue = test;
ind.len = 6;
//the code don't finish ,and only can communicate with the first device connected.
ret = simpleProfileIndicate(connHandleMap[0], &ind, selfEntity);
}
bStatus_t simpleProfileIndicate( uint16 connHandle, attHandleValueInd_t *pInd,uint8 taskId )
{
uint16 value = GATTServApp_ReadCharCfg( connHandle, wechatProfileChar2Config );
// If indications enabled
if ( value & GATT_CLIENT_CFG_INDICATE )
{
// Set the handle (uses stored relative handle to lookup actual handle)
pInd->handle = simpleProfileAttrTbl[WECHAT_CHAR2_VAL].handle;
// Send the Indication
return GATT_Indication( connHandle, pInd, FALSE, taskId );
}
return bleIncorrectMode;
}
So, who can tell me where I go wrong?
