Hi, all.
I am trying to get the indication of SERVICE_CHANGED characteristic in GATT.
But I have not succeeded yet.
As described in RW-BLE-GATT-IS.pdf, I have tried to send GATTC_SVC_CHANGED_IND_CMD message to TASK_GATTC from TASK_APP with parameters below.
req_type -> GATTC_SVC_CHANGED or GATTC_INDICATE.
svc_shdl and svc_ehdl -> The range of all characteristic handles I use.
Of course, I enabled CCC descriptor of SERVICE_CHANGED characteristic from client Android application.
我发送指示正确吗?
Are there any other conditions to perform indication?
k .日本柴
Keywords:
Device:
Hi shibakaido,
Try the below command
void app_svc_changed_send(void)
{
struct gattc_send_svc_changed_cmd *msg;
msg = (struct gattc_send_svc_changed_cmd *) KE_MSG_ALLOC(GATTC_SEND_SVC_CHANGED_CMD ,
KE_BUILD_ID(TASK_GATTC, app_env.conidx), TASK_APP,
gattc_send_svc_changed_cmd);
msg->req_type = GATTC_SVC_CHANGED;
msg->svc_shdl = 0x0010;
msg->svc_ehdl = 0xFFFF;
ke_msg_send((void *) msg);
}
Thanks MT_dialog
Thank you , MT_dialog!
I had not recognized KE_BUILD_ID macro. I passed TASK_GATTC directly.
I will try your code.
Thanks again.
k .日本柴