2 Replies Latest reply on Nov 15, 2016 8:51 AM by alex.sneed.miller

    Write to WriteWithoutResponse Characteristic

    alex.sneed.miller

      I have a custom BLE profile with a characteristic that has the WriteWithoutReponse box checked in the BLE component: https://snag.gy/jCQSWT.jpg

         

       

         

      In my callback I was able to write code to handle a Write (with response) request.

         

      I was surprised that this worked because I thought that the profile I had set up in the BLE component would have prevented this from happening. I was able to verify that I was able to Write (with response) to the device using a generic BLE app.

         

      Is this supposed to happen? Does this mean that I can overwrite the configuration in the component in the schematic through the code? Is something else going on here?

         

       

         

      Thank you!

        • 1. Re: Write to WriteWithoutResponse Characteristic
          anpm

          Hi,

             

          I am not sure how you have done the write operation. Any value can be written in to the GATT by locally (by same device itself) also using the same API CyBle_GattsWriteAttributeValue ().

             

          When you will use write and write without response, you will get two separate events in the BLE  call back stack event handler:

             

          CYBLE_EVT_GATTS_WRITE_REQ: if using 'write' (write with response)

             

          CYBLE_EVT_GATTS_WRITE_CMD_REQ: if using 'write without response'

             

          On getting the above events (depending upon which option has enabled),  call the CyBle_GattsWriteAttributeValue() API.

             

          Thanks,

             

          Anjana

          • 2. Re: Write to WriteWithoutResponse Characteristic
            alex.sneed.miller

            I did the write operation from my phone using the LightBlue Explorer App from my iPhone.

               

            I have been calling CyBle_GattsWriteAttributeValue() in order to update the GATT database and that seems to work well.