mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #85] can't connect after config #61
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#61
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 @yomasa on GitHub (Jan 29, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/85
can't connect after config so never get to save added parameters.
but connects fine after hard reset.
here is the output
*WM: Sent config page
*WM: Request redirected to captive portal
*WM: Handle root
*WM: WiFi save
*WM: Parameter
*WM: server
*WM: m10.cloudmqtt.com
@yomasa commented on GitHub (Jan 31, 2016):
after more testing, I found that it only fails to connect after config when using the wifiManager.startConfigPortal, I using a button to start wifiManager.startConfigPortal
Thanks
Jorge
@tzapu commented on GitHub (Feb 4, 2016):
hi,
i think you can twist the example a bit so you always save after it returns if connection is unsucessful, right before restart.
will that work?
@probonopd commented on GitHub (Feb 7, 2016):
How is this supposed to work? Currently with this sketch almost everything works, but after I have entered the WLAN password and pressed "save" I seemingly need to power cycle the device for the sketch to become responsive to HTTP requests.
@tzapu commented on GitHub (Feb 8, 2016):
there s some weirdness with some modules, they just won t connect and i don t know why...
but in your case, it s probably more of the mix of your own http server, which other users have reported not working together with wifimanager, need to get a test setup...
@tzapu commented on GitHub (Feb 8, 2016):
btw @probonopd for casese like this i added an example AutoConnectWithReset, that resets it automatically after config, if it did not connect, although i assumes yours connects and needs the reset just so the http server starts working...
@probonopd commented on GitHub (Feb 8, 2016):
I get
But then the HTTP server is not reachable until I reboot.
Here is my setup():
Am I doing something wrong? Adding
wifiManager.setBreakAfterConfig(true);did not seem to make a difference at all. Is there a way to reboot the device then the user has entered the credentials and they are saved?I am using Arduino-1.6.8.hourly201602020926 with esp 04c6609 and WiFiManager from git master.
@tzapu commented on GitHub (Feb 9, 2016):
wifiManager.setBreakAfterConfig(true); will just make wifimanager exit after it tries to connect even if unsuccessful. In your case, you would need to add ESP.reset() after it exits, no matter the outcome, you can set a flag in the start config portal or save configuration callbacks (so you know it actually went through a configuration phase, so you only reset then).
Credentials should be saved up to that point.
In your code, it will probably connect, then exit and never get to Serial.println("failed to connect and hit timeout");.
btw, i did get a working version of the web server like this https://gist.github.com/tzapu/ecc0759829d30d5a6152
igrr is also looking into it to see why the webserver doens t start a second time.
let me know if the above helps
cheers
@eppi72 commented on GitHub (Feb 15, 2016):
hi tzapu
is it possible that you can create a sample code for web OTA? I would like a update Button for upload sketch (compiled bin file) with a Button "update" under the other buttons (Wifi Config, Wifi Config "no scan", Reset, Info). Thank you verry much - Cheers
@probonopd commented on GitHub (Feb 15, 2016):
Thanks @tzapu - how would I do this in the sketch without editing the lib itself?
@tzapu commented on GitHub (Feb 16, 2016):
@eppi72 will think about it, i m not geared for ota currently so need a better test bed
the other option is to provide customisable buttons
@probonopd
use
wifiManager.setBreakAfterConfig(true);this will make it exit after a connection attempt, even if not successfulif the save callback was called go through the code that saves the params
then reset