ESP32 bluetooth setup time too high?
Posted: Sun Mar 21, 2021 4:40 pm
Hello!
I am trying to push down a time an ESP32 need to be awake and I found out BLE "setup" (from init to advertising) after deep sleep is around 600ms. Is this something normal? I am not experienced in this field but I would think that beacons do this much faster. Minimal example bellow. Any hints are very welcome.
I am trying to push down a time an ESP32 need to be awake and I found out BLE "setup" (from init to advertising) after deep sleep is around 600ms. Is this something normal? I am not experienced in this field but I would think that beacons do this much faster. Minimal example bellow. Any hints are very welcome.
Code: Select all
t_ble_setup_start = esp_timer_get_time();;
BLEDevice::init("ESP32_1");
pAdvertising = BLEDevice::getAdvertising();
pAdvertising->start();
t_advert = esp_timer_get_time();
Serial.print("Ble setup took ms: ");
Serial.println((long)((t_advert - t_ble_setup_start) / 1000));