Closed krupis closed 2 years ago
@krupis
I would recommend that you use tables to creat services, it looks cleaner and it's easy to extend.
you can refer this example gatt_server_service_table
@xiewenxiang thanks for the response. I used gatt_server_service_table and managed to create multiple characteristics quite easy. Do you know why they show 2 different methods of creating characteristics and services? In GATT_Server example and gatt_server_serivce_table ?
@krupis
The GATT_SERVER example was used the legacy method to create gatt service. It is more cumbersome, and not easy to modify.
Then we improved to use the table to create the service.
Thanks for reporting, feel free to reopen.
hello, for the ones starting with esp-idf and BLE: if you to declare a service with more than 256 attributes, you have to follow the gatt_server example ( #9388 ).
Hello. Is it possible to update the BLE GATT server example code to show how to add multiple characteristics on a single service? Current example code creates 2 services but only 1 characteristics each. I have found many other people having issues figuring out what is the esp-idf intended way of adding multiple characteristics. Some people suggested various workarounds but I havent found a single clean method yet.
The characteristic is being added with this code:
Unfortunately, dublicating this block of code and changing a few parameters (property,UUID..) did not work.
What I have found out so far :
I am trying to understand what are the differenes between this and GATT_Server example code. In the GATT_Server example, the characteristics are being created during ESP_GATTS_CREATE_EVT event. This event does not even exist in gatts table create demo example code. Could someone help me understand?