Hi there,
I have some questions about BLE characteristics' permission.
Our customer want one of our device's characteristic supports both notification and indication, so I set it as follow:
[CUSTOMER_IDX_CONTROL_POINT_VAL] = {CUSTOMER_CONTROL_POINT_UUID_128, ATT_UUID_128_LEN, PERM(WR, ENABLE) | PERM(WRITE_REQ, ENABLE) | PERM(IND, ENABLE) | PERM(NTF, ENABLE), DEF_CUST1_INDICATEABLE_CHAR_LEN, 0, NULL},
I just want to know, Is it legal that I set the one characteristic with notification and indication permission? Is it a normal case?
我发现对话框的SDK不起作用与notification and indication.
If I set "PERM(IND, ENABLE) | PERM(NTF, ENABLE)", only notification works. When host sent "02 00" (enable indication), DA14585 will return PRF_ERR_INVALID_PARAM.
Could you please check the code "status = check_client_char_cfg(PERM_IS_SET(perm, NTF, ENABLE), param);" in "\sdk\ble_stack\profiles\custom\custs\src\custs1_task.c"?
Thanks a lot.
Hi stanley_yeh,
We don’t support both notification and indication in the same characteristic, because it does not make sense. You will receive only an indication or only a notification. The code that you have posted, checks if the characteristic is indictable OR notifiable.
Thanks, PM_Dialog
Hi PM_Dialog,
I mean the characteristic supports these 2 permissions, indication and notification, but there is only one permission will be enable at one time.
I am not saying that these two permissions are enabled simultaneously.
If host sends 01 00 to the 0x2902 descriptor of our device, our device will notify messages to host,
If host sends 02 00 to the 0x2902 descriptor of our device, our device will indicate messages to host.
Could you please kindly tell me why doesn't it make sense?
Thanks a lot. :)
Hi stanley_yeh,
Yes, this it is expectable that only one permission will be enable at one time. The characteristic will be only indictable or only notifiable at one time, that’s the reason why we don’t support both notification and indication in the same characteristic.
Thanks, PM_Dialog