Hi,
I am new to BLE. So happy to join this community :))
I am trying to use DA14580 as a timer profile client. Been having problem figuring out how to use GATTC read command to retrieve services from a time profile server :(((
1. Service discovery seems to work fine:
I was able to get through the discovery process and send tipc_enable_cfm_send(tipc_env, &tipc_env->con_info, PRF_ERR_OK) and move to the TIPC to "connected" state.
2. I then bond to the device I discovered
3. Once the bonding was established, I used the following code to try reading CTS information.
struct gattc_read_cmd *myReadCmd = KE_MSG_ALLOC(GATTC_READ_CMD, TASK_GATTC, TASK_APP, gattc_read_cmd);
myReadCmd ->req_type = GATTC_READ;
struct gattc_read_simple mySimpleRead;
mySimpleRead.handle = 0x22;
myReadCmd->req.simple = mySimpleRead;
ke_msg_send(myReadCmd);
4.然而,gattc_read_ind_handler()从未called. I have set up multiple break points in gattc_read_ind_handler(), no break point was fired.
5. GATTC_READ case under gattc_cmp_event was NEVER reached.
6. I have tried the above procedure (by that I mean discover -> bond device -> read CTS) using connection manager, it worked fine.
Really wish there could be more examples on how to use DA14580 as a central device and how to read GATT profiles and services.
Could anyone help?
Thank you!

Or in general, is there any examples of reading from another BLE device? Thank tons!
Hi JCShaun,
Here below is a simple example for BLE read:
struct gattc_read_cmd * req = KE_MSG_ALLOC(GATTC_READ_CMD, KE_BUILD_ID(TASK_GATTC, con_info->conidx),
con_info->prf_id, gattc_read_cmd);
req->req_type = GATTC_READ;
req->nb = 1;//read once
req->req.simple.offset = 0;//read from the start
req->req.simple.length = 0;//read all
req->req.simple.handle = valhdl;//read value handler
ke_msg_send(req);
There still be other types of read, please refer to RW-BLE-GATT-IS for more information.
Regards!
PY
I am trying to add a tipc(time profile client) service. I have found the tipc.c and tipc_task.c in SDK.
But there is not any app_tipc_task.c etc. files.
Is thers a complete TIPC demo from Dialog?
Thank you!
JCShaun, PY_Dialog,
I am trying to add a tipc(time profile client) service. I have found the tipc.c and tipc_task.c in SDK.
But there is not any app_tipc_task.c etc. files.
Is thers a complete TIPC demo from Dialog?
Thank you!
Hi iamadog3333,
You need to define and conduct your application level code by yourself.
Regards!
PY