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.
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