Reply
Posts: 3
Registered: ‎04-03-2017

Read using characteristic UUID

Hi,

 

Currently I am working on BLE Master project using BLE1212LR. In this I am adding TIs keyfob slave device to my BLE Master. I achieved simple keys service. But I am not getting how to use the Battery service. In keyfob document and its BTOOL, they are showing that I should read the battery value by using "Read using characteristic UUID". Through their BTOOL software and dongle I am successfully reading the battery percentage. But I am not getting how to do "Read using characteristic UUID" through BGScript. 

 

Battery service UUID is 0x180F

Battery level characteristic UUID is 0x2A19 and its handler value is 0x2F.

 

And I want to know in which event it will be good to read the battery percentage, like connection event or procedure completed event. Right now I want read battery percentage every one second so, I will read in timer interrupt event. But I want to read it like whenever I send some command through UART. So, in which event I should read and how to read. 

 

By the way, I tried "attclient_read_by_handle" , but I am not getting any value from "attclient_attribute_value".

 

Please provide me example codes if possible. 

 

Thanks in advance.