Delayed WiFi.begin() with "ESP32 WROVER Module" board selected
Posted: Tue Aug 21, 2018 5:59 am
There is a 1500ms delay between WiFi.begin() and SYSTEM_EVENT_WIFI_READY using an ESP32-WROVER with "ESP32 WROVER Module" selected as board in Arduino IDE.
This problem does not occur if a different board is selected. Tested using the same ESP32-WROVER physical module but with "ESP32 Dev Module" selected, the SYSTEM_EVENT_WIFI_READY returns in 90-100ms (normal).
Also, this problem does not occur if a different SoC is used. Tested using a Wemos LOLIN32 (ESP-WROOM-32) with "ESP32 WROVER Module" selected as the board, again it performs normally (90-100ms).
Test code:
Typical output using ESP-WROOM-32 with "ESP32 Dev Module" (OK):
Typical output using ESP-WROOM-32 with "ESP32 Wrover Module" (OK):
Typical output using ESP32-WROVER with "ESP32 Dev Module" (OK):
Typical output using ESP32-WROVER with "ESP32 Wrover Module" (SLOW):
This problem does not occur if a different board is selected. Tested using the same ESP32-WROVER physical module but with "ESP32 Dev Module" selected, the SYSTEM_EVENT_WIFI_READY returns in 90-100ms (normal).
Also, this problem does not occur if a different SoC is used. Tested using a Wemos LOLIN32 (ESP-WROOM-32) with "ESP32 WROVER Module" selected as the board, again it performs normally (90-100ms).
Test code:
Code: Select all
#include <WiFi.h>
void WiFiEvent(WiFiEvent_t event)
{
switch (event)
{
case SYSTEM_EVENT_WIFI_READY:
Serial.print("[");Serial.print(millis());Serial.print("ms]\t");
Serial.println("WiFi ready");
break;
case SYSTEM_EVENT_STA_CONNECTED:
Serial.print("[");Serial.print(millis());Serial.print("ms]\t");
Serial.println("Station connected");
break;
case SYSTEM_EVENT_STA_GOT_IP:
Serial.print("[");Serial.print(millis());Serial.print("ms]\t");
Serial.print("IP address: ");Serial.println(WiFi.localIP());
break;
}
}
void setup()
{
Serial.begin(115200);
WiFi.onEvent(WiFiEvent);
WiFi.begin();
}
void loop()
{
delay(1000);
}
Code: Select all
[90ms] WiFi ready
[1054ms] Station connected
[1069ms] IP address: 192.168.0.140
Code: Select all
[93ms] WiFi ready
[1012ms] Station connected
[1060ms] IP address: 192.168.0.140
Code: Select all
[96ms] WiFi ready
[1103ms] Station connected
[1145ms] IP address: 192.168.0.46
Code: Select all
[1501ms] WiFi ready
[2431ms] Station connected
[2449ms] IP address: 192.168.0.46