I'm adding two characteristics to a service in the ESP_GATTS_CREATE_EVT event:
gl_test.char_uuid[0].len = ESP_UUID_LEN_16;
gl_test.char_uuid[0].uuid.uuid16 = ...;
esp_ble_gatts_add_char(gl_test.service_handle, &gl_test.char_uuid[0], ESP_GATT_PERM_READ, ESP_GATT_CHAR_PROP_BIT_READ);
gl_test.char_uuid[1].len = ESP_UUID_LEN_16;
gl_test.char_uuid[1].uuid.uuid16 = ...;
esp_ble_gatts_add_char(gl_test.service_handle, &gl_test.char_uuid[1], ESP_GATT_PERM_READ, ESP_GATT_CHAR_PROP_BIT_READ);
For each of them, I get an ESP_GATTS_ADD_CHAR_EVT event. For the second characteristic, the status is 133.
Am I doing something wrong or is there a bug in the implementation?
cheers
Andreas
Unable to add more than 1 characteristic to a service
(Solved) Re: Unable to add more than 1 characteristic to a service
Fyi, it's working fine after I've increased the number of handles in esp_ble_gatts_create_service
Re: Unable to add more than 1 characteristic to a service
How did you increase the number of handles for the service? I am trying to added Body Sensor to the Heart Rate Service. Heart Rate Measurement is the only Characteristic I can get to show on the client....status 133 is being generated as well
Re: Unable to add more than 1 characteristic to a service
It was the last parameter in esp_ble_gatts_create_service:
But I've since switched to the new "database"-based API where you don't have the number of characteristics any more.
Code: Select all
esp_ble_gatts_create_service(gl_test.gatt_if, &gl_test.service_id, 1 + (nofCharacteristics() * 3));
-
- Posts: 1
- Joined: Fri Apr 07, 2017 8:08 am
Re: Unable to add more than 1 characteristic to a service
Any updates on this issue?
I can't see any relevant commits on the git repo...
I can't see any relevant commits on the git repo...
Who is online
Users browsing this forum: No registered users and 17 guests