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, then the write shall not 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?
Hi Joacimwe,
Sorry for the delay, we are checking on it.
Thanks MT_dialog
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