Thanks for the hint @PJ_Glasso . Actually, I do not need XIAO esp32 C6 to listen constantly for BLE packet while sleeping.
I need for ESP32 to wake up every 1,28 seconds (clock) and advertise itself BLE; My phone is constantly searching, so when receive the first esp32 beacon the phone will try to connect. esp32, after the first beacon, will goes back sleeping to light sleep.
When esp32 will wake up again will receive the request to connect by phone. At this point, esp32 keep connection, don’t go to sleep, do actions. When bluetooth disconnect, esp32 goes to sleep.
The interval is very short (I can also make a bit longer depending on the battery time added) so I will user light sleep between the intervals. The overhead to wake up from deep sleep will consume more than constant light sleep.
How to implement it through esphome?