mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1358] WiFi connection issue arduino vs platformIO #1162
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#1162
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 @JC-Electronics-Design on GitHub (Feb 13, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1358
Basic Info
WiFimanager Branch/Release: 2.0.5-beta (on both Arduino IDE as well as PlatformIO)
Esp8266/Esp32: ESP8266
Hardware: NodeMCU 1.0 (ESP-12E module)
Core Version: 3.0.2 (on both Arduino IDE as well as PlatformIO)
Description
I use PlatformIO for most of my programming, but with this project I'm having some trouble.
The issue I'm having is that when I try to connect to my router via WifiManager by selecting the SSID and entering the correct credentials, is that when I click "Save" and WifiManager tries to connect to the router it fails. When I look at the debug info from PlatformIO I see this line: "*wm:[2] Connection result: WL_NO_SSID_AVAIL". (full debug output below)
As a simple test I thought I'd try the exact same code in the Arduino IDE and see what happens. When I upload the code via Arduino and go through the exact same steps (configure WiFi -> Click correct SSID -> Fill in password -> click save) WifiManager is able to connect to my router no problems. Even MQTT messages are sent without any problems. The debug output from Arduino can also be seen below.
I have been looking into what could be the issue here but can't seem to find the culprit.
I also tried the basic example code in PlatformIO with the same result (WL_NO_SSID_AVAIL).
Can any of you help me with this issue? Thanks in advance!
If any additional info is required please let me know!
Settings in IDE
PlatformIO
Arduino IDE
Additional libraries:
#include <FS.h>
#include <ArduinoJson.h>
#include <MQTTClient.h>
#include <HSBColor.h>
#include <OneWire.h>
#include <DallasTemperature.h>
Sketch
Debug Messages
PlatformIO serial monitor output
*wm:[2] Added Parameter: mqtt_server_ip
*wm:[2] Added Parameter: mqtt_port
*wm:[2] Added Parameter: mqtt_device_id
*wm:[2] Added Parameter: temp_topic
*wm:[2] Added Parameter: temp_time
*wm:[2] Added Parameter: touchbutton
*wm:[2] Added Parameter: button_topic
*wm:[2] Added Parameter: rgb_topic
*wm:[1] AutoConnect
*wm:[1] No Credentials are Saved, skipping connect
*wm:[2] Starting Config Portal
*wm:[2] AccessPoint set password is VALID
*wm:[2] Disabling STA
*wm:[2] Enabling AP
*wm:[1] StartAP with SSID: PD-01RGB-WIFI1
*wm:[1] AP IP address: 192.168.4.1
*wm:[1] Starting Web Portal
*wm:[2] HTTP server started
*wm:[2] Config Portal Running, blocking, waiting for clients...
*wm:[2] Portal Timeout In 300 seconds
*wm:[2] Portal Timeout In 271 seconds
*wm:[2] Portal Timeout In 241 seconds
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- HTTP Wifi
*wm:[2] WiFi Scan SYNC started
*wm:[2] WiFi Scan completed in 2185 ms
*wm:[1] 7 networks found
*wm:[2] DUP AP: WiFi-2.4-774C
*wm:[2] AP: -58 telenet-1650778
*wm:[2] AP: -58 TelenetWiFree
*wm:[2] AP: -66 DIRECT-k4M2026W Wireless
*wm:[2] AP: -84 WiFi-2.4-0DD6
*wm:[2] AP: -85 Proximus Public Wi-Fi
*wm:[2] AP: -86 WiFi-2.4-774C
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- HTTP WiFi save
*wm:[2] processing save
*wm:[2] Connecting as wifi client...
*wm:[2] setSTAConfig static ip not set, skipping
*wm:[1] Connecting to NEW AP: telenet–1650778
*wm:[1] connectTimeout not set, ESP waitForConnectResult...
*wm:[2] Connection result: WL_NO_SSID_AVAIL
*wm:[0] [ERROR] Connect to new AP Failed
*wm:[2] Processing - Disabling STA
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] Portal Timeout In 299 seconds
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- HTTP Exit
*wm:[2] shutdownConfigPortal
*wm:[2] restoring usermode STA
*wm:[2] WiFi Reconnect, was idle
*wm:[2] wifi status: WL_STATION_WRONG_PASSWORD
*wm:[2] wifi mode: STA
*wm:[2] configportal closed
*wm:[1] config portal exiting
Arduino IDE serial monitor output
*wm:[2] Added Parameter: mqtt_server_ip
*wm:[2] Added Parameter: mqtt_port
*wm:[2] Added Parameter: mqtt_device_id
*wm:[2] Added Parameter: temp_topic
*wm:[2] Added Parameter: temp_time
*wm:[2] Added Parameter: touchbutton
*wm:[2] Added Parameter: button_topic
*wm:[2] Added Parameter: rgb_topic
*wm:[1] AutoConnect
*wm:[1] No Credentials are Saved, skipping connect
*wm:[2] Starting Config Portal
*wm:[2] AccessPoint set password is VALID
*wm:[2] Disabling STA
*wm:[2] Enabling AP
*wm:[1] StartAP with SSID: PD-01RGB-WIFI1
*wm:[1] AP IP address: 192.168.4.1
*wm:[1] Starting Web Portal
*wm:[2] HTTP server started
*wm:[2] Config Portal Running, blocking, waiting for clients...
*wm:[2] Portal Timeout In 300 seconds
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- HTTP Wifi
*wm:[2] WiFi Scan SYNC started
*wm:[2] WiFi Scan completed in 2187 ms
*wm:[1] 8 networks found
*wm:[2] DUP AP: telenet-1650778
*wm:[2] DUP AP: WiFi-2.4-774C
*wm:[2] AP: -54 DIRECT-k4M2026W Wireless
*wm:[2] AP: -60 telenet-1650778
*wm:[2] AP: -61 TelenetWiFree
*wm:[2] AP: -80 Proximus Public Wi-Fi
*wm:[2] AP: -81 WiFi-2.4-774C
*wm:[2] AP: -89 WiFi-2.4-0DD6
*wm:[2] Portal Timeout In 297 seconds
*wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root
*wm:[2] <- HTTP WiFi save
*wm:[2] processing save
*wm:[2] Connecting as wifi client...
*wm:[2] setSTAConfig static ip not set, skipping
*wm:[1] Connecting to NEW AP: telenet-1650778
*wm:[1] connectTimeout not set, ESP waitForConnectResult...
*wm:[2] Connection result: WL_CONNECTED
*wm:[1] Connect to new AP [SUCCESS]
*wm:[1] Got IP Address:
*wm:[1] 192.168.0.128
Should save config
*wm:[2] shutdownConfigPortal
*wm:[2] restoring usermode STA
*wm:[2] wifi status: WL_CONNECTED
*wm:[2] wifi mode: STA
*wm:[2] configportal closed
*wm:[1] config portal exiting
Connected to WiFi network!