我主机用SimpleBLECentral工程,从机用BloodPressure工程,它们连接成功后我用从机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发送数据给主机端?