Hi,
I'm trying to enable notifications between SimpleBLEPeripheral and SimpleBLECentral for CHAR1, and I'm confused on a few things.
1. Do notifications need to be enabled from the server, client, or both sides? I want to enable notifications on connecting, so I tried placing some code in SimpleBLEPeripheral_stateChangeCB under GAPROLE_CONNECTED:
uint16_t connHandle[1]; GAPRole_GetParameter(GAPROLE_CONNHANDLE, connHandle); GATTServApp_WriteCharCfg(connHandle[0], simpleProfileChar1Config, GATT_CLIENT_CFG_NOTIFY);
However, calling ReadCharCfg still gives 0x0.
2. How can I handle notification messages on the client side? Do I need to add a (pMsg->method == ATT_HANDLE_VALUE_NOTI) condition under SimpleBLECentral_processGATTMsg?
Thanks,
Michael