Page 1 of 1
Updating a Characteristic Value for gatts
Posted: Wed Feb 22, 2017 1:49 am
by MarkIngle
What function call do I use to send the value of the characteristic and the updates to the value? I think its esp_ble_gatts_add_char but I am not sure...the APIs are tough for me to understand. Thanks in advance!
Re: Updating a Characteristic Value for gatts
Posted: Wed Feb 22, 2017 11:20 pm
by Lucas.Hutchinson
I would also very much like to know how to do this.
Re: Updating a Characteristic Value for gatts
Posted: Fri Feb 24, 2017 6:15 pm
by MarkIngle
Walking through the code I found this structure that appears to be related to passing the value back to the requesting client.
Its located neat the bottom of the esp_gatt_defs.h file
/// Gatt attribute value
typedef struct {
uint8_t value[ESP_GATT_MAX_ATTR_LEN]; /*!< Gatt attribute value */
uint16_t handle; /*!< Gatt attribute handle */
uint16_t offset; /*!< Gatt attribute value offset */
uint16_t len; /*!< Gatt attribute value length */
uint8_t auth_req; /*!< Gatt authentication request */
} esp_gatt_value_t;
/// GATT remote read request response type
typedef union {
esp_gatt_value_t attr_value; /*!< Gatt attribute structure */
uint16_t handle; /*!< Gatt attribute handle */
} esp_gatt_rsp_t;