I am trying to match handles with UUID's post the esp_ble_gatts_create_attr_tab() call. Is there a function like esp_ble_gatts_get_attr_value() which rather than pulling the value using a handle allows me to get the original UUID I submitted when creating the characteristic?
If not whats the best way to dynamically (not via a static table) match my user supplied UUID's with the handles BLE creates please?
Regards
Richard
GATT Server, retrieving UUID from handle
-
Sang_Huynh
- Posts: 1
- Joined: Thu Nov 21, 2024 9:51 am
Re: GATT Server, retrieving UUID from handle
Hi Richard,
I'm curious about this case also, do you have any solutions yet.
Thanks.
I'm curious about this case also, do you have any solutions yet.
Thanks.
-
MicroController
- Posts: 2661
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: GATT Server, retrieving UUID from handle
In response to registering attributes with Bluedroid it sends ESP_GATTS_ADD_*_EVT events to your GATTS event handler, like ESP_GATTS_ADD_CHAR_EVT. The parameters coming with that event (e.g. struct gatts_add_char_evt_param) contain the handle and the UUID, which you can store and later use to look up the UUID for a given handle.
See also https://esp32.com/viewtopic.php?f=2&t=36973#p123872
See also https://esp32.com/viewtopic.php?f=2&t=36973#p123872
Who is online
Users browsing this forum: ChatGPT-User, Semrush [Bot] and 15 guests