2 Replies Latest reply on Dec 27, 2016 7:48 AM by userc_38364

    CyBle_GattsWriteAttributeValue Permissions

      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



          >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.







          • 2. Re: CyBle_GattsWriteAttributeValue Permissions

            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?