gatt_client_write_value_of_characteristic() function
Writes the characteristic value using the characteristic's value handle. The GATT_EVENT_QUERY_COMPLETE event marks the end of write. The write is successfully performed, if the event's att_status field is set to ATT_ERROR_SUCCESS (see bluetooth.h for ATT_ERROR codes).
Arguments
value
is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
Return value
status ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if no HCI connection for con_handle is found BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle could be allocated GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready ERROR_CODE_SUCCESS if query is successfully registered