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.

RTOS: Enable indications in cc2650

Other Parts Discussed in Thread: BLE-STACK, CC2650

Tool/software: TI-RTOS

Hello,

I had successfully enabled Notification using multirole project.

Profile used : Serial port profile

Setup: Multirole acts as client and Simple ble server acts as peripheral

Procedure followed

1.) Discover the handle 0x2902 by traversing through the attribute table

2.) Write 0x0001 to this handle

I was able to receive the notification from the server in client side

Now to enable indication I followed following procedure

1.) Modified the following line to include indicate property

static uint8 SerialPortServiceDataProps = GATT_PROP_WRITE_NO_RSP | GATT_PROP_NOTIFY | GATT_PROP_READ | GATT_PROP_INDICATE;

2.) Write 0x0002 to the CCCFG handle and receive the indication messages as GATT MSG by providing the filter

   ATT_HANDLE_VALUE_IND

3.) But I am not receiving any messages

Also at the server side I have made the following changes in SerialPortService_WriteAttrCB function

 else if (pAttr->type.len == ATT_BT_UUID_SIZE )

 {

   // 16-bit UUID

   uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]);

   switch ( uuid )

   {

   case GATT_CLIENT_CHAR_CFG_UUID:

      status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len,

                                                offset, GATT_CLIENT_CFG_INDICATE );

      break;

   default:

       status = ATT_ERR_ATTR_NOT_FOUND;

       break;

   }

 }

Can any one tell me the proper procedure to enable indication?

  • Hello,

    I had successfully enabled Notification using multirole project.

    Profile used : Serial port profile

    Setup: Multirole acts as client and Simple ble server acts as peripheral

    Procedure followed

    1.) Discover the handle 0x2902 by traversing through the attribute table

    2.) Write 0x0001 to this handle

    I was able to receive the notification from the server in client side

    Now to enable indication I followed following procedure

    1.) Modified the following line to include indicate property

    static uint8 SerialPortServiceDataProps = GATT_PROP_WRITE_NO_RSP | GATT_PROP_NOTIFY | GATT_PROP_READ | GATT_PROP_INDICATE;

    2.) Write 0x0002 to the CCCFG handle and receive the indication messages as GATT MSG by providing the filter

       ATT_HANDLE_VALUE_IND

    3.) But I am not receiving any messages

    Also at the server side I have made the following changes in SerialPortService_WriteAttrCB function

     else if (pAttr->type.len == ATT_BT_UUID_SIZE )

     {

       // 16-bit UUID

       uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]);

       switch ( uuid )

       {

       case GATT_CLIENT_CHAR_CFG_UUID:

          status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len,

                                                    offset, GATT_CLIENT_CFG_INDICATE );

          break;

       default:

           status = ATT_ERR_ATTR_NOT_FOUND;

           break;

       }

     }

    Can any one tell me the proper procedure to enable indication?

  • Hi Kavan,

    What version of the TI BLE-Stack are you using? You mentioned using the Multirole project and the Serial port profile. Did you start from the Multirole project from the TI BLE Github page?

    Are both devices CC2650s? If you look at a sniffer capture, is the indication being sent but not handled correctly or not being sent at all?
  • Hi
    Iam using 2.2.1 stack
    Yes I started from multi-role project from git hub
    Yes both are cc2650

    Unfortunately I don't have a dongle.
  • Also when I write 0x0002 the peripheral device gets disconnected.

    Can you please tell me the changes I need to do on both client and server side for implementing indications
  • We don't have an "out of the box" example that shows how to use indications. Indications are not always preferred as they are slower (due to the acknowledgement) and will disallow any other GATT procedures from taking place until the peer node as replied. This can take a long time as this needs to go to up the peer device's host stack for processing. If you have strict requirement for acknowledgment, then indications are probably what you need, but often we see that notifications (for which you can look at the simple_peripheral example) are usually sufficient.
  • Hi Kavan,

    You can look at the Blood Pressure sample application to see how indications are used there.