This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

read a characteristic value by handle



Hi,

I am using Central profile.

How to read a characteristic value by handle [read any handle]   i am not getting it?

I am doing GATT_DiscAllPrimaryServices  then i am getting gatt responses back.

i am  doing GATT_DiscALLCharDescs i am getting gatt responses back i am not getting how to process the responses.

I want to write the characteristic  value by handle method.In Btool it works.

Regards,

Punith

  • Hello Punith,
    This is implemented in the simpleBLECentral application code. See this thread reply for more details:
    e2e.ti.com/.../1767834
  • Hi Eirik,

    Thank you for your response.
    1.I knew that example.But how do i read the handle i want to know how do i process the incoming gatt responses if i send this GATT_DiscALLCharDescs .
    GATT_DiscALLCharDescs --> to find characteristic descriptor's Attribute and attribute types how do i process these incoming gatt responses.

    2.If i use these functions GATT_DiscALLChars how do i process the incoming gatt responses.

    3.Is there any state or timing diagram for processing the incoming gatt responses.

    Regards,

    Punith
  • Hello Punith,
    Read the function documentation for the GATT_DiscAllChars given in gatt.h. You should get multiple OSAL GATT_MSG_EVENT messages of type
    ATT_READ_BY_TYPE_RSP. You need to process these in SimpleBLECentral_processGATTDiscEvent. pMsg->msg.readByTypeRsp.numPairs should give you the number of attribute handle-UUID pairs that is contained in the received message if I am not mistaken. Extract these for all messages received. How you process and store these is somewhat up to you.

    See if any info in these thread will aid you:
    e2e.ti.com/.../305025
    e2e.ti.com/.../1450217