mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1021] How can I return to Ap mode when I press the reset button? #868
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#868
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 @PozitronikTech on GitHub (Mar 13, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1021
How can I return to Ap mode when I press the reset button?
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
** Using esp version
Ap Mode -> STA Mode -> Web Server -> Void Loop (server->handleClient(); or button.read();)
It starts in Ap mode.
I include Esp8266 in a network and the system is rebooting.
When it restarts (in STA mode) the Web server gets up so that I can control the devices with json data.
I will put the device in a box. Outside this box, there will be a button to reset the device. When I press the button, I want to delete the SSID and password in the eeprom and start in AP mode.
I have tried many methods.
Pressing the button continues to connect to the network, starting with the information in memory each time. Do you have a solution suggestion for this? We can do without going out of the wifimanager library. Thank you
Settings in IDE
Module: NodeMcu 1.0 (ESP-12e Module)
Builtin led: 2
upload speed : 115200
cpu freq: 80mhz
flash size: 4mb(fs:2mb ota: ~1019kb)
debug port: disabled
debug level: noting
ivip varinat: v2 lover memory
vtables: flash
exceptions: legacy (new can return nullptr)
erase flash : only sketch
ssl support: all ssl ciphers (most compatible)
port: 8 com
Debug Messages
09:25:20.570 -> 2.2.2-dev(38a443e)
09:25:20.570 -> *WM:
09:25:20.570 -> *WM: AutoConnect
09:25:20.570 -> bcn 0
09:25:20.570 -> del if1
09:25:20.570 -> usl
09:25:20.570 -> mode : sta(xx:xx:xx:xx:xx:x) //xx hiding mac
09:25:20.570 -> add if0
09:25:20.604 -> *WM: Connecting as wifi client...
09:25:20.638 -> *WM: Status:
09:25:20.638 -> *WM: 0
09:25:20.638 -> *WM: No saved credentials
09:25:20.638 -> *WM: Connection result:
09:25:20.638 -> *WM: 0
09:25:20.638 -> del if0
09:25:20.638 -> usl
09:25:20.638 -> mode : softAP(xx:xx:xx:xx:xx:x)
09:25:20.638 -> add if1
09:25:20.638 -> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
09:25:20.638 -> bcn 100
09:25:20.638 -> *WM:
09:25:20.638 -> *WM: Configuring access point...
09:25:20.638 -> *WM: Home Station
09:25:20.638 -> *WM: homestationPassword
09:25:22.458 -> bcn 0
09:25:22.458 -> del if1
09:25:22.458 -> usl
09:25:22.458 -> add if1
09:25:22.458 -> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
09:25:22.458 -> bcn 100
09:25:22.975 -> *WM: AP IP address:
09:25:22.975 -> *WM: 192.168.4.1
09:25:22.975 -> *WM: HTTP server started
09:26:35.392 -> add 1
09:26:35.392 -> aid 1
09:26:35.392 -> station: 14:5f:94:c1:07:61 join, AID = 1
09:26:38.729 -> *WM: Request redirected to captive portal
09:26:38.900 -> *WM: Handle root
09:26:38.900 -> *WM: Request redirected to captive portal
09:26:38.935 -> *WM: Request redirected to captive portal
09:26:39.038 -> *WM: Handle root
09:26:39.072 -> *WM: Request redirected to captive portal
09:26:51.143 -> *WM: Request redirected to captive portal
09:26:54.034 -> *WM: Handle root
09:26:54.034 -> *WM: Request redirected to captive portal
09:26:54.068 -> *WM: Handle root
09:26:54.068 -> *WM: Request redirected to captive portal
09:26:54.068 -> *WM: Handle root
09:26:54.068 -> *WM: Request redirected to captive portal
09:26:54.068 -> *WM: Handle root
09:26:54.102 -> *WM: Handle root
09:26:54.102 -> *WM: Handle root
09:26:55.718 -> *WM: Handle root
09:27:01.137 -> mode : sta(xx:xx:xx:xx:xx:x) + softAP(xx:xx:xx:xx:xx:x)
09:27:01.137 -> add if0
09:27:03.374 -> scandone
09:27:03.374 -> *WM: Scan done
09:27:03.374 -> *WM: HomeNetwork
09:27:03.374 -> *WM: -39
09:27:03.442 -> *WM: Sent config page
09:27:13.441 -> *WM: Request redirected to captive portal
09:27:25.794 -> *WM: Request redirected to captive portal
09:27:27.783 -> *WM: Request redirected to captive portal
09:27:31.737 -> *WM: WiFi save
09:27:31.737 -> *WM: Sent wifi save page
09:27:32.729 -> *WM: Connecting to new AP
09:27:32.729 -> *WM: Connecting as wifi client...
09:27:32.729 -> *WM: Status:
09:27:32.729 -> *WM: 0
09:27:32.799 -> *WM: [ERROR] WiFi.begin res:
09:27:32.799 -> *WM: 6
09:27:34.971 -> scandone
09:27:34.971 -> no HomeNetwork found, reconnect after 1s
09:27:35.073 -> reconnect
09:27:37.244 -> scandone
09:27:38.202 -> state: 0 -> 2 (b0)
09:27:38.202 -> state: 2 -> 3 (0)
09:27:38.270 -> state: 3 -> 5 (10)
09:27:38.270 -> add 0
09:27:38.270 -> aid 1
09:27:38.270 -> cnt
09:27:38.270 ->
09:27:38.270 -> connected with HomeNetwork, channel 1
09:27:38.340 -> dhcp client start...
09:27:41.368 -> ip:192.168.43.245,mask:255.255.255.0,gw:192.168.43.1
09:27:41.368 -> *WM: Connection result:
09:27:41.368 -> *WM: 3
09:27:41.368 -> station: xx:xx:xx:xx:xx:x leave, AID = 1
09:27:41.368 -> rm 1
09:27:41.368 -> bcn 0
09:27:41.368 -> del if1
09:27:41.368 -> pm open,type:2 0
09:27:41.368 -> mode : sta(xx:xx:xx:xx:xx:x)
09:27:41.402 -> bağlantı başarılı.
09:27:41.402 -> HTTP sunucu başlatılıyor
09:27:41.436 -> Alınan IP adresi: 192.168.43.245
09:27:41.436 -> *WM: freeing allocated params!
09:28:03.113 -> Butona basıldı.
09:28:03.113 -> button press but how I can :)
@PozitronikTech commented on GitHub (Mar 13, 2020):
All information is deleted when you clear the Eeprom memory. Thus, it can be started in Ap mode.
How do we do this through wifimanager?
@tablatronix commented on GitHub (Mar 13, 2020):
or just startConfigPortal, its in the ondemandconfigportal examples...
@PozitronikTech commented on GitHub (Mar 16, 2020):
Thank u