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.

Communication Between central and Peripheral



I want to send data from central to peripheral and receive data from peripheral to central.
For this i had set 

uint8_t valueToCopy;

valueToCopy = 0x05;

Then sending this function on a key press: 
"SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR1, sizeof(uint8_t), &valueToCopy);"

and while receiving it i am using:

"SimpleProfile_GetParameter(SIMPLEPROFILE_CHAR1, &newValue);"

and then checking "

if ((uint16_t)newValue==0x05)
{
PIN_setOutputValue(hGpioPin, Board_LED2, Board_LED_ON);
} "

So this is working fine in case of mobile and cc2650 but not is cc2650-cc2650 .

Can Some one please guide me where m going wrong?

  • Hi Pradeep,

    This is a duplicate of this post: e2e.ti.com/.../1776822
  • Didn't get any solution so thought to post it again.
  • Hi Sean,

    I tried doing annunciation taking some help from the other post and got to know that data is readed in this part:
    req.startHandle = svcStartHdl;
    req.endHandle = svcEndHdl;
    req.type.len = ATT_BT_UUID_SIZE;
    req.type.uuid[0] = LO_UINT16(SIMPLEPROFILE_CHAR1_UUID);
    req.type.uuid[1] = HI_UINT16(SIMPLEPROFILE_CHAR1_UUID);

    VOID GATT_ReadUsingCharUUID(connHandle, &req, selfEntity);

    So i did that by sending data from the other device
    but m sending 0x02 from the device and while reading this data by using:
    else if (discState == BLE_DISC_STATE_CHAR)
    {
    // Characteristic found, store handle
    if ((pMsg->method == ATT_READ_BY_TYPE_RSP) &&
    (pMsg->msg.readByTypeRsp.numPairs > 0))
    {
    //find index to store handle
    uint8_t connIndex = gapRoleInfo_Find(connHandle);
    charHdl[connIndex] = BUILD_UINT16(pMsg->msg.readByTypeRsp.pDataList[0],
    pMsg->msg.readByTypeRsp.pDataList[1]);


    LCD_WRITE_STRING_VALUE("Char 1:", pMsg->msg.readByTypeRsp.pDataList[0], 10, LCD_PAGE4);
    LCD_WRITE_STRING_VALUE("Char 1:", pMsg->msg.readByTypeRsp.pDataList[1], 10, LCD_PAGE6);

    I am getting 30 and 0 in the two lines of LCD.
    i think the data is not getting send from the other device.
    can u guide me ?