[GH-ISSUE #782] Hotfixes: 2nd time WebPortal doesn't connect to same wi-fi #654

Closed
opened 2026-02-28 01:26:24 +03:00 by kerem · 25 comments
Owner

Originally created by @dontsovcmc on GitHub (Dec 11, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/782

Basic Infos

If run Web Portal second time (after good connect first time) it doesn't connect.
This happend both with refill Wi-Fi & pass and no fill previous Wi-Fi.
If I fill another Wi-Fi - ESP connects successfully.

Hardware

WiFimanager Branch/Release:

  • [x ] HotFixes
    Esp8266/Esp32:
  • ESP8266

Hardware:

  • [x ] ESP01

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • staging (master/dev)
    i don't know.
# ESP8266 platform
# ------------------------------
name=ESP8266 Modules
version=2.4.2

Debug Messages

*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
*WM: [ERROR] WiFi.begin res:
*WM: 0
*WM: Waiting for connection result with time out
*WM: Connection timed out
*WM: Connection result:
*WM: 0
*WM: Failed to connect.
*WM: Request redirected to captive portal

If I write another wi-fi title - OK

*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: Waiting for connection result with time out
*WM: Connection result:
*WM: 3
000:00:02:05:224  NOTICE    (AP) : Connected to wifi. Save settings, go to sleep

If I don't fill Wi-Fi & Pass:

*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: Using last saved values, should be faster
*WM: Waiting for connection result with time out
*WM: Connection timed out
*WM: Connection result:
*WM: 0
*WM: Failed to connect.

// hard turned off ESP (EN = LOW)

// Wake up ESP to transmitting data - It connects successfully! 
rl␀l��|␀�l�|␂␌␌␌�␌l�␌b|��␂�␒�r�bl␌b��nn�lnn���␌b␜p��lrlrlp�n�␐␂␌␌�␌l␌��␌␌␌b␌n�|␂l�␌␌�b��nn�␀l��l`␂�␒␒nn␌l`␂␎␂nr���n␌␌b␌�␎l␎r��n␌␌b␌�␎l�bbb␌␌���l`␂��n�␂000:00:00:00:050  NOTICE    (ESP) : Booted
000:00:00:00:119  NOTICE    (WIF) : Starting Wifi
000:00:00:00:124  NOTICE    (WIF) : Wifi status: 6
....
000:00:00:03:332  NOTICE    (WIF) : Wifi status: 6
000:00:00:03:532  NOTICE    (WIF) : Connected, got IP address: 10.1.30.45
000:00:00:04:251  NOTICE    (BLK) : disconnected
Originally created by @dontsovcmc on GitHub (Dec 11, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/782 ### Basic Infos If run Web Portal second time (after good connect first time) it doesn't connect. This happend both with refill Wi-Fi & pass and no fill previous Wi-Fi. If I fill another Wi-Fi - ESP connects successfully. #### Hardware **WiFimanager Branch/Release:** - [x ] HotFixes **Esp8266/Esp32:** - [x] ESP8266 **Hardware:** - [x ] ESP01 **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ ] 2.4.0 - [ ] staging (master/dev) i don't know. ``` .platformio/framework-arduioespressif8266/platform.txt: # ESP8266 platform # ------------------------------ name=ESP8266 Modules version=2.4.2 ``` ### Debug Messages ``` *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 6 *WM: [ERROR] WiFi.begin res: *WM: 0 *WM: Waiting for connection result with time out *WM: Connection timed out *WM: Connection result: *WM: 0 *WM: Failed to connect. *WM: Request redirected to captive portal ``` If I write another wi-fi title - OK ``` *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 0 *WM: [ERROR] WiFi.begin res: *WM: 6 *WM: Waiting for connection result with time out *WM: Connection result: *WM: 3 000:00:02:05:224 NOTICE (AP) : Connected to wifi. Save settings, go to sleep ``` If I don't fill Wi-Fi & Pass: ``` *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 0 *WM: Using last saved values, should be faster *WM: Waiting for connection result with time out *WM: Connection timed out *WM: Connection result: *WM: 0 *WM: Failed to connect. // hard turned off ESP (EN = LOW) // Wake up ESP to transmitting data - It connects successfully! rl␀l��|␀�l�|␂␌␌␌�␌l�␌b|��␂�␒�r�bl␌b��nn�lnn���␌b␜p��lrlrlp�n�␐␂␌␌�␌l␌��␌␌␌b␌n�|␂l�␌␌�b��nn�␀l��l`␂�␒␒nn␌l`␂␎␂nr���n␌␌b␌�␎l␎r��n␌␌b␌�␎l�bbb␌␌���l`␂��n�␂000:00:00:00:050 NOTICE (ESP) : Booted 000:00:00:00:119 NOTICE (WIF) : Starting Wifi 000:00:00:00:124 NOTICE (WIF) : Wifi status: 6 .... 000:00:00:03:332 NOTICE (WIF) : Wifi status: 6 000:00:00:03:532 NOTICE (WIF) : Connected, got IP address: 10.1.30.45 000:00:00:04:251 NOTICE (BLK) : disconnected ```
kerem 2026-02-28 01:26:24 +03:00
Author
Owner

@tablatronix commented on GitHub (Dec 12, 2018):

Try hotfixes branch

<!-- gh-comment-id:446423170 --> @tablatronix commented on GitHub (Dec 12, 2018): Try hotfixes branch
Author
Owner

@tablatronix commented on GitHub (Dec 12, 2018):

Ohh lol this is that bug in hotfixes from the other issue we were discussing

<!-- gh-comment-id:446423425 --> @tablatronix commented on GitHub (Dec 12, 2018): Ohh lol this is that bug in hotfixes from the other issue we were discussing
Author
Owner

@tablatronix commented on GitHub (Dec 12, 2018):

Ill try to fix , I have been extremly busy

<!-- gh-comment-id:446423519 --> @tablatronix commented on GitHub (Dec 12, 2018): Ill try to fix , I have been extremly busy
Author
Owner

@Egor2101 commented on GitHub (Jan 31, 2019):

Hey. If run Web Portal second time (after good connect first time) it doesn't connect.
How to solve this problem? Thank.

<!-- gh-comment-id:459430347 --> @Egor2101 commented on GitHub (Jan 31, 2019): Hey. If run Web Portal second time (after good connect first time) it doesn't connect. How to solve this problem? Thank.
Author
Owner

@tablatronix commented on GitHub (Jan 31, 2019):

What do you mean if you run webportal a second time ? ONdemand ? Or after a reset?

<!-- gh-comment-id:459486906 --> @tablatronix commented on GitHub (Jan 31, 2019): What do you mean if you run webportal a second time ? ONdemand ? Or after a reset?
Author
Owner

@Egor2101 commented on GitHub (Jan 31, 2019):

after a reset.

<!-- gh-comment-id:459506118 --> @Egor2101 commented on GitHub (Jan 31, 2019): after a reset.
Author
Owner

@tablatronix commented on GitHub (Jan 31, 2019):

you mean when you savewifi or just after reset it wont connect ?

<!-- gh-comment-id:459510050 --> @tablatronix commented on GitHub (Jan 31, 2019): you mean when you savewifi or just after reset it wont connect ?
Author
Owner

@tablatronix commented on GitHub (Jan 31, 2019):

I might have to fix this, it does nothing unless you set wifiManager.setBreakAfterConfig(true);
Probably need to add a param callback, else this really cannot work properly the way it has always been written.

<!-- gh-comment-id:459539411 --> @tablatronix commented on GitHub (Jan 31, 2019): I might have to fix this, it does nothing unless you set `wifiManager.setBreakAfterConfig(true);` Probably need to add a param callback, else this really cannot work properly the way it has always been written.
Author
Owner

@tablatronix commented on GitHub (Feb 7, 2019):

Anyone test this.

<!-- gh-comment-id:461265011 --> @tablatronix commented on GitHub (Feb 7, 2019): Anyone test this.
Author
Owner

@dontsovcmc commented on GitHub (Feb 7, 2019):

I try to test, thank you very much!
So, I need to add wifiManager.setBreakAfterConfig(true); to my code before start portal?

<!-- gh-comment-id:461406520 --> @dontsovcmc commented on GitHub (Feb 7, 2019): I try to test, thank you very much! So, I need to add `wifiManager.setBreakAfterConfig(true);` to my code before start portal?
Author
Owner

@tablatronix commented on GitHub (Feb 7, 2019):

yes if you want to use the callback, for now

<!-- gh-comment-id:461557829 --> @tablatronix commented on GitHub (Feb 7, 2019): yes if you want to use the callback, for now
Author
Owner

@dontsovcmc commented on GitHub (Feb 11, 2019):

I think, it doesn't work =(. Reconnect only if you enter wrong password, got fail, write correct.

connect to wi-fi OK
....
turn on setup portal for the second time.
write same ssid & password

*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: [ERROR] WiFi.begin res:
*WM: 0
*WM: Waiting for connection result with time out
*WM: Connection timed out
*WM: Connection result: 
*WM: 0
*WM: Failed to connect.
*WM: Request redirected to captive portal
....
*WM: Request redirected to captive portal
*WM: WiFi save
....

click ssid
write incorrect password

....
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: Waiting for connection result with time out
*WM: Connection result: 
*WM: 4
*WM: Failed to connect.
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: WiFi save
....

click ssid
write correct password

....
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 4
*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: Waiting for connection result with time out
*WM: Connection result: 
*WM: 3

OK

<!-- gh-comment-id:462528941 --> @dontsovcmc commented on GitHub (Feb 11, 2019): I think, it doesn't work =(. Reconnect only if you enter wrong password, got fail, write correct. ``` connect to wi-fi OK .... turn on setup portal for the second time. write same ssid & password *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 0 *WM: [ERROR] WiFi.begin res: *WM: 0 *WM: Waiting for connection result with time out *WM: Connection timed out *WM: Connection result: *WM: 0 *WM: Failed to connect. *WM: Request redirected to captive portal .... *WM: Request redirected to captive portal *WM: WiFi save .... click ssid write incorrect password .... *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 0 *WM: [ERROR] WiFi.begin res: *WM: 6 *WM: Waiting for connection result with time out *WM: Connection result: *WM: 4 *WM: Failed to connect. *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: WiFi save .... click ssid write correct password .... *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 4 *WM: [ERROR] WiFi.begin res: *WM: 6 *WM: Waiting for connection result with time out *WM: Connection result: *WM: 3 OK ```
Author
Owner

@tablatronix commented on GitHub (Feb 12, 2019):

I thought you were entering no wifi?

<!-- gh-comment-id:462582235 --> @tablatronix commented on GitHub (Feb 12, 2019): I thought you were entering no wifi?
Author
Owner

@dontsovcmc commented on GitHub (Feb 12, 2019):

update log: enter =(.
If I don't enter wi-fi I see No ssid, skipping wifi

<!-- gh-comment-id:462640826 --> @dontsovcmc commented on GitHub (Feb 12, 2019): update log: enter =(. If I don't enter wi-fi I see `No ssid, skipping wifi`
Author
Owner

@tablatronix commented on GitHub (Feb 12, 2019):

Yeah its supposed to

<!-- gh-comment-id:462753452 --> @tablatronix commented on GitHub (Feb 12, 2019): Yeah its supposed to
Author
Owner

@tablatronix commented on GitHub (Feb 12, 2019):

Wait so if you enter the wifi credentials they do not work? That is another open issue already

<!-- gh-comment-id:462755829 --> @tablatronix commented on GitHub (Feb 12, 2019): Wait so if you enter the wifi credentials they do not work? That is another open issue already
Author
Owner

@dontsovcmc commented on GitHub (Feb 12, 2019):

Yes, second time filled wi-fi doesnt connect.
you need to fill wrong password, wait error in log, change to correct password to connect.

Yes,if fields are empty no wifi connection.

<!-- gh-comment-id:462814153 --> @dontsovcmc commented on GitHub (Feb 12, 2019): Yes, second time filled wi-fi doesnt connect. you need to fill wrong password, wait error in log, change to correct password to connect. Yes,if fields are empty no wifi connection.
Author
Owner

@tablatronix commented on GitHub (Feb 12, 2019):

ok well you should be able to just leave it empty now at least and it will ignore it

There is a problem reconnecting once mode changes, and the only fix was to add a disconnect, I will check the other issue and see what the problem is, I thought there was a workaround in hotfixes for that already.

<!-- gh-comment-id:462903506 --> @tablatronix commented on GitHub (Feb 12, 2019): ok well you should be able to just leave it empty now at least and it will ignore it There is a problem reconnecting once mode changes, and the only fix was to add a disconnect, I will check the other issue and see what the problem is, I thought there was a workaround in hotfixes for that already.
Author
Owner

@dontsovcmc commented on GitHub (Feb 12, 2019):

I imagine to build ESP test board:
3 NodeMCU:

  1. Active Point, controled by script
  2. WIFI client - http requests, controled by script
  3. Target - with testing firmware. Flashing, reseting by script

We will be able to run scripts for different tasks

<!-- gh-comment-id:462905802 --> @dontsovcmc commented on GitHub (Feb 12, 2019): I imagine to build ESP test board: 3 NodeMCU: 1. Active Point, controled by script 2. WIFI client - http requests, controled by script 3. Target - with testing firmware. Flashing, reseting by script We will be able to run scripts for different tasks
Author
Owner

@dontsovcmc commented on GitHub (Mar 31, 2019):

Try to test connect 2nd time: Failed.
ESP-12
Branch: hotfix

I found a HACK:

in ESP8266WiFiSTA.cpp

wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase, int32_t channel, const uint8_t* bssid, bool connect) {

/*
    if(sta_config_equal(conf_compare, conf)) {
        DEBUGV("sta config unchanged");
    }
    else */ 
}
  1. run as client with saved ssid, pass
  2. run ConfigPortal + curl "http://192.168.4.1/wifisave?s=don&p=x"
  3. run ConfigPortal + curl "http://192.168.4.1/wifisave?s=don&p=x" SUCCESS!!!
--- Miniterm on /dev/cu.SLAB_USBtoUART  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
pm open,type:2 0
{l␀$��|␀�$�|␂␄␌␄�␄l�␄b|����␛�{�b�␄c�p~�N�␀lon���␌#␜p�#$ ␂{lp�o�␐␂␌␄���$␌��␌␄␌b␄n�|␂l�␌␌�b��nN�␂l��␀$ ␂�␓␒nN␄l ␃␏␃o{���o␌␄#␄�␎$␎rےo␌␄#␌�␎$�␒l�p␂�����r$��N�␂
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
Booted
scandone
6
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 
6

connected with donG, channel 3
dhcp client start...
6
6
ip:10.1.30.49,mask:255.255.255.0,gw:10.1.30.1
10.1.30.49
r$␀dܞ|␀�l�|␃␄␌␌�␌$�␄c|����␛�{�#�␄b��on�lno���␌B␜p��#l ␂{lp�n�␐␃␄␄�␄l␄��␄␌␄b␄o�|␂l�␌␄�b��No�␃$��l`␃�␒␛No␌$`␂␎␂n{�ےo␌␄#␄�␏l␎{��n␄␌b␌�␎$�␒l�p␃���␒�`␃��n�␃
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
Booted
scandone
del if0
usl
mode : softAP(62:01:94:29:66:e8)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
*WM: 
*WM: Configuring access point... 
*WM: WM_TEST
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
add 1
aid 1
station: 28:cf:e9:1e:ea:91 join, AID = 1
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8)
add if0
*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: wifi_get_opmode(): 
*WM: 3
*WM: Persistent:
*WM: 1
*WM: Waiting for connection result with time out
scandone
switch to channel 3
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with don, channel 3
dhcp client start...
ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1
*WM: Connection result: 
*WM: 3
station: 28:cf:e9:1e:ea:91 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(60:01:94:29:66:e8)
*WM: freeing allocated params!
rl␀$ܞ|␀�l�|␂␌␌␄�␄l�␄b|��␃�␛��|␛b�␜p␄��no�lNn���␌B␜p��bl ␃{lp�N�␐␂␌␄�␄$␌��␄␌␄b␌N�|␂l�␌␄�p␌��Nn�␀l��␀l ␃�␒␛on␌$`␂␎␃or����␂␄␌b␌�␏l␏rےn␄␌"␌�␏l�␒l�p␃��ܜ�{l��o�␃
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
Booted
scandone
del if0
usl
mode : softAP(62:01:94:29:66:e8)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
*WM: 
*WM: Configuring access point... 
*WM: WM_TEST
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
add 1
aid 1
station: 28:cf:e9:1e:ea:91 join, AID = 1
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8)
add if0
*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: wifi_get_opmode(): 
*WM: 3
*WM: Persistent:
*WM: 1
*WM: Waiting for connection result with time out
scandone
switch to channel 3
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with don, channel 3
dhcp client start...
ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1
*WM: Connection result: 
*WM: 3
station: 28:cf:e9:1e:ea:91 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(60:01:94:29:66:e8)
*WM: freeing allocated params!
<!-- gh-comment-id:478397027 --> @dontsovcmc commented on GitHub (Mar 31, 2019): Try to test connect 2nd time: Failed. ESP-12 Branch: hotfix I found a HACK: in ESP8266WiFiSTA.cpp ``` wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase, int32_t channel, const uint8_t* bssid, bool connect) { /* if(sta_config_equal(conf_compare, conf)) { DEBUGV("sta config unchanged"); } else */ } ``` 1. run as client with saved ssid, pass 2. run ConfigPortal + curl "http://192.168.4.1/wifisave?s=don&p=x" 3. run ConfigPortal + curl "http://192.168.4.1/wifisave?s=don&p=x" **SUCCESS!!!** ``` --- Miniterm on /dev/cu.SLAB_USBtoUART 115200,8,N,1 --- --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- pm open,type:2 0 {l␀$��|␀�$�|␂␄␌␄�␄l�␄b|����␛�{�b�␄c�p~�N�␀lon���␌#␜p�#$ ␂{lp�o�␐␂␌␄���$␌��␌␄␌b␄n�|␂l�␌␌�b��nN�␂l��␀$ ␂�␓␒nN␄l ␃␏␃o{���o␌␄#␄�␎$␎rےo␌␄#␌�␎$�␒l�p␂�����r$��N�␂ SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687 Booted scandone 6 scandone state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt 6 connected with donG, channel 3 dhcp client start... 6 6 ip:10.1.30.49,mask:255.255.255.0,gw:10.1.30.1 10.1.30.49 r$␀dܞ|␀�l�|␃␄␌␌�␌$�␄c|����␛�{�#�␄b��on�lno���␌B␜p��#l ␂{lp�n�␐␃␄␄�␄l␄��␄␌␄b␄o�|␂l�␌␄�b��No�␃$��l`␃�␒␛No␌$`␂␎␂n{�ےo␌␄#␄�␏l␎{��n␄␌b␌�␎$�␒l�p␃���␒�`␃��n�␃ SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687 Booted scandone del if0 usl mode : softAP(62:01:94:29:66:e8) add if1 dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) bcn 100 *WM: *WM: Configuring access point... *WM: WM_TEST *WM: AP IP address: *WM: 192.168.4.1 *WM: HTTP server started add 1 aid 1 station: 28:cf:e9:1e:ea:91 join, AID = 1 *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Handle root *WM: WiFi save *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 6 mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8) add if0 *WM: [ERROR] WiFi.begin res: *WM: 6 *WM: wifi_get_opmode(): *WM: 3 *WM: Persistent: *WM: 1 *WM: Waiting for connection result with time out scandone switch to channel 3 state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt connected with don, channel 3 dhcp client start... ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1 *WM: Connection result: *WM: 3 station: 28:cf:e9:1e:ea:91 leave, AID = 1 rm 1 bcn 0 del if1 pm open,type:2 0 mode : sta(60:01:94:29:66:e8) *WM: freeing allocated params! rl␀$ܞ|␀�l�|␂␌␌␄�␄l�␄b|��␃�␛��|␛b�␜p␄��no�lNn���␌B␜p��bl ␃{lp�N�␐␂␌␄�␄$␌��␄␌␄b␌N�|␂l�␌␄�p␌��Nn�␀l��␀l ␃�␒␛on␌$`␂␎␃or����␂␄␌b␌�␏l␏rےn␄␌"␌�␏l�␒l�p␃��ܜ�{l��o�␃ SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687 Booted scandone del if0 usl mode : softAP(62:01:94:29:66:e8) add if1 dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) bcn 100 *WM: *WM: Configuring access point... *WM: WM_TEST *WM: AP IP address: *WM: 192.168.4.1 *WM: HTTP server started add 1 aid 1 station: 28:cf:e9:1e:ea:91 join, AID = 1 *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Handle root *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Handle root *WM: WiFi save *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 6 mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8) add if0 *WM: [ERROR] WiFi.begin res: *WM: 6 *WM: wifi_get_opmode(): *WM: 3 *WM: Persistent: *WM: 1 *WM: Waiting for connection result with time out scandone switch to channel 3 state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt connected with don, channel 3 dhcp client start... ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1 *WM: Connection result: *WM: 3 station: 28:cf:e9:1e:ea:91 leave, AID = 1 rm 1 bcn 0 del if1 pm open,type:2 0 mode : sta(60:01:94:29:66:e8) *WM: freeing allocated params! ```
Author
Owner

@dontsovcmc commented on GitHub (Apr 1, 2019):

@tablatronix look, I think, I found a bug in ESP8266WiFiSTA!

Wow.. I debugging ESP8266WiFiSTA.cpp, so this is not your bugs..

I try to understand: is configurations are same? I print structures as hex and see, that

    Serial.println("conf_compare:");
    char *p = (char*)(void*)&conf_compare;
    char b[5] = { 0, 0, 0, 0, 0};
    for (unsigned int i = 0; i < sizeof(struct station_config); i++) {
        snprintf(b, 3, "%02X", *p);
        p++;
        Serial.print(b);
    }

    Serial.println();
    Serial.println("conf:");
    p = (char*)(void*)&conf;
    for (unsigned int i = 0; i < sizeof(struct station_config); i++) {
        snprintf(b, 3, "%02X", *p);
        p++;
        Serial.print(b);
    }
  1. conf_compare & conf have a lot of garbage cause doesn't setmem 0 when creating.
  2. the function sta_config_equal doesn't works good, because there are no some fields of station_config!!

Look! Is the same SSID & password Wi-Fi structures are same?

conf_compare:
646F6E0000000000000000000000000000000000000000000000000000000000
3232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

000107BEF5C074400000000000000000001000000

conf:
646F6E0000000000000000000000000000000000000000000000000000000000
3232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00000000000000000810000000200000001000000

I make:

  1. add all fields to sta_config_equal
  2. memset 0 for all struct station_config
    It works!
***************************************************************************************************************************************
Obsolete PIO Core v3.6.0 is used (previous was 3.6.6)
Please remove multiple PIO Cores from a system:
http://docs.platformio.org/page/faq.html#multiple-pio-cores-in-a-system
***************************************************************************************************************************************
--- Miniterm on /dev/cu.SLAB_USBtoUART  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
s$␀l��|␀�l�|␃␄␄␌�␌d�␜p�{�␃�␒�r�#�␌#�p␡�n�loN���␌c␜p��$r$rdp�o�␐␃␌␄�␄l␄��␄␌␄b␌N�|␂l�␄␌�b��oN�␃d��␀$`␃�␒␒oN␌d`␃␏␂nr���N␌␄c␄�␎$␎{��o␄␌b␌�␏l�␒l�p␂���␒�`␂��n�␂
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
Booted
scandone
6
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 
6

connected with don, channel 3
dhcp client start...
6
6
ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1
192.168.1.50
pm open,type:2 0
rl␀$ܟ|␀�l�|␂␌␌␄�␄l�␄b|��␂�␛�{��␟�␄b��oo�lNn��c␌"␜p��cd`␃{lp�n�␐␃␌␄�␄l␄��␌␌␄c␄n�|␃l�␌␄�p␄�|~�o�␂l��␀$`␃�␓2No␄l ␂␏␂n{���N␌␄#␄�␎$␎r��N␌␄c␄�␎$�␛$��$���␒�`␂��o�␃
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
Booted
scandone
del if0
usl
mode : softAP(62:01:94:29:66:e8)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
*WM: 
*WM: Configuring access point... 
*WM: WM_TEST
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
add 1
aid 1
station: 28:cf:e9:1e:ea:91 join, AID = 1
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8)
add if0
conf_compare:
646F6E0000000000096020402FFBFE3F000000000000000000000000000000003232327177654153445A58430000000001000000FC0BFF3FA0902040F4E8FE3F22030000220300000600003600FCFE3F0700000064E7FE3F060000000CFCFE3F00107BEF5C074400000000000000000001000000
conf:
646F6E4700000000000000000000000000000000000000000000000000000000323232383930717765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: wifi_get_opmode(): 
*WM: 3
*WM: Persistent:
*WM: 1
*WM: Waiting for connection result with time out
scandone
switch to channel 3
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with donG, channel 3
dhcp client start...
ip:10.1.30.49,mask:255.255.255.0,gw:10.1.30.1
*WM: Connection result: 
*WM: 3
station: 28:cf:e9:1e:ea:91 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(60:01:94:29:66:e8)
*WM: freeing allocated params!
rl␀$ܞ|␀�$�|␂␌␌␄�␄l�␄c|��␂�␛�{��␟�␄b��oN�lNo��c␄"␜p�cl ␃{lp�n�␐␂␌␄�␄$␌��␌␄␌#␌o�|␃d�␜�␄�p␄�|␡�n�␂$��l`␂�␒␛oN␌$`␃␏␂nr���N␌␄b␌�␎l␏rےn␌␄c␄�␎$�␛d�p␃��œ�{$��n�␂
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
Booted
scandone
del if0
usl
mode : softAP(62:01:94:29:66:e8)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
*WM: 
*WM: Configuring access point... 
*WM: WM_TEST
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
add 1
aid 1
station: 28:cf:e9:1e:ea:91 join, AID = 1
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8)
add if0
conf_compare:
646F6E4700000000000000000000000000000000000000000000000000000000323232839307177650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000127BEF58074400000000000000000001000000
conf:
646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A5843000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: wifi_get_opmode(): 
*WM: 3
*WM: Persistent:
*WM: 1
*WM: Waiting for connection result with time out
scandone
switch to channel 3
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with don, channel 3
dhcp client start...
ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1
*WM: Connection result: 
*WM: 3
station: 28:cf:e9:1e:ea:91 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(60:01:94:29:66:e8)
*WM: freeing allocated params!
rl␀$ܞ|␀�l�|␂␌␄␌�␄l�␌c|��␂�p␃�{�c�␌c��on�␀$oo���␄c␜p�$r$rlp�o�␐␃␄␌�␌l␄��␌␄␌c␄o�|␃d�␜�␄�p␄��no�␂l��␀d`␃�␒␛oN␌$`␃␎␃or�ےn␄␌B␄�␏$␎r��N␌␄c␌�␎d�␛l�p␃���␓� ␃��o�␃
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
Booted
scandone
del if0
usl
mode : softAP(62:01:94:29:66:e8)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
*WM: 
*WM: Configuring access point... 
*WM: WM_TEST
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
add 1
aid 1
station: 28:cf:e9:1e:ea:91 join, AID = 1
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8)
add if0
conf_compare:
646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000107BEF5C074400000000000000000001000000
conf:
646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A5843000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: wifi_get_opmode(): 
*WM: 3
*WM: Persistent:
*WM: 1
*WM: Waiting for connection result with time out
scandone
switch to channel 3
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with don, channel 3
dhcp client start...
ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1
*WM: Connection result: 
*WM: 3
station: 28:cf:e9:1e:ea:91 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(60:01:94:29:66:e8)
*WM: freeing allocated params!
{l␀$ܞ|␀�l�|␃␌␄␌�␌$�␄b|��␂�p␂�r�#�␌B��no�dno���␄c␜p��l{l{lp�N�␐␂␌␄�␄l␄��␌␄␌#␌o�|␂l�␌␄�p␄�|~�o�␃l��␀l`␂�␒␛No␄l ␃␏␂nr�ےn␄␌b␌�␎d␎{���␂␌␄c␄�␎$�␒l�p␃�ܜ��rl��o�␃
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687
Booted
scandone
del if0
usl
mode : softAP(62:01:94:29:66:e8)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
*WM: 
*WM: Configuring access point... 
*WM: WM_TEST
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
add 1
aid 1
station: 28:cf:e9:1e:ea:91 join, AID = 1
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8)
add if0
conf_compare:
646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000107BEF5C074400000000000000000001000000
conf:
646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A5843000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res:
*WM: 6
*WM: wifi_get_opmode(): 
*WM: 3
*WM: Persistent:
*WM: 1
*WM: Waiting for connection result with time out
scandone
switch to channel 3
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with don, channel 3
dhcp client start...
ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1
*WM: Connection result: 
*WM: 3
station: 28:cf:e9:1e:ea:91 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(60:01:94:29:66:e8)
*WM: freeing allocated params!

--- exit ---
<!-- gh-comment-id:478411950 --> @dontsovcmc commented on GitHub (Apr 1, 2019): @tablatronix look, I think, I found a bug in ESP8266WiFiSTA! Wow.. I debugging ESP8266WiFiSTA.cpp, so this is not your bugs.. I try to understand: is configurations are same? I print structures as hex and see, that ``` Serial.println("conf_compare:"); char *p = (char*)(void*)&conf_compare; char b[5] = { 0, 0, 0, 0, 0}; for (unsigned int i = 0; i < sizeof(struct station_config); i++) { snprintf(b, 3, "%02X", *p); p++; Serial.print(b); } Serial.println(); Serial.println("conf:"); p = (char*)(void*)&conf; for (unsigned int i = 0; i < sizeof(struct station_config); i++) { snprintf(b, 3, "%02X", *p); p++; Serial.print(b); } ``` 1. conf_compare & conf have a lot of garbage cause doesn't `setmem 0` when creating. 2. the function sta_config_equal doesn't works good, because there are no some fields of station_config!! Look! Is the same SSID & password Wi-Fi structures are same? ``` conf_compare: 646F6E0000000000000000000000000000000000000000000000000000000000 3232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000107BEF5C074400000000000000000001000000 conf: 646F6E0000000000000000000000000000000000000000000000000000000000 3232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000810000000200000001000000 ``` I make: 1. add all fields to sta_config_equal 2. memset 0 for all struct station_config It works! ``` *************************************************************************************************************************************** Obsolete PIO Core v3.6.0 is used (previous was 3.6.6) Please remove multiple PIO Cores from a system: http://docs.platformio.org/page/faq.html#multiple-pio-cores-in-a-system *************************************************************************************************************************************** --- Miniterm on /dev/cu.SLAB_USBtoUART 115200,8,N,1 --- --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- s$␀l��|␀�l�|␃␄␄␌�␌d�␜p�{�␃�␒�r�#�␌#�p␡�n�loN���␌c␜p��$r$rdp�o�␐␃␌␄�␄l␄��␄␌␄b␌N�|␂l�␄␌�b��oN�␃d��␀$`␃�␒␒oN␌d`␃␏␂nr���N␌␄c␄�␎$␎{��o␄␌b␌�␏l�␒l�p␂���␒�`␂��n�␂ SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687 Booted scandone 6 scandone state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt 6 connected with don, channel 3 dhcp client start... 6 6 ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1 192.168.1.50 pm open,type:2 0 rl␀$ܟ|␀�l�|␂␌␌␄�␄l�␄b|��␂�␛�{��␟�␄b��oo�lNn��c␌"␜p��cd`␃{lp�n�␐␃␌␄�␄l␄��␌␌␄c␄n�|␃l�␌␄�p␄�|~�o�␂l��␀$`␃�␓2No␄l ␂␏␂n{���N␌␄#␄�␎$␎r��N␌␄c␄�␎$�␛$��$���␒�`␂��o�␃ SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687 Booted scandone del if0 usl mode : softAP(62:01:94:29:66:e8) add if1 dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) bcn 100 *WM: *WM: Configuring access point... *WM: WM_TEST *WM: AP IP address: *WM: 192.168.4.1 *WM: HTTP server started add 1 aid 1 station: 28:cf:e9:1e:ea:91 join, AID = 1 *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Handle root *WM: Handle root *WM: Request redirected to captive portal *WM: Request redirected to captive portal *WM: Handle root *WM: WiFi save *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 6 mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8) add if0 conf_compare: 646F6E0000000000096020402FFBFE3F000000000000000000000000000000003232327177654153445A58430000000001000000FC0BFF3FA0902040F4E8FE3F22030000220300000600003600FCFE3F0700000064E7FE3F060000000CFCFE3F00107BEF5C074400000000000000000001000000 conf: 646F6E4700000000000000000000000000000000000000000000000000000000323232383930717765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res: *WM: 6 *WM: wifi_get_opmode(): *WM: 3 *WM: Persistent: *WM: 1 *WM: Waiting for connection result with time out scandone switch to channel 3 state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt connected with donG, channel 3 dhcp client start... ip:10.1.30.49,mask:255.255.255.0,gw:10.1.30.1 *WM: Connection result: *WM: 3 station: 28:cf:e9:1e:ea:91 leave, AID = 1 rm 1 bcn 0 del if1 pm open,type:2 0 mode : sta(60:01:94:29:66:e8) *WM: freeing allocated params! rl␀$ܞ|␀�$�|␂␌␌␄�␄l�␄c|��␂�␛�{��␟�␄b��oN�lNo��c␄"␜p�cl ␃{lp�n�␐␂␌␄�␄$␌��␌␄␌#␌o�|␃d�␜�␄�p␄�|␡�n�␂$��l`␂�␒␛oN␌$`␃␏␂nr���N␌␄b␌�␎l␏rےn␌␄c␄�␎$�␛d�p␃��œ�{$��n�␂ SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687 Booted scandone del if0 usl mode : softAP(62:01:94:29:66:e8) add if1 dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) bcn 100 *WM: *WM: Configuring access point... *WM: WM_TEST *WM: AP IP address: *WM: 192.168.4.1 *WM: HTTP server started add 1 aid 1 station: 28:cf:e9:1e:ea:91 join, AID = 1 *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Handle root *WM: WiFi save *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 6 mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8) add if0 conf_compare: 646F6E4700000000000000000000000000000000000000000000000000000000323232839307177650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000127BEF58074400000000000000000001000000 conf: 646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A5843000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res: *WM: 6 *WM: wifi_get_opmode(): *WM: 3 *WM: Persistent: *WM: 1 *WM: Waiting for connection result with time out scandone switch to channel 3 state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt connected with don, channel 3 dhcp client start... ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1 *WM: Connection result: *WM: 3 station: 28:cf:e9:1e:ea:91 leave, AID = 1 rm 1 bcn 0 del if1 pm open,type:2 0 mode : sta(60:01:94:29:66:e8) *WM: freeing allocated params! rl␀$ܞ|␀�l�|␂␌␄␌�␄l�␌c|��␂�p␃�{�c�␌c��on�␀$oo���␄c␜p�$r$rlp�o�␐␃␄␌�␌l␄��␌␄␌c␄o�|␃d�␜�␄�p␄��no�␂l��␀d`␃�␒␛oN␌$`␃␎␃or�ےn␄␌B␄�␏$␎r��N␌␄c␌�␎d�␛l�p␃���␓� ␃��o�␃ SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687 Booted scandone del if0 usl mode : softAP(62:01:94:29:66:e8) add if1 dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) bcn 100 *WM: *WM: Configuring access point... *WM: WM_TEST *WM: AP IP address: *WM: 192.168.4.1 *WM: HTTP server started add 1 aid 1 station: 28:cf:e9:1e:ea:91 join, AID = 1 *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: WiFi save *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 6 mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8) add if0 conf_compare: 646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000107BEF5C074400000000000000000001000000 conf: 646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A5843000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res: *WM: 6 *WM: wifi_get_opmode(): *WM: 3 *WM: Persistent: *WM: 1 *WM: Waiting for connection result with time out scandone switch to channel 3 state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt connected with don, channel 3 dhcp client start... ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1 *WM: Connection result: *WM: 3 station: 28:cf:e9:1e:ea:91 leave, AID = 1 rm 1 bcn 0 del if1 pm open,type:2 0 mode : sta(60:01:94:29:66:e8) *WM: freeing allocated params! {l␀$ܞ|␀�l�|␃␌␄␌�␌$�␄b|��␂�p␂�r�#�␌B��no�dno���␄c␜p��l{l{lp�N�␐␂␌␄�␄l␄��␌␄␌#␌o�|␂l�␌␄�p␄�|~�o�␃l��␀l`␂�␒␛No␄l ␃␏␂nr�ےn␄␌b␌�␎d␎{���␂␌␄c␄�␎$�␒l�p␃�ܜ��rl��o�␃ SDK:3.0.0-dev(c0f7b44)/Core:2.5.0=20500000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1/BearSSL:6778687 Booted scandone del if0 usl mode : softAP(62:01:94:29:66:e8) add if1 dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) bcn 100 *WM: *WM: Configuring access point... *WM: WM_TEST *WM: AP IP address: *WM: 192.168.4.1 *WM: HTTP server started add 1 aid 1 station: 28:cf:e9:1e:ea:91 join, AID = 1 *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Handle root *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Request redirected to captive portal *WM: Handle root *WM: Handle root *WM: WiFi save *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 6 mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8) add if0 conf_compare: 646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000107BEF5C074400000000000000000001000000 conf: 646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A5843000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res: *WM: 6 *WM: wifi_get_opmode(): *WM: 3 *WM: Persistent: *WM: 1 *WM: Waiting for connection result with time out scandone switch to channel 3 state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt connected with don, channel 3 dhcp client start... ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1 *WM: Connection result: *WM: 3 station: 28:cf:e9:1e:ea:91 leave, AID = 1 rm 1 bcn 0 del if1 pm open,type:2 0 mode : sta(60:01:94:29:66:e8) *WM: freeing allocated params! --- exit --- ```
Author
Owner

@dontsovcmc commented on GitHub (Apr 1, 2019):

I return sta_config_equal back: FAILED, so the problem with comparing structures!

*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8)
add if0
conf_compare:
646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000107BEF5C074400000000000000000001000000
conf:
646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A5843000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res:
*WM: 0
*WM: wifi_get_opmode(): 
*WM: 3
*WM: Persistent:
*WM: 1
*WM: Waiting for connection result with time out
*WM: Connection timed out
*WM: Connection result: 
*WM: 0
*WM: Failed to connect.
<!-- gh-comment-id:478413000 --> @dontsovcmc commented on GitHub (Apr 1, 2019): I return sta_config_equal back: FAILED, so the problem with comparing structures! ``` *WM: WiFi save *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Status: *WM: 6 mode : sta(60:01:94:29:66:e8) + softAP(62:01:94:29:66:e8) add if0 conf_compare: 646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A58430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000107BEF5C074400000000000000000001000000 conf: 646F6E00000000000000000000000000000000000000000000000000000000003232327177654153445A5843000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000810000000200000001000000*WM: [ERROR] WiFi.begin res: *WM: 0 *WM: wifi_get_opmode(): *WM: 3 *WM: Persistent: *WM: 1 *WM: Waiting for connection result with time out *WM: Connection timed out *WM: Connection result: *WM: 0 *WM: Failed to connect. ```
Author
Owner

@dontsovcmc commented on GitHub (Apr 1, 2019):

there are a lot of discussions about this function here:
https://github.com/tzapu/WiFiManager/issues/702
https://github.com/esp8266/Arduino/issues/3641

<!-- gh-comment-id:478413990 --> @dontsovcmc commented on GitHub (Apr 1, 2019): there are a lot of discussions about this function here: https://github.com/tzapu/WiFiManager/issues/702 https://github.com/esp8266/Arduino/issues/3641
Author
Owner

@dontsovcmc commented on GitHub (Apr 1, 2019):

accepted! =)

<!-- gh-comment-id:478583633 --> @dontsovcmc commented on GitHub (Apr 1, 2019): accepted! =)
Author
Owner

@tablatronix commented on GitHub (Apr 1, 2019):

nice catch, thank you

<!-- gh-comment-id:478640392 --> @tablatronix commented on GitHub (Apr 1, 2019): nice catch, thank you
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#654
No description provided.