mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1525] ESP8266 Issue with using WM and painlessMesh together #1302
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#1302
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 @wok1909 on GitHub (Nov 27, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1525
Basic Infos
Hardware
WiFimanager Branch/Release: Master
Esp8266/Esp32: Esp8266
Hardware: NodeMCU
Core Version: Don't know
Description
Problem description
I am currently trying to use WM and painlessMesh together.
The reason is, I want to make one NodeMCU to connect to both WiFi and Mesh and the rest of the NodeMCUs to be connected only in Mesh. The NodeMCU that is connected to both WiFi and Mesh will collect all the message from other NodeMCUs and send MQTT message through WiFi.
However, I am currently having a big trouble doing this. I have seen the previous issues with WM and painlessMesh using together and I also have checked that example of using both could be considered (https://github.com/tzapu/WiFiManager/issues/850#issuecomment-638220325). What I have tried didn't work and want to ask some help for solving this.
This is my code.
This is a very simple test I wrote for checking if both WM and painlessMesh works.
The result I get after connecting to a WiFi using WifiManager is like this.
Here is my Serial Monitor result.
What I expect to see is after connecting to the WiFi, it should reach to function onConnectionEstablished() and print out "Connection with MQTT Broker Success!" on my Serial monitor but nothing comes out even after minutes passed. Usually it should come up right away when painlessMesh is not implemented.
Is there anyway that I can use WM and painlessMesh together?
@wok1909 commented on GitHub (Nov 28, 2022):
One solution that I have thought of is using WM only for getting the WiFi SSID and Password from user.
If WM can open HTML page to show user which WiFi is available to connect and read WiFi SSID and Password from user, I think I can just pass this info to MQTTClient and connect WiFi right through without using WM.
Will this be possible for only using WM to get WiFi SSID and Password?
@tablatronix commented on GitHub (Nov 28, 2022):
I would assume since you are managing wifi client yourself you should NOT be using a constructor that also does wifi negotiation. Why are you passing wifi credentials to espmqttclient?