6 Replies Latest reply on Oct 21, 2014 3:46 PM by userc_9440

    Just want the written data

      Hi there guys,


      Trying to write a vendor specific profile with a vendor specific service that contains two writable characteristics which will pipe any written data out the uart upon write. I have my pass to uart function occurring in the smart wizard generated functions which are called by the write handler.



      // It will be called at the write handler and should return TRUE if any persistent value is changed

      BOOL on_write_service_characteristic(int len, UINT8 *attrPtr)


      The problem that I am running into is that the ENTIRE characteristic is being passed via the attrPtr, not just the data that was just written to it. So for example if the characteristic previously contained the data "this is a very long string" and the data "hello" is written, the attrPtr will contain "hellos very long string" and len will be the value 26 instead of the 5 that I wanted.


      How can I get just a pointer to the data written and it's length, NOT the entire characteristic?