
Description
I've switched to the staging package, because it supports NodeMCU V1.0 and has some important fixes included. But the project that I'm running now suddenly starts in AP_STA mode instead of STA only. Code used is 100% unchanged.
I've have created a simple test sketch to demonstrate the issue:
include <ESP8266WiFi.h>
void setup()
{
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println("Config AP");
WiFi.softAP("ESP_DEMO", "secure");
Serial.println("Set to STA mode");
WiFi.mode(WIFI_STA);
Serial.println("Wifi begin");
WiFi.begin("MYAP", "********");
}
output using package 1.6.4-673-g8cd3697 (may 22nd)
Config AP
mode : sta(18:fe:34:a6:d6:84) + softAP(1a:fe:34:a6:d6:84)
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1
add if1
bcn 100
Set to STA mode
bcn 0
del if1
mode : sta(18:fe:34:a6:d6:84)
Wifi begin
output using package 1.6.5-804-g2d340c7 (june 26th)
Config AP
scandone
del if0
mode : softAP(1a:fe:34:a6:d6:84)
Set to STA mode
bcn 0
del if1
usl
sul 0 0
mode : sta(18:fe:34:a6:d6:84)
add if0
Wifi begin
mode : sta(18:fe:34:a6:d6:84) + softAP(1a:fe:34:a6:d6:84)
as you can see (last line) it now starts sta + softAP ! after Wifi.begin command....