2 Replies Latest reply on Dec 27, 2016 7:48 AM by alex.sneed.miller

    CyBle_GattsWriteAttributeValue Permissions

    alex.sneed.miller

      When you call CyBle_GattsWriteAttributeValue(), the last parameter is the permission of the attribute (CYBLE_GATT_DB_LOCALLY_INITIATED or CYBLE_GATT_DB_PEER_INITIATED).

         

      I'm having a hard time figuring out what this actually means. Can anyone point me in the right place to find the documentation for what the difference between the two are?

        • 1. Re: CyBle_GattsWriteAttributeValue Permissions
          Gyan Chand

          Hi,

             

          >When the Gatt_Server device itself want to update its Gatt_Database (Any Attribute's value ) ,then the Gatt_Server device itself will call the CyBle_GattsWriteAttributeValue() function with attribute permission CYBLE_GATT_DB_LOCALLY_INITIATED.

             

          For example ,if Gatt_Server device wants to update its attribute value to '0' or something at dsconnection  event,then this function with CYBLE_GATT_DB_LOCALLY_INITIATED is used.

             

          >When a particular attribute is updated/written by Gatt_Client (peer device) on write request then CYBLE_GATT_DB_PEER_INITIATED parameter is used.

             

           

             

          Regards,

             

          Gyan

          • 2. Re: CyBle_GattsWriteAttributeValue Permissions
            alex.sneed.miller

            Hi Gyan,

            What is the actual difference in the implementation between the two? Why are they different?

            Every time I handle a write request, my application firmware needs to parse the request (do some validation) and then update the database. Which flag should I use in that scenario?