Hi
I am trying to create a service and characteristic with 128 bit UUID. I am using gatt_server_service_table_demo (in table services and characteristic are 16 bit in example code) . I have changed the service to 128 bit in gatt tab but after that service is not getting discovered. Please let me know how I can declare services and characteristic with 128 bit UUID or I have to use esp_ble_gatts_create_service function.
Creating service and characteristic with 128 bit UUID
Re: Creating service and characteristic with 128 bit UUID
Hi
as I told I am not able to create services and characteristic of 128 bit UUID by declaring gatt_db array for example I am using a 128 bit service as below
// Service Declaration
[IDX_SVC] =
{{ESP_GATT_AUTO_RSP}, {ESP_UUID_LEN_128, (uint8_t *)service_uuid, ESP_GATT_PERM_READ,
ESP_UUID_LEN_128, sizeof(service_uuid), (uint8_t *)service_uuid}}
service_uuid contains 128 bit UUID in an array.
Which is not working. Please let me know the correct way to declare 128 bit UUID
as I told I am not able to create services and characteristic of 128 bit UUID by declaring gatt_db array for example I am using a 128 bit service as below
// Service Declaration
[IDX_SVC] =
{{ESP_GATT_AUTO_RSP}, {ESP_UUID_LEN_128, (uint8_t *)service_uuid, ESP_GATT_PERM_READ,
ESP_UUID_LEN_128, sizeof(service_uuid), (uint8_t *)service_uuid}}
service_uuid contains 128 bit UUID in an array.
Which is not working. Please let me know the correct way to declare 128 bit UUID
Re: Creating service and characteristic with 128 bit UUID
Any Update On this ???
Re: Creating service and characteristic with 128 bit UUID
Here you have nice tutorial with info you need:
https://github.com/espressif/esp-idf/bl ... bute-table
You changed this initialization too much:
https://github.com/espressif/esp-idf/bl ... bute-table
You changed this initialization too much:
Code: Select all
[IDX_SVC] =
{{ESP_GATT_AUTO_RSP}, {ESP_UUID_LEN_128, (uint8_t *)service_uuid, ESP_GATT_PERM_READ,
ESP_UUID_LEN_128, sizeof(service_uuid), (uint8_t *)service_uuid}}
(uint8_t *)&primary_service_uuid: UUID to identify the service as a primary one (0x2800).
Who is online
Users browsing this forum: Google [Bot] and 117 guests