Closed
Description
Hardware:
Board: ESP32 Dev Module?
Core Installation/update date: @ 29b3a81
IDE name: Platform.io
Flash Frequency: 40Mhz
Upload Speed: 115200
Description:
WiFi.mode() not working. Set it to 0 (WIFI_OFF) and it stays at 3.
Sketch:
#include <Arduino.h>
#include <WiFi.h>
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println();
Serial.println("---------- WiFi Info --------");
WiFi.printDiag(Serial);
Serial.println();
WiFi.mode(WIFI_MODE_NULL);
Serial.println("---------- WiFi Info --------");
WiFi.printDiag(Serial);
Serial.println();
}
void loop() {
}
Debug Messages:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13256
entry 0x40078a90
---------- WiFi Info --------
E (61) wifi: esp_wifi_get_mode 799 wifi is not init
E (61) wifi: esp_wifi_get_channel 1214 wifi is not init
E (62) wifi: esp_wifi_get_auto_connect 1391 wifi is not init
Mode: NULL
Channel: 253
Auto connect: 63
E (71) wifi: esp_wifi_get_config 1057 wifi is not init
SSID (68): Ù..@ƒ..@d..@¸..@Ä..@ÿ..@t..@ò..@D..@Ã..@ò..@∞..@§é
Ä..˝?¥<¸?\.@?L..@
Passphrase (36): D..@Ã..@ò..@∞..@§é
Ä..˝?¥<¸?\.@?L..@
BSSID set: 48
---------- WiFi Info --------
Mode: AP
Channel: 0
Auto connect: 1
SSID (0):
Passphrase (0):
BSSID set: 1
so it is clear that WiFi.mode(WIFI_MODE_NULL) is not setting the mode to 0, but 3 which is AP.
Any ideas?