Write data to characteristic in Service Table

doduong
Posts: 7
Joined: Wed Aug 30, 2017 7:58 am

Write data to characteristic in Service Table

Postby doduong » Fri Sep 22, 2017 7:26 am

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.

doduong
Posts: 7
Joined: Wed Aug 30, 2017 7:58 am

Re: Write data to characteristic in Service Table

Postby doduong » Sat Sep 23, 2017 6:59 am

Someone can help me ?

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Write data to characteristic in Service Table

Postby kolban » Sat Sep 23, 2017 6:50 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 63 guests