Write long value fails

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

   

I'm not able to perform a write operation on a long attribute. I've added a custom service with a characteristic of attribute length 50.

   

I've set the GATT MTU size as 23 on windows CySmart application and also on the On-chip side(Top design/GAP settings tab).

   

Now when I try to write 50 bytes value (which I've read previously using the "Read Long Value"option), I immediately get an error:"Write long characteristic value failed. Request is not supported by the peripheral device".

   

Can you please tell me what's the problem.

   

Thanks & Regards,

   

Sharan

0 Likes
1 Solution
Anonymous
Not applicable

Prepare write and execute write requests are the be handled at the BLE stack event handler to support long writes. If not done, the BLE stack assumes that long writes are not supported and returns the error that you mentioned.

   

See this example project - https://github.com/yourskp/BLE/tree/master/Long%20Characteristic%20Read%20Write

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

Prepare write and execute write requests are the be handled at the BLE stack event handler to support long writes. If not done, the BLE stack assumes that long writes are not supported and returns the error that you mentioned.

   

See this example project - https://github.com/yourskp/BLE/tree/master/Long%20Characteristic%20Read%20Write

0 Likes
Anonymous
Not applicable

Hi Undesh,

   

Thanks for the answer. That what I had assumed. Now confirmed.

   

Thanks & Regards,

   

Sharan

0 Likes