This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2540

Other Parts Discussed in Thread: CC2540

我主机用内核,从机用CC2540 HIDEmuKbd工程时,它们连接成功后我用从机Service_IMeasNotify发送数据给主机,在运行

bStatus_t Service_IMeasNotify( uint16 connHandle, attHandleValueNoti_t *pNoti, uint8 taskId )
{
uint16 value = GATTServApp_ReadCharCfg( connHandle, ServiceIMeasConfig );

// If notifications enabled
if ( value & GATT_CLIENT_CFG_NOTIFY )
{
// Set the handle
pNoti->handle = ServiceAttrTbl[SERVICE_IMEAS_VALUE_POS].handle;

// Send the Indication
return GATT_Notification( connHandle, pNoti, FALSE);

}
return bleIncorrectMode;

}这个中uint16 value = GATTServApp_ReadCharCfg( connHandle, ServiceIMeasConfig );读出value 为0;这是为什么,是还要怎样设置才可以从机端才可以用Notification发送数据给主机端?