mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #1052] wm.process() only returns true once after saving new connection #898
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#898
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 @Craigzyc on GitHub (May 12, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1052
In the on demand non blocking. What can we test to know if there is an active connection?
I would have expected wm.process() to return true whenever there is a connection but that doesn't seem to be the case.
Thank you for any help
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
Using the non blocking on demand, how are we supposed to tell if its connected?
I did something along the lines of this inside the loop.
if(wm.process()){ Serial.println("Connected"); }The print gets executed once when you make a new connection. It does not get executed on a reboot with a saved connection even when the serial output shows connected. Should it not always be "true" when connected?
Settings in IDE
Additional libraries:
Sketch
Debug Messages
*WM: [1] AutoConnect
*WM: [2] esp_wifi_set_country: US
*WM: [2] ESP32 event handler enabled
*WM: [2] Connecting as wifi client...
*WM: [3] STA static IP:
*WM: [2] setSTAConfig static ip not set, skipping
*WM: [1] Connecting to SAVED AP: Samsung Galaxy Note9 5849
*WM: [3] Using Password: /////////
*WM: [3] WiFi station enable
*WM: [1] connectTimeout not set, ESP waitForConnectResult...
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] AutoConnect: SUCCESS
*WM: [1] STA IP Address: 192.168.43.192
@tablatronix commented on GitHub (May 12, 2020):
Same way you normally use autoconnect
if(wm.autoConnect("AutoConnectAP")){ Serial.println("connected...yeey :)"); }its in the example.
@Craigzyc commented on GitHub (May 13, 2020):
I understand that. I was looking for a way to test if the connection is active, that only tells me if its started.
if(Wifi.status() == WL_CONNECTED) does what I was looking for.
Thank you