Page 1 of 1

Write data to characteristic in Service Table

Posted: Fri Sep 22, 2017 7:26 am
by doduong
Hi everyone,

I'm working with ESP32 using sample project "gatt_server_service_table". I have a service with 4 characteristic. Now, I want to write data to characteristic. I use this function in event : ESP_GATTS_READ_EVT

Code: Select all

esp_ble_gatts_get_attr_value(uint16_t attr_handle, uint16_t *length, const uint8_t **value)
I don't know how to find "attr_handle" of the characteristic, which need to be written data.
Someone can help me ?
Thanks very much.

Re: Write data to characteristic in Service Table

Posted: Sat Sep 23, 2017 6:59 am
by doduong
Someone can help me ?

Re: Write data to characteristic in Service Table

Posted: Sat Sep 23, 2017 6:50 pm
by kolban
If you are willing to use C++ as opposed to C, I can possibly assist through the use of some BLE C++ wrappers ... see:

https://github.com/nkolban/esp32-snippe ... 0Guide.pdf

However as of today (2017-09-23) there is a breaking change in the ESP-IDF that I am working feverishly to accommodate .. so I'd hold off a few days.