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.

CC2652R7: Characteristics and Indications

Part Number: CC2652R7

Hi,

I'm using simple_peripheral example for my project. I have a couple of questions.

1. I have added service changed characteristic in GATT service. I have also enabled L2CAP Connection oriented channels so that the GATT_NO_SERVICE_CHANGED won't be defined. I can see the characteristic and enabled the indication using a remote device, but unable to receive indication when I send using GAPBondMgr_ServiceChangeInd(0xFFFF, true);

2. I'm using ble indications in my project. Which API or callback will I get when my indication is acknowledged by the remote device ?

Regards,

Madhusudhan

  • Hi Madhusudhan,

    I would recommend referencing the Custom profile SLA lab for hands-on information on how to add a service to a peripheral project. It provides some information on how to implement notifications and indications.

    To send a single indication, one would use the GATT_Indication() function. The API guide linked provides a lot of information on how to use the function properly as well as the corresponding events.

    Best Regards,

    Jan

  • Hi Jan,

    1. My question was not about adding a custom service, I was asking about how to send service changed indication to the remote device. Now I found out that I can send using GATTServApp_SendServiceChangedInd(connHandle, selfEntity). Please confirm that.

    2. I found out that I'll get ATT_HANDLE_VALUE_CFM event when the indication is acknowledged. I have multiple indication characteristics in my custom service. How can I find for what indication is that confirmation event ?

    I have one more question.

    3. I'm using Task_construct to create a new task and I'm using Task_exit when I want to terminate the task. Do I have to do Task_destruct also after Task_exit ?

    Regards,

    Madhusudhan

  • Hi Madhusudhan,

    1. My question was not about adding a custom service, I was asking about how to send service changed indication to the remote device. Now I found out that I can send using GATTServApp_SendServiceChangedInd(connHandle, selfEntity). Please confirm that.

    The API documentation for GATTServApp_SendServiceChangedInd states that the function call does indeed send out a service changed indication. However, if you want to enable the GATT service changed feature, then I would suggest referencing the Generic Attribute Profile Service (GATT Service) section of the user's Guide. It provides instructions on how to enable the feature. I would also recommend referencing the GAPBondMgr and Service Change Indication for another set of instructions on how to send service change indications.

    2. I found out that I'll get ATT_HANDLE_VALUE_CFM event when the indication is acknowledged. I have multiple indication characteristics in my custom service. How can I find for what indication is that confirmation event ?

    The process for sending an indication and receiving an acknowledgement is detailed in the Bluetooth Core Specification as shown below:

    As shown, no identifying data is sent with the ATT_HANDLE_VALUE_CFM event. Once an indication is received by the client, it should send the acknowledgement back in the next connection event.

    3. I'm using Task_construct to create a new task and I'm using Task_exit when I want to terminate the task. Do I have to do Task_destruct also after Task_exit ?

    The API description for the functions mentioned is shown below:

    Task_construct

    Task_destruct 

    Task_exit

    Based on the description of the Task_exit function, it seems that the Task_destruct (or Task_delete) function should be called afterwards if you want to delete the instance.

    Best Regards,

    Jan