gatt_client: update API docu

This commit is contained in:
Milanka Ringwald 2019-09-26 13:30:14 +02:00
parent 25b7c058c6
commit 692bf1adaa

View File

@ -232,11 +232,13 @@ typedef struct {
void gatt_client_init(void); void gatt_client_init(void);
/** /**
* @brief MTU is available after the first query has completed. If status is equal to 0, it returns the real value, otherwise the default value of 23. * @brief MTU is available after the first query has completed. If status is equal to ERROR_CODE_SUCCESS, it returns the real value, otherwise the default value ATT_DEFAULT_MTU (see bluetooth.h).
* @param con_handle * @param con_handle
* @param mtu * @param mtu
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if MTU is not exchanged and MTU auto-exchange is disabled
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_get_mtu(hci_con_handle_t con_handle, uint16_t * mtu); uint8_t gatt_client_get_mtu(hci_con_handle_t con_handle, uint16_t * mtu);
/** /**
@ -255,6 +257,7 @@ void gatt_client_send_mtu_negotiation(btstack_packet_handler_t callback, hci_con
/** /**
* @brief Returns if the GATT client is ready to receive a query. It is used with daemon. * @brief Returns if the GATT client is ready to receive a query. It is used with daemon.
* @param con_handle * @param con_handle
* @return is_ready_status 0 - if no GATT client for con_handle is found, or is not ready, otherwise 1
*/ */
int gatt_client_is_ready(hci_con_handle_t con_handle); int gatt_client_is_ready(hci_con_handle_t con_handle);
@ -262,6 +265,9 @@ int gatt_client_is_ready(hci_con_handle_t con_handle);
* @brief Discovers all primary services. For each found service, an le_service_event_t with type set to GATT_EVENT_SERVICE_QUERY_RESULT will be generated and passed to the registered callback. The gatt_complete_event_t, with type set to GATT_EVENT_QUERY_COMPLETE, marks the end of discovery. * @brief Discovers all primary services. For each found service, an le_service_event_t with type set to GATT_EVENT_SERVICE_QUERY_RESULT will be generated and passed to the registered callback. The gatt_complete_event_t, with type set to GATT_EVENT_QUERY_COMPLETE, marks the end of discovery.
* @param callback * @param callback
* @param con_handle * @param con_handle
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_primary_services(btstack_packet_handler_t callback, hci_con_handle_t con_handle); uint8_t gatt_client_discover_primary_services(btstack_packet_handler_t callback, hci_con_handle_t con_handle);
@ -270,6 +276,9 @@ uint8_t gatt_client_discover_primary_services(btstack_packet_handler_t callback,
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param uuid16 * @param uuid16
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_primary_services_by_uuid16(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t uuid16); uint8_t gatt_client_discover_primary_services_by_uuid16(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t uuid16);
@ -278,6 +287,9 @@ uint8_t gatt_client_discover_primary_services_by_uuid16(btstack_packet_handler_t
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param uuid128 * @param uuid128
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_primary_services_by_uuid128(btstack_packet_handler_t callback, hci_con_handle_t con_handle, const uint8_t * uuid128); uint8_t gatt_client_discover_primary_services_by_uuid128(btstack_packet_handler_t callback, hci_con_handle_t con_handle, const uint8_t * uuid128);
@ -286,6 +298,9 @@ uint8_t gatt_client_discover_primary_services_by_uuid128(btstack_packet_handler_
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param service * @param service
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_find_included_services_for_service(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_service_t *service); uint8_t gatt_client_find_included_services_for_service(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_service_t *service);
@ -294,6 +309,9 @@ uint8_t gatt_client_find_included_services_for_service(btstack_packet_handler_t
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param service * @param service
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_characteristics_for_service(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_service_t *service); uint8_t gatt_client_discover_characteristics_for_service(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_service_t *service);
@ -304,6 +322,9 @@ uint8_t gatt_client_discover_characteristics_for_service(btstack_packet_handler_
* @param start_handle * @param start_handle
* @param end_handle * @param end_handle
* @param uuid16 * @param uuid16
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_characteristics_for_handle_range_by_uuid16(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t start_handle, uint16_t end_handle, uint16_t uuid16); uint8_t gatt_client_discover_characteristics_for_handle_range_by_uuid16(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t start_handle, uint16_t end_handle, uint16_t uuid16);
@ -314,6 +335,9 @@ uint8_t gatt_client_discover_characteristics_for_handle_range_by_uuid16(btstack_
* @param start_handle * @param start_handle
* @param end_handle * @param end_handle
* @param uuid128 * @param uuid128
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_characteristics_for_handle_range_by_uuid128(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t start_handle, uint16_t end_handle, uint8_t * uuid128); uint8_t gatt_client_discover_characteristics_for_handle_range_by_uuid128(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t start_handle, uint16_t end_handle, uint8_t * uuid128);
@ -323,6 +347,9 @@ uint8_t gatt_client_discover_characteristics_for_handle_range_by_uuid128(btstack
* @param con_handle * @param con_handle
* @param service * @param service
* @param uuid16 * @param uuid16
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_characteristics_for_service_by_uuid16(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_service_t *service, uint16_t uuid16); uint8_t gatt_client_discover_characteristics_for_service_by_uuid16(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_service_t *service, uint16_t uuid16);
@ -332,6 +359,9 @@ uint8_t gatt_client_discover_characteristics_for_service_by_uuid16(btstack_packe
* @param con_handle * @param con_handle
* @param service * @param service
* @param uuid128 * @param uuid128
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_characteristics_for_service_by_uuid128(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_service_t *service, uint8_t * uuid128); uint8_t gatt_client_discover_characteristics_for_service_by_uuid128(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_service_t *service, uint8_t * uuid128);
@ -340,6 +370,9 @@ uint8_t gatt_client_discover_characteristics_for_service_by_uuid128(btstack_pack
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param characteristic * @param characteristic
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_discover_characteristic_descriptors(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_t *characteristic); uint8_t gatt_client_discover_characteristic_descriptors(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_t *characteristic);
@ -348,6 +381,9 @@ uint8_t gatt_client_discover_characteristic_descriptors(btstack_packet_handler_t
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param characteristic * @param characteristic
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_read_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_t *characteristic); uint8_t gatt_client_read_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_t *characteristic);
@ -356,6 +392,9 @@ uint8_t gatt_client_read_value_of_characteristic(btstack_packet_handler_t callba
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param characteristic_value_handle * @param characteristic_value_handle
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_read_value_of_characteristic_using_value_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle); uint8_t gatt_client_read_value_of_characteristic_using_value_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle);
@ -366,6 +405,9 @@ uint8_t gatt_client_read_value_of_characteristic_using_value_handle(btstack_pack
* @param start_handle * @param start_handle
* @param end_handle * @param end_handle
* @param uuid16 * @param uuid16
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_read_value_of_characteristics_by_uuid16(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t start_handle, uint16_t end_handle, uint16_t uuid16); uint8_t gatt_client_read_value_of_characteristics_by_uuid16(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t start_handle, uint16_t end_handle, uint16_t uuid16);
@ -376,6 +418,9 @@ uint8_t gatt_client_read_value_of_characteristics_by_uuid16(btstack_packet_handl
* @param start_handle * @param start_handle
* @param end_handle * @param end_handle
* @param uuid128 * @param uuid128
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_read_value_of_characteristics_by_uuid128(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t start_handle, uint16_t end_handle, uint8_t * uuid128); uint8_t gatt_client_read_value_of_characteristics_by_uuid128(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t start_handle, uint16_t end_handle, uint8_t * uuid128);
@ -384,6 +429,9 @@ uint8_t gatt_client_read_value_of_characteristics_by_uuid128(btstack_packet_hand
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param characteristic * @param characteristic
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_read_long_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_t *characteristic); uint8_t gatt_client_read_long_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_t *characteristic);
@ -392,6 +440,9 @@ uint8_t gatt_client_read_long_value_of_characteristic(btstack_packet_handler_t c
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param characteristic_value_handle * @param characteristic_value_handle
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_read_long_value_of_characteristic_using_value_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle); uint8_t gatt_client_read_long_value_of_characteristic_using_value_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle);
@ -401,6 +452,9 @@ uint8_t gatt_client_read_long_value_of_characteristic_using_value_handle(btstack
* @param con_handle * @param con_handle
* @param characteristic_value_handle * @param characteristic_value_handle
* @param offset * @param offset
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t offset); uint8_t gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t offset);
@ -419,6 +473,10 @@ uint8_t gatt_client_read_multiple_characteristic_values(btstack_packet_handler_t
* @param characteristic_value_handle * @param characteristic_value_handle
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done * @param data is not copied, make sure memory is accessible until write is done
* @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready
* BTSTACK_ACL_BUFFERS_FULL , if L2CAP cannot send, there are no free ACL slots
* ERROR_CODE_SUCCESS , if query is successfully registered
*/ */
uint8_t gatt_client_write_value_of_characteristic_without_response(hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t length, uint8_t * data); uint8_t gatt_client_write_value_of_characteristic_without_response(hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t length, uint8_t * data);
@ -430,6 +488,9 @@ uint8_t gatt_client_write_value_of_characteristic_without_response(hci_con_handl
* @param value_handle * @param value_handle
* @param message_len * @param message_len
* @param message is not copied, make sure memory is accessible until write is done * @param message is not copied, make sure memory is accessible until write is done
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_signed_write_without_response(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t value_handle, uint16_t message_len, uint8_t * message); uint8_t gatt_client_signed_write_without_response(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t value_handle, uint16_t message_len, uint8_t * message);
@ -440,6 +501,9 @@ uint8_t gatt_client_signed_write_without_response(btstack_packet_handler_t callb
* @param characteristic_value_handle * @param characteristic_value_handle
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_write_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t length, uint8_t * data); uint8_t gatt_client_write_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t length, uint8_t * data);
@ -450,6 +514,9 @@ uint8_t gatt_client_write_value_of_characteristic(btstack_packet_handler_t callb
* @param characteristic_value_handle * @param characteristic_value_handle
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_write_long_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t length, uint8_t * data); uint8_t gatt_client_write_long_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t length, uint8_t * data);
@ -461,6 +528,9 @@ uint8_t gatt_client_write_long_value_of_characteristic(btstack_packet_handler_t
* @param offset of value * @param offset of value
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_write_long_value_of_characteristic_with_offset(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t offset, uint16_t length, uint8_t * data); uint8_t gatt_client_write_long_value_of_characteristic_with_offset(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t offset, uint16_t length, uint8_t * data);
@ -471,6 +541,9 @@ uint8_t gatt_client_write_long_value_of_characteristic_with_offset(btstack_packe
* @param characteristic_value_handle * @param characteristic_value_handle
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_reliable_write_long_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t length, uint8_t * data); uint8_t gatt_client_reliable_write_long_value_of_characteristic(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t characteristic_value_handle, uint16_t length, uint8_t * data);
@ -479,6 +552,9 @@ uint8_t gatt_client_reliable_write_long_value_of_characteristic(btstack_packet_h
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param descriptor * @param descriptor
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_read_characteristic_descriptor(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_descriptor_t * descriptor); uint8_t gatt_client_read_characteristic_descriptor(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_descriptor_t * descriptor);
@ -487,6 +563,9 @@ uint8_t gatt_client_read_characteristic_descriptor(btstack_packet_handler_t call
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param descriptor * @param descriptor
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_read_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle); uint8_t gatt_client_read_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle);
@ -495,6 +574,9 @@ uint8_t gatt_client_read_characteristic_descriptor_using_descriptor_handle(btsta
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param descriptor_handle * @param descriptor_handle
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_read_long_characteristic_descriptor(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_descriptor_t * descriptor); uint8_t gatt_client_read_long_characteristic_descriptor(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_descriptor_t * descriptor);
@ -503,6 +585,9 @@ uint8_t gatt_client_read_long_characteristic_descriptor(btstack_packet_handler_t
* @param callback * @param callback
* @param con_handle * @param con_handle
* @param descriptor_handle * @param descriptor_handle
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_read_long_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle); uint8_t gatt_client_read_long_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle);
@ -512,6 +597,9 @@ uint8_t gatt_client_read_long_characteristic_descriptor_using_descriptor_handle(
* @param con_handle * @param con_handle
* @param descriptor_handle * @param descriptor_handle
* @param offset * @param offset
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle, uint16_t offset); uint8_t gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle, uint16_t offset);
@ -522,6 +610,9 @@ uint8_t gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_
* @param descriptor * @param descriptor
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_write_characteristic_descriptor(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_descriptor_t * descriptor, uint16_t length, uint8_t * data); uint8_t gatt_client_write_characteristic_descriptor(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_descriptor_t * descriptor, uint16_t length, uint8_t * data);
@ -532,6 +623,9 @@ uint8_t gatt_client_write_characteristic_descriptor(btstack_packet_handler_t cal
* @param descriptor_handle * @param descriptor_handle
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_write_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle, uint16_t length, uint8_t * data); uint8_t gatt_client_write_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle, uint16_t length, uint8_t * data);
@ -542,6 +636,9 @@ uint8_t gatt_client_write_characteristic_descriptor_using_descriptor_handle(btst
* @param descriptor * @param descriptor
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_write_long_characteristic_descriptor(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_descriptor_t * descriptor, uint16_t length, uint8_t * data); uint8_t gatt_client_write_long_characteristic_descriptor(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_descriptor_t * descriptor, uint16_t length, uint8_t * data);
@ -552,6 +649,9 @@ uint8_t gatt_client_write_long_characteristic_descriptor(btstack_packet_handler_
* @param descriptor_handle * @param descriptor_handle
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_write_long_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle, uint16_t length, uint8_t * data); uint8_t gatt_client_write_long_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle, uint16_t length, uint8_t * data);
@ -563,6 +663,9 @@ uint8_t gatt_client_write_long_characteristic_descriptor_using_descriptor_handle
* @param offset of value * @param offset of value
* @param length of data * @param length of data
* @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received * @param data is not copied, make sure memory is accessible until write is done, i.e. GATT_EVENT_QUERY_COMPLETE is received
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* ERROR_CODE_SUCCESS if query is successfully registered
*/ */
uint8_t gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle, uint16_t offset, uint16_t length, uint8_t * data); uint8_t gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset(btstack_packet_handler_t callback, hci_con_handle_t con_handle, uint16_t descriptor_handle, uint16_t offset, uint16_t length, uint8_t * data);
@ -576,7 +679,7 @@ uint8_t gatt_client_write_long_characteristic_descriptor_using_descriptor_handle
* @param characteristic * @param characteristic
* @param configuration GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_NOTIFICATION, GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_INDICATION * @param configuration GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_NOTIFICATION, GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_INDICATION
* @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found * @return status BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle is found
* GATT_CLIENT_IN_WRONG_STATE if peripheral is not ready * GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready
* GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED if configuring notification, but characteristic has no notification property set * GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED if configuring notification, but characteristic has no notification property set
* GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED if configuring indication, but characteristic has no indication property set * GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED if configuring indication, but characteristic has no indication property set
* ERROR_CODE_SUCCESS if query is successfully registered * ERROR_CODE_SUCCESS if query is successfully registered