2016-12-01 07:20:22 -05:00
|
|
|
GATT CLIENT API
|
|
|
|
===============
|
|
|
|
|
|
|
|
Overview
|
|
|
|
--------
|
|
|
|
|
|
|
|
`Instructions`_
|
|
|
|
|
2017-01-17 14:03:26 -05:00
|
|
|
.. _Instructions: ../template.html
|
|
|
|
|
2016-12-01 07:20:22 -05:00
|
|
|
Application Example
|
|
|
|
-------------------
|
|
|
|
|
2017-01-19 03:16:06 -05:00
|
|
|
Check :example:`bluetooth` folder in ESP-IDF examples, which contains the following examples:
|
2016-12-01 07:20:22 -05:00
|
|
|
|
2017-01-19 03:16:06 -05:00
|
|
|
:example:`bluetooth/gatt_client`
|
2016-12-01 07:20:22 -05:00
|
|
|
|
2017-01-19 03:16:06 -05:00
|
|
|
This is a GATT client demo. This demo can scan devices, connect to the GATT server and discover the service.
|
2016-12-01 07:20:22 -05:00
|
|
|
|
|
|
|
|
|
|
|
API Reference
|
|
|
|
-------------
|
|
|
|
|
|
|
|
Header Files
|
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
2017-01-19 03:16:06 -05:00
|
|
|
* :component_file:`bt/bluedroid/api/include/esp_gattc_api.h`
|
2016-12-01 07:20:22 -05:00
|
|
|
|
|
|
|
Macros
|
|
|
|
^^^^^^
|
|
|
|
|
|
|
|
.. doxygendefine:: ESP_GATT_DEF_BLE_MTU_SIZE
|
|
|
|
.. doxygendefine:: ESP_GATT_MAX_MTU_SIZE
|
|
|
|
|
|
|
|
Type Definitions
|
|
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
|
2017-01-05 01:56:16 -05:00
|
|
|
.. doxygentypedef:: esp_gattc_cb_t
|
2016-12-01 07:20:22 -05:00
|
|
|
|
|
|
|
Enumerations
|
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
|
|
|
.. doxygenenum:: esp_gattc_cb_event_t
|
|
|
|
|
|
|
|
Structures
|
|
|
|
^^^^^^^^^^
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_reg_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_open_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_close_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_cfg_mtu_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_search_cmpl_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_search_res_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_read_char_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_write_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_exec_cmpl_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_notify_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_srvc_chg_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_congest_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_get_char_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_get_descr_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_get_incl_srvc_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_reg_for_notify_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. doxygenstruct:: esp_ble_gattc_cb_param_t::gattc_unreg_for_notify_evt_param
|
|
|
|
:members:
|
|
|
|
|
|
|
|
|
|
|
|
Functions
|
|
|
|
^^^^^^^^^
|
|
|
|
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_register_callback
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_app_register
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_app_unregister
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_open
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_close
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_config_mtu
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_search_service
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_get_characteristic
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_get_descriptor
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_get_included_service
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_read_char
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_read_char_descr
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_write_char
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_write_char_descr
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_prepare_write
|
2017-04-28 02:51:23 -04:00
|
|
|
.. doxygenfunction:: esp_ble_gattc_prepare_write_char_descr
|
2016-12-01 07:20:22 -05:00
|
|
|
.. doxygenfunction:: esp_ble_gattc_execute_write
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_register_for_notify
|
|
|
|
.. doxygenfunction:: esp_ble_gattc_unregister_for_notify
|
|
|
|
|