We are using the ESP32-PICO-D4 on a dev board.
We use light sleep in our code to save battery when there is no need for processing.
However, it seems that once you disable BLE there is not way to re-init the device and be able to communicate again.
We’ve searched everywhere but no one seems to have been able to solve this.
Have you had experience with light sleep and BLE?
I’ve never experimented with light sleep with Bluetooth.
Light sleep turns off Wi-Fi and Bluetooth. So, I guess that you need to enable it again after waking up.
Take a look at this discussion, it might help (it is about deep sleep, but might have some useful information for your case): https://github.com/nkolban/esp32-snippets/issues/354
It can also be useful to take a look at the Bluetooth API:
I hope this helps.
Thanks for your quick reply and for the materials you found.
Unfortunately we have scanned these materials and many others, but to no avail.
The problem is restarting BLE, not shutting it off. This is a problem even if no sleep (light or otherwise) is induced.
Thanks and best regards,
A quick search showed this. I have not done anything with BLE as yet but was surprised that the ESP32 can only do either WiFi or BLE but not both at the same time. I am going to have to rethink my project.
Thanks for getting involved, Steve. The link you attached is about one aspect of BLE. Going into light sleep will disable all BLE.
Not sure why you say that ESP32 can only do either BLE or WiFi. In our project we use ESP-NOW (Thanks RNT for exposing this great inter-device comm method to us) which is WiFi based as well as BLE without a problem (beside the BLE restart issue, which others seem to encounter as well)..
If you want to share your project here, maybe one of us can help…
I’ve searched for a while and it seems that many people have the same issue. But I couldn’t find any proper solution: https://github.com/nkolban/esp32-snippets/issues/351