Hi
I would like to create a value notification
when a first client ask for notification a timer start
and when last client clear notification a timer stop
not understanding how it work
- I have at AttrTbl[] a notify value, does it mean it automatically send notify of value change (which is not what I wanted)
or let the program to chose what to do (start/stop timer)
- GATT_CLIENT_CHAR_CFG_UUID , who send it and when?
- how this clientCharCfgUUID at AttrTbl[] connected to the value which was defined as GATT_PROP_NOTIFY
- how it all connected? I am confused so my question are also confused
this what I added to _WriteAttrCB
- doing it like that will just stop notify on client notify disable (not sure), how to do it right?
case GATT_CLIENT_CHAR_CFG_UUID:
status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len,
offset, GATT_CLIENT_CFG_NOTIFY );
if ( status == SUCCESS )
{
uint16 charCfg = BUILD_UINT16( pValue[0], pValue[1] );
(*adcServiceCB)( (charCfg == GATT_CFG_NO_OPERATION) ?
MY_NOTI_DISABLED : MY_NOTI_ENABLED );
}
break;
thanks