Hello,
Im having issues with being able to use the notify property for all services. I have currently set up my code to produce 2 services. Both services are used to transmit sensor data. For some reason even when i send the data on the separate Service, all notify data is only being seen on the first service. I feel like its an issue with the conn_id of each profile but i cant seem to narrow down the issue.
Attached is my code, hopefully someone can catch this bug that i cant seem to find why it keeps attaching to the first service. I deactivated the Notify on the first service but still cant see the notify on the second service
ESP32 BLE Notify only working on Initial service
ESP32 BLE Notify only working on Initial service
- Attachments
-
- EarMuffBLE.c
- (63.97 KiB) Downloaded 536 times
Re: ESP32 BLE Notify only working on Initial service
Hi, first of all notifications are sent for characteristics not services. Service is set of characteristic and each characteristic can have value, service cant have any value.
Now your issue. You have hardcoded attribute handle value and in both cases its the same value:
When you are creating service, characteristic or descriptor you should store attribute handle returned in proper event like:
Now your issue. You have hardcoded attribute handle value and in both cases its the same value:
Code: Select all
uint16_t attr_handle = 0x002a;
Code: Select all
ESP_GATTS_CREATE_EVT
Who is online
Users browsing this forum: Bing [Bot] and 112 guests