Write to WriteWithoutResponse Characteristic

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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!

0 Likes
2 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

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

0 Likes
Anonymous
Not applicable

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. 

0 Likes