I am trying to get an event when a notification has been sent to the client.
I understand that it should get to gattc_cmp_evt_handler and there check if the event is for notify.
I am using multiple notification characteristics.
How can I check for which characteristic is the event?
thanks

It is a good question.
Check the glucose profile (glpc_task.c), line ~709. It has something like this:
case GATTC_NOTIFY:
{
// check if it's a Glucose measurement notification
if (glpc_env->gls.chars[GLPC_CHAR_MEAS].val_hdl == param->handle)
{
...
ke_msg_send(ind);
}
// check if it's a Glucose measurement context notification
else if (glpc_env - > gls.chars GLPC_CHAR_MEAS_CTX .val_hdl == param->handle)
{
...
ke_msg_send(ind);
}
Hi Vesa,
I need to know it on the complete event : gattc_cmp_evt_handler on the server side.
When you look at the parameters that are being provided to the routine they don't seem to include any link to which characteristic has been sent.
Yes, you are right.
It should definitely be possible to detect what notification has been completed but I cannot find the link between the parameters and the notification either.
I can only think ofnot-so-goodsolution that you have some table where you have a list of notifications with their corresponding status:
notification1 | inactive
notification2 | pending
notification3 | inactive
in the complete handler you can find the pending notification, which has been set in
gattc_event_ind_handler. Of course, it will not work if two notifications are set to pending state simultaneous (which shouldn't ever happen?)It's not a very good solution I guess. Tell if you find a "correct" solution
Thanks!
Thanks
Dialog?
Any suggestions?