cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an example for a long characteristic write procedure?

DS.4
Senior II

Using STM32WB55 as a central. My goal is to write a slave attribute of size 512 bytes.

I am trying to use an 'aci_gatt_write_long_char_value' to do that.

Do I need to break the message to chunks or does 'aci_gatt_write_long_char_value' takes care of that?

how does 'aci_gatt_write_long_char_value' relate to these :

aci_att_prepare_write_req

aci_att_execute_write_req

Thanks!

1 REPLY 1
Remy ISSALYS
ST Employee

Hello,

I made a mistake in your previous post (I edited my comment with the right answer), for write long, the length of the data to be written is limited to 245 bytes (with ATT_MTU = 251).

So, to write 512 bytes, you should split your message.

aci_gatt_write_long_char_value start the procedure to write a long characteristic value. When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is generated. During the procedure, ACI_ATT_PREPARE_WRITE_RESP_EVENT and ACI_ATT_EXEC_WRITE_RESP_EVENT events are raised.

Best Regards