Is there anyone who have succeeded to get the SERVICE_CHANGED indication in GATT?

3 posts / 0 new
Last post
shibakaido
Offline
Last seen:4 years 10 months ago
加入:2015-05-21 10:46
Is there anyone who have succeeded to get the SERVICE_CHANGED indication in GATT?

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:
MT_dialog
Offline
Last seen:1 week 2 days ago
Staff
加入:2015-06-08 11:34
Hi shibakaido,

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

shibakaido
Offline
Last seen:4 years 10 months ago
加入:2015-05-21 10:46
Thank you , 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 .日本柴