4 Replies Latest reply on Oct 20, 2017 12:11 PM by e.pratt_1639216

    Characteristic - Multiple Fields

    rich.soennichsen_1592346

      Up until now all my custom characteristics have had a single data field, e.g. one uint8.  When using multiple data fields, how are they individually managed?  Here is my code that updates a characteristic:

       

      void Updatecharacteristic(uint8* Data, uint16 len, uint16 attrHandle)

      {

      /* 'Handle' stores data parameters */

          CYBLE_GATT_HANDLE_VALUE_PAIR_T Handle;

          /* Update handle with new values */

          Handle.attrHandle = attrHandle;

          Handle.value.val = Data;

          Handle.value.len = len;

          /* Update the attribute value. This will allow

          * Client device to read the existing values over

          *  characteristic */

          CyBle_GattsWriteAttributeValue(&Handle,

          FALSE,

          &cyBle_connHandle,

          CYBLE_GATT_DB_PEER_INITIATED);

       

          /* Send the response to the write request received. */

          CyBle_GattsWriteRsp(cyBle_connHandle);

      }

       

      Thanks

       

      Rich