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.

CC2652RB: GATT Read

Part Number: CC2652RB

Hallo,

I'd like to read some GATT variable with simple central and simple profile.

I added a new custom service in simple peripheral with 4 different services.

I think, for reading the GATT variables, I need to edit the code in 

SimpleCentral_processGATTDiscEvent.


The code lines:

// Store the handle of the simpleprofile characteristic 1 value

      connList[connIndex].charHandle

        = BUILD_UINT16(pMsg->msg.readByTypeRsp.pDataList[3],

                       pMsg->msg.readByTypeRsp.pDataList[4]);

I'm struggling to find my connection handles for my custom service and to edit the lines above.

A related question is mentioned above my thread caption.

Thanks for your help.

Jan

  • Hi Jan,

    I will ask a concerned engineer to help.

    In the meantime, you may want to review the SimpleLink Academy trainings related to BLE.

    Best regards,

  • Hi Jan,

    In regards to the connection handles, I wanted to get clarification on how you're currently searching for your connection handle to better assist in answering your question.

    In the meantime, I would suggest taking a look at the function SimpleCentral_processAppMsg within simple_central.c to view how the connection handle is extracted when the event is processed. You can get the connection list index from the message header state which can be used to index the connList for the connection handle.

    Another suggestion is to verify if scConnHandle is updated. This can be used in a specific connection's context. To get the connection list index, utilize the API SimpleCentral_getConnIndex.

    Please let me know if this clarifies your question or if additional information is needed. Thanks!

    Best Regards,

    Jenny