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/CC2640R2F: INDICATE PROBLEM

Part Number: CC2640R2F

Tool/software: TI-RTOS

HI !!!!!

I have implemented an indication based on the simple peripheral example, but it does not work.
I Changed the value of characteristic 4 in custom service from notify to indicate. However, I can not read the value from my smartphone application.
Also in the glucose_sensor example, indicate did not work correctly.

Is there any part I miss?
Is there an example that includes using indicate instead of notify?

  • Hello Jinbae,
    I will test it and get back to you.
  • Hello Jinbae,

    I successfully modified simple peripheral to send indication from characteristic 4.

    I had to pass the Entity ID (Task ID) selfEntity to GATTServApp_ProcessCharCfg in SimpleProfile_SetParameter to register my ICall application task to receive the GATT message ATT_HANDLE_VALUE_CFM which is sent in response from the master after an indication is sent from the slave. I simply added an parameter in SimpleProfile_SetParameter for taskId and passed the selfEntity variable from the application. This is not the cleanest solution, but works to verify functionality. you should also wait for the ATT_HANDLE_VALUE_CFM  before you send the next indication and not send periodically as is done in the example.

    Add parameter in Set_Parameter: 

    bStatus_t SimpleProfile_SetParameter( uint8 param, uint8 len, void *value, ICall_EntityID taskId)

    In SimpleBLEPeripheral_performPeriodicTask:

    SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR4, sizeof(uint8_t), &valueToCopy, selfEntity);

    In SimpleProfile_SetParameter:

    GATTServApp_ProcessCharCfg( simpleProfileChar4Config, &simpleProfileChar4, FALSE, simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ), taskId, simpleProfile_ReadAttrCB );

    Add in SimpleBLEPeripheral_processGATTMsg:

    ....
    else if (pMsg->method == ATT_HANDLE_VALUE_CFM)
    {
        Display_print1(dispHandle, 5, 0, "ATT_HANDLE_VALUE_CFM Received    : %d", pMsg->method);
    }

    Test:

    1. Connect with BTool (Master).

    2. Write random value to char 3.

    3. Enable indications on char4 CCCD (write 02:00).

    4. The slave will periodically (SimpleBLEPeripheral_performPeriodicTask) copy the value from char 3 to char 4 and send an indication.

  • Thank you for your kind answer!


    I tried everything in the way you did, but unfortunately it did not work(ble scanner & lightblue application)


    Is there a difference in handling with existing apps?

    Thanks!

    
    

    
    
  • Hello Jinbae,

    I attached my simple_gatt_profile.c. It is not a optimal implementation because you should wait for confirmation (ATT_HANDLE_VALUE_CFM) from the GATT client before you send the next indication. I tested successfully with the Lightblue app as well.

    /cfs-file/__key/communityserver-discussions-components-files/538/5756.simple_5F00_gatt_5F00_profile.c

  • Thank you so much!!!!!

    It works properly in lightblue applications!