mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1139] Stay in AP mode after #976
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#976
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JonasVorwerk on GitHub (Nov 1, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1139
Great library, love it.
2.0 has great new features especially setConfigPortalBlocking, m much appreciated!
There is a difference in behaviour with the 0.15 and still in alpha 2.0x versions of WM.
0.15: after setConfigPortalTimeout, WM stays in AP mode and it's possible to access html served by the esp
WiFiManager wifiManager; wifiManager.setConfigPortalTimeout(60); wifiManager.setDebugOutput(true); wifiManager.autoConnect(HOSTNAME, PASSWORD);2.0: WM unloads itself and puts the esp in STA mode. No option to open files on the webserver / spiffs
Both desired behaviours but it would be really helpfull if there would be a way to continue to the web server if there might be, in some ocassions, no wifi.
Why not use the exit button to stay in AP mode but continue to serve html like 0.15 does? Just to have the option to "not connect" it to any AP but run as a stand alone device?
Maybe this is already possible but it's not documented? Would love to know how ;)
Thanks!!!
@Renison-Gohel commented on GitHub (Nov 4, 2020):
This is what i am also looking for. Can anyone has any idea or any hint will be enough too for starting AP mode when ESP is not connected to the WiFi and that too in non blocking mode. @tablatronix Please give some light on this. BTW greatest lib you guys have. Thanks a lot for this lib.
@tablatronix commented on GitHub (Nov 4, 2020):
Sorry I thought I responded to this..
It is a bit pointless since you can just use non blocking mode now.. Just do whatever you want in code.
You can also use the webserver as its a shared pointer now.
Both the webserver and softap, and captive portal can be run on demand and non blocking.
Also wm should not stay in ap mode after timing out, so that is not expected behavior.
Use non blocking and do not set a cp timeout.. Not sure what you are trying to do that is different or special than that
@Renison-Gohel commented on GitHub (Nov 6, 2020):
AutoConnectNonBlocking is the best to way to fulfil this requirement but the thing is that AutoConnectNonBlocking is not being connected automatically after i turn off and then turn on my Wifi. Its stuck in WL_DISCONNECTED status.
Any idea why it is happening? am i doing something wrong or it is a bug of wm.setConfigPortalBlocking(false);
I am Using ESP8266
WiFiManager Version is 2.0.3 alpha Development branch.
If possible please check above code @tablatronix is it capable of Reestablish connection with Wifi in void loop?
@tablatronix commented on GitHub (Nov 6, 2020):
no idea what do your logs say?
esp should auto connect by itself, if that is now happening then sounds like a esp bug, try autoconnect twice
@Renison-Gohel commented on GitHub (Nov 7, 2020):
Autoconnect twice means? Can you please explain? You mean just put autoconnect(); Right?
@Renison-Gohel commented on GitHub (Nov 7, 2020):
And also wm.setEnableConfigPortal(true); gives more control over WifiManager we can call it for starting Configportal but how can we set AP name and password of the AP which is created via setEnableConfigPortal(true); It is always shows name as ESP-and any random numbers and alphabets
@tablatronix commented on GitHub (Nov 7, 2020):
There is a bug in esp that some routers fail to connect on first try, it says wl disconnect, but the second time it works.
Setenableconfigportal is for adjusting autoconect.
But for on demand you can just startconfigportal whenever you wabt
@Renison-Gohel commented on GitHub (Nov 8, 2020):
I do the same in loop with if WL_DISCONNECTED condition insted of Trigger button HIGH & LOW. The thing is that under the loop it's starts configportal again and again. I thought maybe this is because of i am calling it in loop.
@Renison-Gohel commented on GitHub (Nov 8, 2020):
Oh okay got it. Is it bug of specially esp8266 or issue with all esp boards? Does esp32 also have this bug? If not then i purchase it and start learning on it. Thanks alot for your support @tablatronix
@tablatronix commented on GitHub (Nov 9, 2020):
Nobody knows, we just have found that some configurations do not reconnect.
If you can give me a rundown of exactly what behavior you are looking for in steps/flow, and i see if we can make sure there is an example for it.
I just am not really clear on what you are doing.
@tablatronix commented on GitHub (Nov 9, 2020):
see #1137
@Renison-Gohel commented on GitHub (Nov 12, 2020):
Flow of my code is very simple.
I just want to connect my esp8266 with Wifi which is already done in void setup() with the help of this awesome library. I am using nonblocking example.
So if esp restarts and doesn't get wifi ssid & password then only it starts config portal and then it gose to loop part ( Because it is non blocking example & this is how it should be)
But once if i restarts esp and if it gets wifi ssid and the password then it will not start any config portal and access point and gose to void loop and after code reach to the void loop and then if wifi disconnects then i have to put IF STATEMENT like
I know that wifi.begin() can help us to reconnect as shown in the many of the suggestion in the issue section of this repository but don't know somehow it is not working for me in Esp8266.
This is what i am doing but still it is not being automatically reconnect to the wifi.
Still it is not automatically reconnect when wifi get back and online.
@tablatronix commented on GitHub (Nov 12, 2020):
That should totally work, esp8266 or esp32? 8266 will in fact automatically reconnect.
The only thing I can think is to turn on esp debugging and check serial log and see what it says when you call begin(), maybe its hung or your ap is still running.
Add WiFi.mode(WiFi_STA); to the start of setup
Also make sure you do not have any code that is looping too fast, you have to give wifi time to run.
@Renison-Gohel commented on GitHub (Nov 14, 2020):
Thanks a lot @tablatronix This seems to work excellent. Thank you very much for this awesome library and for such quick support.
@tablatronix commented on GitHub (Nov 14, 2020):
ok So I am assuming that was happening, the esp can default to softap mode, and it stays on, wm does not explicitly turn it off. I need to reenable that since its causing some confusion and issues like this.
Softap can cause issues with sta connections, something to do with the channel not being able to change I think.
@tablatronix commented on GitHub (Nov 14, 2020):
Are you using Github dev branch or the arduino alpha release?
@tablatronix commented on GitHub (Nov 14, 2020):
I think I did fix this, so let me know if you are not using cutting edge
github.com/tzapu/WiFiManager@e9d75a08b8@JonasVorwerk commented on GitHub (Nov 24, 2020):
Thanks everybody for all insights.
Using the DEV/OnDemandConfigPortal example makes the use of new functions so much clearer since most options are presented in a clear and useful way.
The latest version works perfectly on a Huzzah Feather ESP8266 in my setups. Thanks again!
@tablatronix commented on GitHub (Nov 24, 2020):
Yeah since I have not had the time to work on the docs nor help, I kind of user that as the main example by adding everything in it