Problem reading CTS as a TIPC

6 posts / 0 new
Last post
JCShaun
Offline
Last seen:6 years 2 months ago
Joined:2014-09-08 21:52
Problem reading CTS as a TIPC

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!

JCShaun
Offline
Last seen:6 years 2 months ago
Joined:2014-09-08 21:52
Or in general, is there any

Or in general, is there any examples of reading from another BLE device? Thank tons!

PY_Dialog
Offline
Last seen:2 years 10 months ago
Staff
Joined:2014-08-25 09:59
Hi JCShaun,

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

iamadog3333
Offline
Last seen:5 years 9 months ago
Joined:2014-07-30 03:56
I am trying to add a tipc

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!

iamadog3333
Offline
Last seen:5 years 9 months ago
Joined:2014-07-30 03:56
JCShaun, PY_Dialog,

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!

PY_Dialog
Offline
Last seen:2 years 10 months ago
Staff
Joined:2014-08-25 09:59
Hi iamadog3333,

Hi iamadog3333,

You need to define and conduct your application level code by yourself.

Regards!
PY