[GH-ISSUE #1401] Config mode in WiFi off mode #1202

Closed
opened 2026-02-28 01:28:59 +03:00 by kerem · 7 comments
Owner

Originally created by @kargarisaac on GitHub (Apr 25, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1401

Hi,

Thank you for the great library. I want to use esp32 in a very power critical application. So I need to optimize power consumption as much as possible. I'm looking for a way to do the config mode in a more efficient way and not to be in wifi active mode for 2 to 3 minutes. I was thinking if you can guide me to do sth like below.

  • Open captive portal in the same way (maybe wifi activate and after portal is up, disable wifi).
  • then get the wifi credentials from user (maybe also some other inputs from user).
  • then when user presses a button, wifi activates again and get and save credentials and maybe test if it can connect quickly or not.

Do you have any suggestion to do something like this?

Thank you in advance for the help

Originally created by @kargarisaac on GitHub (Apr 25, 2022). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1401 Hi, Thank you for the great library. I want to use esp32 in a very power critical application. So I need to optimize power consumption as much as possible. I'm looking for a way to do the config mode in a more efficient way and not to be in wifi active mode for 2 to 3 minutes. I was thinking if you can guide me to do sth like below. - Open captive portal in the same way (maybe wifi activate and after portal is up, disable wifi). - then get the wifi credentials from user (maybe also some other inputs from user). - then when user presses a button, wifi activates again and get and save credentials and maybe test if it can connect quickly or not. Do you have any suggestion to do something like this? Thank you in advance for the help
kerem 2026-02-28 01:28:59 +03:00
  • closed this issue
  • added the
    Question
    label
Author
Owner

@tablatronix commented on GitHub (Apr 25, 2022):

Ideally for this you would require the user to do a special action or press a reset and only then use the captive portal.

why 2-3 minutes?

<!-- gh-comment-id:1108875610 --> @tablatronix commented on GitHub (Apr 25, 2022): Ideally for this you would require the user to do a special action or press a reset and only then use the captive portal. why 2-3 minutes?
Author
Owner

@kargarisaac commented on GitHub (Apr 25, 2022):

The board goes to access point mode untile the user selects the wifi and input the password. Then it saves them and goes to deep sleep mode. I put the time out to 120-180 seconds.

I didn't get your solution. Can you please explain more?

<!-- gh-comment-id:1108921120 --> @kargarisaac commented on GitHub (Apr 25, 2022): The board goes to access point mode untile the user selects the wifi and input the password. Then it saves them and goes to deep sleep mode. I put the time out to 120-180 seconds. I didn't get your solution. Can you please explain more?
Author
Owner

@tablatronix commented on GitHub (Apr 25, 2022):

wm.setConfigportalTimeout() controls how long to stay on, I would never use configportal on a battery device and only use on demand or reset.

you are asking to turn wifi off while in configuration mode? That is not possilble, it IS wifi. Captive portals and most web browsers will fail if the site dissapears.

<!-- gh-comment-id:1108956411 --> @tablatronix commented on GitHub (Apr 25, 2022): wm.setConfigportalTimeout() controls how long to stay on, I would never use configportal on a battery device and only use on demand or reset. you are asking to turn wifi off while in configuration mode? That is not possilble, it IS wifi. Captive portals and most web browsers will fail if the site dissapears.
Author
Owner

@kargarisaac commented on GitHub (Apr 25, 2022):

So how do you suggest to set wifi setting for battery device? It is not possible to hard code it and the user should be able to set the credentials based on his/her wifi. Right now the board goes to config mode when the user puts the battery in for 120 seconds and the user should set the wifi credentials in that time. Then it goes to deep sleep and every few hours, it wakes up and send sensed data from sensors to cloud.

Any suggestion would be appreciated.

<!-- gh-comment-id:1108993728 --> @kargarisaac commented on GitHub (Apr 25, 2022): So how do you suggest to set wifi setting for battery device? It is not possible to hard code it and the user should be able to set the credentials based on his/her wifi. Right now the board goes to config mode when the user puts the battery in for 120 seconds and the user should set the wifi credentials in that time. Then it goes to deep sleep and every few hours, it wakes up and send sensed data from sensors to cloud. Any suggestion would be appreciated.
Author
Owner

@tablatronix commented on GitHub (Apr 25, 2022):

ok so not sure how you can get any better than that

<!-- gh-comment-id:1109062693 --> @tablatronix commented on GitHub (Apr 25, 2022): ok so not sure how you can get any better than that
Author
Owner

@kargarisaac commented on GitHub (Apr 29, 2022):

I thought about this and couldn't find a better solution to config wifi credentials and will continue with this for now.

<!-- gh-comment-id:1112892553 --> @kargarisaac commented on GitHub (Apr 29, 2022): I thought about this and couldn't find a better solution to config wifi credentials and will continue with this for now.
Author
Owner

@tablatronix commented on GitHub (Apr 29, 2022):

There is a new way to do it over serial but thats about it. Or only allow config if powered by usb etc?

<!-- gh-comment-id:1113411711 --> @tablatronix commented on GitHub (Apr 29, 2022): There is a new way to do it over serial but thats about it. Or only allow config if powered by usb etc?
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#1202
No description provided.