Updating a Characteristic Value for gatts

MarkIngle
Posts: 30
Joined: Wed Jan 18, 2017 4:48 am

Updating a Characteristic Value for gatts

Postby MarkIngle » Wed Feb 22, 2017 1:49 am

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!

Lucas.Hutchinson
Posts: 79
Joined: Tue Apr 26, 2016 5:10 am

Re: Updating a Characteristic Value for gatts

Postby Lucas.Hutchinson » Wed Feb 22, 2017 11:20 pm

I would also very much like to know how to do this.

MarkIngle
Posts: 30
Joined: Wed Jan 18, 2017 4:48 am

Re: Updating a Characteristic Value for gatts

Postby MarkIngle » Fri Feb 24, 2017 6:15 pm

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;

Who is online

Users browsing this forum: eli$84469 and 92 guests