mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #97] Access SSID and Password after using On Demand Portal? #73
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#73
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 @Humancell on GitHub (Feb 9, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/97
Like everyone else says ... awesome library! It worked on the first try.
The way we are writing our app, we're doing our own WiFi connection handling, but want to use your captive portal/On Demand Portal for the configuration. I put a loop in the Setup() that give the user 5-6 seconds to press a button that tells us to call wifiManager.startConfigPortal("Our AP SSID") ... all of this works fine.
If the connection - after configuration - was successful, how can I retrieve the SSID and Password so that we can store it in our other configuration files?
After the user does the Captive Portal configuration, we want to store the configured credentials in our own config files, and then reset the board no matter what. When it reboots, and they do not press the button, our own WiFi connection code will then retrieve the credentials and initiate the WiFi connection.
We don't want to use autoConnect() since we do not want the library to go into Captive Portal mode ever ... unless the user pressed the button during that initial power up 5 seconds.
Does that make sense?
@Humancell commented on GitHub (Feb 9, 2016):
It does look like you once provided:
But then you commented these public methods out?
@tzapu commented on GitHub (Feb 9, 2016):
yeah, all they did was call
WiFi.psk() and WiFi.SSID()
Btw, if i understand correctly, you don t need to save them, in your connection management code just put
WiFi.begin() with no params and it will use the last saved values.
I haven't tested, but you could try with
to exit and trigger a reset. so, semi pseudo code
if trigger pressed
when config portal returns
if no trigger button was pressed
that should do all you mentioned
@Humancell commented on GitHub (Feb 10, 2016):
So close!! Thank you for the suggestions ... I'm running into two issues, and am curious if these might be bugs ...
First, I'm following your steps above, and it works ... BUT ... when I call the portal and then the reset I get the following output:
... and then it just hangs forever.
THEN, if I manually reset the ESP, it DOES work ... and connects ok. But then at the end of my processing, I call ESP.reset() again ... and it's almost like the PSK is wiped out. When the ESP restarts I can print the WiFi.SSID() and it's still there ... but it will no longer connect until I re-configure it. I can't find a way to print the stored PSK ... it seems that WiFi.psk() no longer exists?
@Humancell commented on GitHub (Feb 10, 2016):
I've been sitting here testing and testing ... and the wdt reset issue has simply gone away ... I'm not sure how.
I'm still looking at why the ESP will not reconnect to one of my access points on subsequent ESP.reset() calls ...
@tzapu commented on GitHub (Feb 23, 2016):
hi, WiFi.psk(); should really be there ...
could you have an older version of the esp8266 core for arduino?
@Humancell commented on GitHub (Mar 15, 2016):
Ok ... this issue is resolved.
This is working great!
Can't wait to get the ability to customize the CSS ... I don't want to modify the pages yet so I don't conflict with your changes. Where do I donate?
@tzapu commented on GitHub (Mar 15, 2016):
hi, in the latest github version there is the ability of adding custom css, you can use that now
didn t think about donations, would people really do that?
@Humancell commented on GitHub (Mar 15, 2016):
Oh excellent! I'll check out the CSS! I was also thinking of having my team see about adding a "spinny" busy icons when you touch a button ...
Donations? I know we would! You've done a great job on this library, and we're about to include it in a part of our open source release of our ESProto sensor prototyping platform. :-)
@Humancell commented on GitHub (Mar 15, 2016):
BTW ... is there any doc/suggestions on adding custom .css?
@tzapu commented on GitHub (Mar 16, 2016):
hi, you can use it like this:
docs will be added when i release 0.11
i have never taken contributions so i have no idea how it s best done
i ve setup a patreon page, which is apparently the new "hip" way of doing this from what people say on the interwebs.
i have to stress that I will continue development on this, indifferent of contributions, and that if anyone decides to contribute, no amount is too small, everything goes the way of supporting my programming and new found electronics habit :P .
https://www.patreon.com/tzapulica
@shakirhussain78652 commented on GitHub (Feb 3, 2021):
Hello,
I am new here with not much basic knowledge. I am trying to use this library Auto Connect Non Blocking wifi manager. I need the network Wifi SSID and the password entered by the user at the configuration portal to be stored in variable to be used in the REMOTE XY app.
Please provide me with the code.
// RemoteXY connection settings
#define REMOTEXY_WIFI_SSID "hello" // this is where i want to use the ssid
#define REMOTEXY_WIFI_PASSWORD "123456789" //and password
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376