Skip to content

Commit 382299a

Browse files
committed
WiFi driver must be managed by arduino, use arduino to init the driver for esp32 core.
1 parent cf2a20f commit 382299a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,11 @@ void setup() {
4444
// Disable wifi config persistance and auto reconnect
4545
WiFi.persistent(false);
4646
WiFi.setAutoReconnect(false);
47-
47+
4848
#if defined(ESP_PLATFORM)
4949
// Init the wifi driver on ESP32
50-
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
51-
esp_err_t err = esp_wifi_init(&cfg);
52-
if(err){
53-
log_e("esp_wifi_init %d", err);
54-
}
50+
WiFi.mode(WIFI_MODE_MAX);
51+
WiFi.mode(WIFI_MODE_NULL);
5552
#endif
5653

5754
Serial.begin(SERIAL_BAUD_RATE);

0 commit comments

Comments
 (0)