Open Jagakatt opened 1 year ago
are you SURE you are using that version ? this looks like a very old bug
I just installed thru the library manager in Arduino IDE.
cat library.properties
name=WiFiManager version=2.0.15-rc.1 author=tzapu maintainer=tablatronix sentence=WiFi Configuration manager with web configuration portal for Espressif ESPx boards, by tzapu paragraph=Library for configuring ESP8266/ESP32 modules WiFi credentials and custom parameters at runtime with captive portal. category=Communication url=https://github.com/tzapu/WiFiManager.git architectures=esp8266,esp32 pepe@turbo2:~/Arduino/libraries/WiFiManager$
This is what debug_level 3 should look like saving a new password
*wm:[1] Connecting to NEW AP
*wm:[2] <- HTTP WiFi save
*wm:[3] Method: POST
*wm:[3] Sent wifi save page
*wm:[2] processing save
*wm:[2] Connecting as wifi client...
*wm:[3] STA static IP:
*wm:[2] setSTAConfig static ip not set, skipping
*wm:[1] Connecting to NEW AP: leela
*wm:[3] Using Password: xxxxxxx
*wm:[3] WiFi_enableSTA enable
is your ssid input somehow empty? I do not think there is a check for empty ssid, thats the only thing I can see
Seam to be working as it should. Was fooled by the automatic pre-filled-in SSID in the portal (realize now it's grey and not black text). Looked like it was only the password missing to do the connection. Much headache for nothing but really happy it's working. Sorry for my post. Should I click "Close and Completed" here below? I'm new to this...
What browser are you using? the placeholder should also be the value and submitted still, thats odd
Looks like it's the ESP that outputs the SSID in grey if you have a previous successful connection (and now SSID is unavailable). Or if you have a previous unsuccessful connection attempt with incorrect password.
Well it's easy to go around it by tapping on the correct network in the list when you know it. But at least it fooled me when it looked like it was already in place. ;- )
Do not know what browser-components launched in the phone when accessing "Config portal" from the WiFi-setting. But it's the same behavior on the following phones:
Xiaomi Redmi Note 8 Pro Kernel 4.14.141-g95d4269 Model M1906g7g Android 10 QP1A.190711.020 MIUI Global 12.0.8 Chrome: 109.0.5414.117
Doogee S96Pro Doogee-s96pro-EEA-Android10.0-20211116 Chrome: 109.0.5414.86
Samsung Galaxy A5 Android 8.0.0
Doogee s98 Android 12
Let me check a few things, if its in grey it should be resbumitted on save, I did not have to reset the AP when changing password so there must be a condition that changes, but perhaps not always working, or not being prefilled correctly sometimes?
I am adding argument debugging ( you can see arguments by turning on esp debugging also )
I just encountered the same bug, SSID looks prefilled and when saved, the missing SSID results in "Connect to new AP Failed" and ESP32 is locked until restart.
Hello, I have similar issue. When I enter a bad password in the Configuration Portal it goes into endless loop of (xxxxx) wifi:Set status to INIT. When I reset the ESP32, it goes back to this loop. I have to call resetSettings() to fix this.
Example here: 17:41:41.460 -> wm:AP IP address: 192.168.4.1 17:41:41.460 -> wm:Starting Web Portal 17:41:50.006 -> wm:20 networks found 17:41:57.518 -> wm:Connecting to NEW AP: WB12-2G 17:41:57.611 -> wm:connectTimeout not set, ESP waitForConnectResult... 17:42:04.740 -> E (31317) wifi:Set status to INIT 17:42:04.817 -> E (31376) wifi:Set status to INIT 17:42:04.817 -> E (31402) wifi:Set status to INIT x x 17:42:05.998 -> wm:Connect Wifi, ATTEMPT # 2 of 33 17:42:05.998 -> wm:Connecting to NEW AP: WB12-2G 17:42:05.998 -> wm:connectTimeout not set, ESP waitForConnectResult... 17:42:05.998 -> E (32601) wifi:Set status to INIT 17:42:06.075 -> E (32636) wifi:Set status to INIT 17:42:06.122 -> E (32704) wifi:Set status to INIT
I would imagine, that the connection should fail due to the bad password and create the configuration portal again.
Thank you :-)
Thanks! i have no idea what 17:42:05.998 -> E (32601) wifi:Set status to INIT is... hmm
are you all using git or the last release?
I have seen that error as well when I turn off the AP the ESP32 is connected to. I was simulating losing connection to the AP while testing my other issue. It seemed to happen randomly with connection losses > 10 seconds.
I think it is coming from the program that is in the Setup() versus WiFiManager. The errors I get from WiFiManager are all prefixed with "wm:' since that is the name of the WiFiManager instance.
I pushed a release, made it release. It might have a fix for this already
Has anyone retested this?
I am having the same issue, in AP mode when a wrong password is entered, the ESP is stuck, and showing "ESP waitForConnectResult...". And after one minute it is showing "[ERROR] Connect to new AP Failed ".
Is there any way that I can print the "wrong password" in serial terminal while the config portal keeping open?
Thanks I will test this and see whats going on, sounds like a bug detecting the save as a change.
Not sure how to reproduce this bug, for one, I cannot safe the wrong password, as wm does not save on fail by default.. So thats odd.
If I do use the wrong password, I can still just save the new one and no stuck ??
*wm:[SYS] WM version: v2.0.15-rc.1
*wm:[SYS] Arduino version: 2.0.14
*wm:[SYS] ESP SDK version: 4.4.6.231024
*wm:[SYS] Free heap: 305700
*wm:[SYS] Chip ID: 3245692124
*wm:[SYS] Chip Model: ESP32-S3
.......
[WIFI] WIFI_INFO DEBUG
[WIFI] SAVED: YES
[WIFI] SSID: leela
[WIFI] PASS: wrongpassword
*wm:AutoConnect
*wm:Connecting to SAVED AP: leela
*wm:connectTimeout not set, ESP waitForConnectResult...
*wm:AutoConnect: FAILED for 13611 ms
*wm:StartAP with SSID: WM_AutoConnectAP
*wm:AP IP address: 192.168.4.1
[CALLBACK] configModeCallback fired
*wm:Starting Web Portal
*wm:5 networks found
*wm:Connecting to NEW AP: leela (RIGHT PASSWORD)
*wm:connectTimeout not set, ESP waitForConnectResult...
*wm:Connect to new AP [SUCCESS]
*wm:Got IP Address:
*wm:192.168.20.254
[CALLBACK] saveCallback fired
*wm:config portal exiting
connected...yeey :)
You have to enter the SSID, is that what you are talking about? A placeholder does not get submitted in the form, you have to fill out the SSID, you cannot just change the password.
No, the SSID is automatically getting filled by clicking the SSIDs that's been showing after scan, there is no issue about that. Let me elaborate a bit,
Lets say the portal is being opened for 5 minutes (setConfigPortalTimeout(300)) and the connect timeout is set for 10 seconds (setConnectTimeout(10)).
Now the portal will be opened for 5 minute, and will close either on successful configuration or after timeout (which is 5 minute in this case), and after entering the password, ESP will try to connect for 10 seconds.
During these 5 minutes if I enter a wrong password in the webpage, the ESP will try to connect for 10 seconds and will fail (ERROR Log message will be printed), so for successful connection I have to close the webpage and open it again.
Now my question is, how can I get an error callback(for entering wrong WiFi credentials) after spending 10 seconds of failed attempt while the config portal is still open (while the stack is still running)? In the documentation, there is function setAPCallback() which will return on failed WiFi connection attempt. But it is returning after 5 minutes (setConfigPortalTimeout()).
Thats is not the same issue here, also not sure what you mean close and open the browser again, I suggest you open another issue with this question. If you want to close the portal on failures, you can but you have to set breakafterconfig=true, or use a callback. If it fails and the portal is still open, you can still go back to the previous page, but I am not sure if you are using captiveportal or not, this needs a new issue to clearly explain this
Also what is 'ERROR scan waiting?' that is not WM..
@tablatronix Your recent "fix" in WiFIManagaer.cpp line 1817 if(_ssid = "" && _pass != ""){
made thing a lot worse. I took me a while to finde this mistake.
I guess you meant to write if(_ssid == "" && _pass != ""){
thanks, geez, thats the 2nd time, my bad, been working on 3 projects in 5 different languages pushed
@tablatronix Sure I will open another issue. Regarding the ERROR scan waiting , not sure, I thought this is also from wm. Let me look into this and will update if I find anything.
Yeah I definitely have a goal to get the saving flow better worked out but there are so many variables with accounting for captiveportals and ap stability when channel scanning for connects. So getting your info will help me figure out specific use cases
but lets make sure you are actually using this library
Wrong password in portal and you are stuck.
My first post, and I will probably piss some one off because I missed something. My deepest apologies in advance!
Hardware
WiFimanager Branch/Release: Master(?) 2.0.15-rc.1
Esp8266
Hardware: ESP-12e, esp01, esp25
Core Version: No clue... Arduindo IDE 2.0.3..?
Description
Problem description // When starting up in "portal mode" and you enter the portal, click on "Configure WiFi", select your SSID, and enter THE WRONG PASSWORD. // Now you are stuck. A reset (button press) does not help. You have to connect to another network, then close it down do get another try. // Not possible to recover without connecting to another "valid network"
Settings in IDE, STANDARD
Module: NodeMcu, Wemos D1
Additional libraries:
Sketch
Debug Messages