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.

How to process GATT_WriteCharValue onto LCD

Other Parts Discussed in Thread: CC2541

Hi All,

I am working on ANCS on cc2541 using TimeApp profile. From the central device i am doing a GATT write onto the peripheral device.So i  would like to display the data onto LCD on the peripheral.Can anybody tell me how to process GATT_WriteCharValue inorder to display on LCD

Thanks 

DOn

  • Hello Don,

    Are you working with the SmartRF programmers or are you interfacing the LCD with your CC2541?

    Thanks,

  • Hi greenja,

    I am interfacing OLED display with CC2541.I need to send the data onto the OLED display which is interfaced with cc2541.When i do a GATT_Write,it is written onto the peripheral device .So i need to send the data properly onto the 

    OLED display in the GATT_write function.Can you tell me how to process it

    Thanks,

  • You will have to write a function to talk to the OLED based on the device Specs i.e. I2C, 4-bit, 8-bit parallel, etc.  The data would be converted to ASCII.  The OLED should have sample code available.  You can also search the web for examples matching your OLED model.

    If you are looking for a BLE function that can write to an OLED, there isn't one.

    Thanks,

  • That OLED function should be wriiten inside this function right

    GATT_WriteCharValue( timeAppConnHandle, &writeReq1, timeAppTaskId );

    I am having doubt regarding were to call the OLED function inorder to display data properly.

    Thanks

  • It doesn't necessarily have to written in that function.  LCDs usually require timing delays, plus you will have to format the data.  If this is the case then you may want to create a Timer Event and call the function after the data has been received.  

    You may also want to split them up so that you have one function to format the data and the other to write it to the LCD.  It all depends on the size of data, LCD timing requirements and how active your BLE connection is.

    Thanks,

  • How to confirm that the data i want to write is properly received in GATT_WriteCharValue Function.I tried to debug with 

    unsigned char status;

    status=GATT_WriteCharValue( timeAppConnHandle, &writeReq1, timeAppTaskId );

    but I didnt get any data response.Is it the correct way to test whether the data is received correctly.

    Thanks

  • I would have to look up that function, I don't remember what it returns.  I would think that a GATT_ReadCharValue would have to used by one device though.  This is probably outlined in the Sample Application Guide SWRU297 somewhere though.

    http://www.ti.com/lit/pdf/swru297

    Thanks,