Hey guys,
I can't find an example of using multiple BLE services in an Server mode. I have three hall effect flow sensors and i want to convert that into flow rate, total flow, total remaining and tank size. So that's 12 characteristics that notify. I thought life was good it all works, I can create them for one and all is fine. If I create another I only get READ and not notify on one and no more characteristics show. Ideally, each sensor would have it's own service as in some installations there may only be 1 or 2 or 3 sensors.
If I simply create another service to the same server like this the ESP32 crashes and reboots upon BLE connection
BLEService *pService = pServer->createService(SERVICE_UUID);
BLEService *pService2 = pServer->createService(SERVICE2_UUID);
BLEService *pService3 = pServer->createService(SERVICE3_UUID);
My other option is the have 12 characteristics on a single service. Not ideal but that would be okay but it limits at 5 with Notify Descriptor on. the last one doesn't notify and the rest don't even show up on NRF Connect.
I see reference to numhandles here but can't find any information or examples that work.
https://github.com/nkolban/esp32-snippets/issues/263
Multplie BLE Services ?
Re: Multplie BLE Services ?
This seems to work which I thought it was I was doing. This example works. I must have an error somewhere.
viewtopic.php?t=7452
viewtopic.php?t=7452
Who is online
Users browsing this forum: No registered users and 69 guests