-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WifiClientSecure, PubSubClient and WifiManager dont work together #698
Comments
I had this problem a few days ago. Declaring the |
hmm did you test this in development branch? |
Yes @uched41 I also observed similar issue with MQTT. |
There seems to be some kind of esp bug, where it wont reconnect properly if it thinks is already is. |
are you using set static config? |
Im using static IP for STA. |
I am having the same problem. When I use ESP8266WebServer, esp8266 crash when connecting to secure mqtt. If I don'tdeclare websaver and don't use webserver, esp8266 does not crash and secure mqtt connects with no issue. here is the error Exception (28): here is the stack: Decoding stack results |
I am having the same issue. when I use client.setInsecure(), it connects with no problems. however it crashes when I use client.setTrustAnchors(&cert). |
Maybe it's out of memory? TLS connection needs about 25kb. I have a crash in TLS new operator after ConfigPortal: dontsovcmc/waterius#82 but I don't have a loop. |
Hello I'm having similar issues and hoping someone has a working example. My issue is that ".subscribe" is not calling the callback. I am seeing a "1" returned when I print the result of the subscribe. I am using pubsubclient, wificlientsecure, and wifimanager. I'm using AWS as my MQTT server. I have no problem publishing but cannot subscribe successfully. #include <ESP8266WiFi.h>
}
|
Any progress on this issue. I'm still seeing with the last versions of the wifimanager and PubSubClient. The symptoms I'm seeing the WifiManager Auto connect that stop broadcasting SSID in AP mode. As soon as I remove the TLS code (replace "WiFiClientSecure" with "WiFiClient" ), It works perfectly. When I put back "WiFiClientSecure", the AP mode stop working correctly, SSID is not visible anymore. In the beginning, I though it was an out of memory issue then I moved the code that instantiates "WiFiClientSecure" after the Wifi Manager AutoConnect... so "WiFiClientSecure" is not instantiated before the WifiManager Autoconnect complete. Even then I still see the same issue. Long story short, as soon as the code of "WiFiClientSecure" compiles, the WifiManager Autoconnect stops working correctly... even if we don't instantiate the variables. |
Shrug no one has posted logs from dev |
@adeltc - My configuration works, except for the |
I got my problem solved by Selecting "Basic SSL ciphers(lower ROM use)" in th Arduino Menu "Tools"-->"SSL Support". |
Is there any port overlap, that is a known issue that was just fixed in esp lib |
I used only one TCP connection for the WifiManager AutoConnect... by default, it's using port 80 to provide the configuration gui. |
I'm observing a similar conflict (I think) between WifiManager and WifiClientSecure on an ESP8266. I'm using UniversalTelegramBot library which, in turn, requires WfiClientSecure. I have no issue compiling, and the WifiManager works as expected - first boot starting an AP, subsequent boot leaving the ESP8266 connected to my test WLAN. My loop() seems to be executing correctly: I can see reports via serial console every few seconds that indicate the NTP service is working, telemetry data is being logged, but secure com with Telegram server isn't working. I've tried compiling with the "Basic SSL Ciphers(Lower ROM use)" option, also, with no success. The previous version of my sketch doesn't use WifiManager (hardcoded SSID, PW) and has been working for months without any issues. I really, really, want to use WifiManager to allow WLAN configuration, as well as allowing user entry of some parameters (Telegram bot ID, Telegram user chat ID) to avoid unique edit/compile/upload for these telemetry sensors. Hoping there's a solution for this, somewhere! |
This problem is still persisting, any tips? |
Hmm I have noticed a problem with closing down either the web server or the dns server , these could be conflicting. I use pubsub client and wm and have not had issues let me try again. Can you provide anymore info, have you tried running wm in a non global scope? |
Try this : |
Basic Infos
WifiClientSecure, PubSubClient and WifiManager dont play nice together.
Hardware
NodeMCU dev board.
Description
When I use WifiManager, I cant connect to Secure MQTT broker. When I remove WiFiManager and connect to wifi manually - it works great.
Settings in IDE
[env:native]
platform = native
test_filter = native
debug_tool = native
lib_ignore =
Adafruit BMP280 Library
Adafruit Unified Sensor
PubSubClient
ArduinoJson
WifiManager
[env:esp01]
platform = espressif8266
board = esp01
framework = arduino
upload_speed = 921600
monitor_speed = 115200
test_filter = esp01
build_flags = -DDEBUG_ESP_WIFI
lib_deps =
Wire
I2C
SPI
Adafruit BMP280 Library@1.0.2
Adafruit Unified Sensor@1.0.2
PubSubClient@2.6
ArduinoJson@5.13.2
WifiManager@0.14
Sketch
Serial Output
The text was updated successfully, but these errors were encountered: