mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #1148] Can't reconnect after disconnect #984
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#984
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 @Primus007 on GitHub (Nov 20, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1148
Basic Infos
Arduino IDE 1.8.12
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
I use your WifiManager to connect to my home Network. It works fine. But after i get some infos from the internet i disconnect the wifi in my Code. it should reconnect if i press a button. but if i do that, always the AP Config mode fires up and i get the error: [ERROR] wifi begin failed
Settings in IDE
Module: Wemos D1 & R2 mini
Additional libraries:
Sketch
I disconnect with this code:
WiFi.persistent(false);
WiFi.disconnect();
WiFi.persistent(true);
and i try to reconnect with this code:
wm.autoConnect("Clock_Config");
Debug Messages
@tablatronix commented on GitHub (Nov 22, 2020):
*WM: [0] [ERROR] wifi begin failed
hmm this is something in the esp lib failing
Can you try using wm.disconnect() instead ?
@Primus007 commented on GitHub (Nov 24, 2020):
wm.disconnect() works fine. Thank you.
@tablatronix commented on GitHub (Nov 24, 2020):
Thanks, something must be left hanging with the esp method. Glad it helped
@Primus007 commented on GitHub (Feb 12, 2021):
I have a similar problem.
Here my code:
Here is the Result:
WiFi saved?: YES
SSID: hotspot_test
conn_result: 3
Wifi is connected!
Wifi Disconnect
*WM: [1] Disconnecting
*WM: [3] WiFi station disconnect
Connection Result: 0
Wifi Disconnect
*WM: [2] Disconnecting: Not connected
Connection Result: 0
Wifi Disconnect
*WM: [2] Disconnecting: Not connected
Connection Result: 0
The first connect works fine conn_result: 3
Then i disconnect and after a delay i try to connect with the same method as before and the connect result is always 0
with WiFi.disconnect() is the same problem.
Why? what is wrong?