[GH-ISSUE #436] Questions about FS Parameters #368

Closed
opened 2026-02-28 01:24:58 +03:00 by kerem · 1 comment
Owner

Originally created by @JSCSJSCS on GitHub (Oct 6, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/436

I was trying out the WiFiManager_AutoConnectWithFSParameters example and have a few questions about some results I was getting and wanted to ask a few questions for clarification that were not immediately clear from the documentation.

1.) There is a comment in the code that says:

//define your default values here, if there are different values in config.json, they are overwritten.

At first I thought the config.json values were overwritten by the defaults. Then I figured it out that it was the other way around. Then I thought, well if we hard-code defaults, we don't need a config.json file in the FS. But I could not get it to run without one.

2.) Is the config.json required before the first upload and run of the .ino?
As I said earlier, at first I did not have a config.json file uploaded. I remember first trying WiFiManager_AutoConnectWithFSParameters without first uploading a config.json file and getting all kinds of errors (many days ago, don't remember them). I then learned a lot about FS, found the ESP Sketch Data Upload Tool, created a config.json file and uploaded it with the same parameters that were in the .ino and everything seemed to work without error.

But is a config.json file uploaded with the ESP Sketch Data Upload tool even required at first if you have hard coded some defaults in the .ino file anyway? Do you need that file uploaded because the .ino file does not (cannot?) create it on it's own?

3.) Lastly, most times, after entering credentials at the AP 192.168.4.1 WiFi page, I get this result:

*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Connection result: 
*WM: 4
*WM: Failed to connect.
*WM: Request redirected to captive portal

I am very careful to type in the correct password each time, but it can take several tries to get a successful connection and then it says"

*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
***WM: Already connected. Bailing out.**
Should save config

How can I go from "failed to connect" to "Already connected. Bailing out.**"?

This code is magnificent and I love using it. I just need to know a little bit more about how to use it correctly.

Arduino 1.8.3 using NodeMCU V3 LoLin development board.

Originally created by @JSCSJSCS on GitHub (Oct 6, 2017). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/436 I was trying out the WiFiManager_AutoConnectWithFSParameters example and have a few questions about some results I was getting and wanted to ask a few questions for clarification that were not immediately clear from the documentation. 1.) There is a comment in the code that says: `//define your default values here, if there are different values in config.json, they are overwritten.` At first I thought the config.json values were overwritten by the defaults. Then I figured it out that it was the other way around. Then I thought, well if we hard-code defaults, we don't need a config.json file in the FS. But I could not get it to run without one. 2.) Is the config.json required before the first upload and run of the .ino? As I said earlier, at first I did not have a config.json file uploaded. I remember first trying WiFiManager_AutoConnectWithFSParameters without first uploading a config.json file and getting all kinds of errors (many days ago, don't remember them). I then learned a lot about FS, found the ESP Sketch Data Upload Tool, created a config.json file and uploaded it with the same parameters that were in the .ino and everything seemed to work without error. But is a config.json file uploaded with the ESP Sketch Data Upload tool even required at first if you have hard coded some defaults in the .ino file anyway? Do you need that file uploaded because the .ino file does not (cannot?) create it on it's own? 3.) Lastly, most times, after entering credentials at the AP 192.168.4.1 WiFi page, I get this result: ``` *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... *WM: Connection result: *WM: 4 *WM: Failed to connect. *WM: Request redirected to captive portal ``` I am very careful to type in the correct password each time, but it can take several tries to get a successful connection and then it says" ``` *WM: Sent wifi save page *WM: Connecting to new AP *WM: Connecting as wifi client... ***WM: Already connected. Bailing out.** Should save config ``` How can I go from "failed to connect" to "Already connected. Bailing out.**"? This code is magnificent and I love using it. I just need to know a little bit more about how to use it correctly. Arduino 1.8.3 using NodeMCU V3 LoLin development board.
kerem closed this issue 2026-02-28 01:24:59 +03:00
Author
Owner

@Viniciusvalenca commented on GitHub (Dec 24, 2017):

Put the wifiManager on 1 thing on setup(),

<!-- gh-comment-id:353793782 --> @Viniciusvalenca commented on GitHub (Dec 24, 2017): Put the wifiManager on 1 thing on setup(),
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#368
No description provided.