[GH-ISSUE #1107] Defining WifiManager causes MQTT connection to fail #948

Closed
opened 2026-02-28 01:27:48 +03:00 by kerem · 1 comment
Owner

Originally created by @coolcoastcat on GitHub (Aug 14, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1107

Hardware

WiFimanager Branch/Release:

  • [ *] Master

Esp8266/Esp32:

  • [ *] ESP8266

Hardware: ESP-12e, esp01, esp25

  • [ *] ESP12 E

ESP Core Version: 2.4.0, staging

  • [ *] 2.4.0

Description

I have a working example in which I can connect to Google's IoT API with the Google Cloud IoT Core JWT library, v1.1.10, which uses the Arduino MQTT library, v2.4.7. I'm trying to weld this code into my project which leverages the WifiManager for AP configuration and simply instantiating the WifiManager with the following line of code causes the connection to MQTT to fail:

WiFiManager wifiManager;

The error returned by the MQTT library, when the WifiManager is instantiated, is: LWMQTT_NETWORK_FAILED_CONNECT which is cryptic and has no relevant hits in a google search.

Settings in IDE

The project is built from command line using pio run --target upload --target monitor

Relevant Additional libraries:
#include "WiFiClientSecureBearSSL.h"
#include <CloudIoTCore.h>
#include "esp8266_mqtt.h"

Debug Messages

The WifiManager is the first call in the setup loop and no matter what delay is injected in the setup loop at the start, the only debug seen is:

*WM: freeing allocated params!

Not clear why simply instantiating the WifiManager object would cause a collision in the ESP8266Wifi Wifi object and prevent a successful MQTT connection.

Originally created by @coolcoastcat on GitHub (Aug 14, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1107 #### Hardware **WiFimanager Branch/Release:** - [ *] Master **Esp8266/Esp32:** - [ *] ESP8266 **Hardware: ESP-12e, esp01, esp25** - [ *] ESP12 E **ESP Core Version: 2.4.0, staging** - [ *] 2.4.0 ### Description I have a working example in which I can connect to Google's IoT API with the [Google Cloud IoT Core JWT library, v1.1.10](https://github.com/GoogleCloudPlatform/google-cloud-iot-arduino), which uses the [Arduino MQTT library, v2.4.7](https://github.com/256dpi/arduino-mqtt). I'm trying to weld this code into my project which leverages the WifiManager for AP configuration and simply instantiating the WifiManager with the following line of code causes the connection to MQTT to fail: ``` WiFiManager wifiManager; ``` The error returned by the MQTT library, when the WifiManager is instantiated, is: `LWMQTT_NETWORK_FAILED_CONNECT` which is cryptic and has no relevant hits in a google search. ### Settings in IDE The project is built from command line using `pio run --target upload --target monitor` Relevant Additional libraries: #include "WiFiClientSecureBearSSL.h" #include <CloudIoTCore.h> #include "esp8266_mqtt.h" ### Debug Messages The WifiManager is the first call in the setup loop and no matter what delay is injected in the setup loop at the start, the only debug seen is: ``` *WM: freeing allocated params! ``` Not clear why simply instantiating the WifiManager object would cause a collision in the ESP8266Wifi Wifi object and prevent a successful MQTT connection.
kerem closed this issue 2026-02-28 01:27:48 +03:00
Author
Owner

@coolcoastcat commented on GitHub (Aug 14, 2020):

This turned out to not be a WifiManager issue.

<!-- gh-comment-id:674179414 --> @coolcoastcat commented on GitHub (Aug 14, 2020): This turned out to not be a WifiManager issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#948
No description provided.