Restart BLE after 200msec timeout
Posted: Fri Jul 05, 2019 10:50 am
Hello,
since some months I am working on a ESP32-Project for the first time and it is going on well. But now I have a great problem with BLE. (So far I am using Neil Kolban's cpp_utils from his esp32-snippets github repository for BLE.)
I need to shut down all BLE activities for ~200msec and than restart the same services and characteristics I have used before. Is there any option to set only BLE to sleep and wake it up again while other my tasks proceed?
I tried to stop advertising, but something still disturbs my time critical task that I have to execute in the meanwhile. (Without using "pServer->getAdvertising()->start()" at all, everything works fine. So the disturbance of my timing is due to BLE and I do need BLE before and after this break. What ever I have done to stop and start BLE again (BLEDevice::deinit/BLEDevice::init; stop/start Service,...) leads to the error massage "E(3229) BLECharacteristic: Characteristic already has a handle". I do not find any solution to get rid of this error.)
Does anyone have a hint how to stop and restart BLE on ESP32?
Thanks to all,
JJens
since some months I am working on a ESP32-Project for the first time and it is going on well. But now I have a great problem with BLE. (So far I am using Neil Kolban's cpp_utils from his esp32-snippets github repository for BLE.)
I need to shut down all BLE activities for ~200msec and than restart the same services and characteristics I have used before. Is there any option to set only BLE to sleep and wake it up again while other my tasks proceed?
I tried to stop advertising, but something still disturbs my time critical task that I have to execute in the meanwhile. (Without using "pServer->getAdvertising()->start()" at all, everything works fine. So the disturbance of my timing is due to BLE and I do need BLE before and after this break. What ever I have done to stop and start BLE again (BLEDevice::deinit/BLEDevice::init; stop/start Service,...) leads to the error massage "E(3229) BLECharacteristic: Characteristic already has a handle". I do not find any solution to get rid of this error.)
Does anyone have a hint how to stop and restart BLE on ESP32?
Thanks to all,
JJens