3 posts / 0 new
Last post
Joacimwe
Offline
Last seen:1 year 3 months ago
Guru
加入:2014-01-14 06:45
Execute Write Response

Hi.

I need to respond with ok/error to Queued Writes (Write Long Characteristic Values).

With normal Write Requests, I check the param->response of the gattc_write_cmd_ind handler and call atts_write_rsp_send with a status (ok or error).
But I can't get it to work with queued writes. The response flag of the gattc_write_cmd_ind message is always 0 (which means I should not call atts_write_rsp_send) and a success response (Execute Write Response) is automatically sent to the central by some lower layer. If I try to call atts_write_rsp_send with an error status code, it is never sent over the air.

In Bluetooth 4.0 Vol 3 Part G, 4.9.4:
"If the Attribute Value that is written is the wrong size, or has aninvalid value as defined by the profile,然后写不可t succeed and an Error Response shall be sent with the Error Code set to Application Error by the server."

Is there any way I can send an error message to the central as the result of a queued write?

Device:
MT_dialog
Offline
Last seen:1 week 6 days ago
Staff
加入:2015-06-08 11:34
Hi Joacimwe,

Hi Joacimwe,

Sorry for the delay, we are checking on it.

Thanks MT_dialog

MT_dialog
Offline
Last seen:1 week 6 days ago
Staff
加入:2015-06-08 11:34
Hi Joacime,

Hi Joacime,

Sorry for the delay, but it seems that there isn't a way of sending an error message in a queue write. The response is generated, as you guessed, from a lower layer.

Thanks MT_dialog