-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
MQTT fails after 2.4.2 #7150
Comments
Can you retry with git master version or beta version 0.0.1 ? |
Can you also try with my version of the PubSubClient? https://github.com/letscontrolit/ESPEasy/tree/mega/lib/pubsubclient/src That one is also used in Tasmota. |
@full-stack-ex FYI this sketch is running fine here with git master (and we are not alone using this library). |
@d-a-v , actually, I realized my sketch may be essentially different, for what it's worth. |
The WiFiClientSecure underlying lib was replaced since back then due to fragility, a long list of issues, and stagnation. It was axtls and was replaced with bearssl. Please look at the examples for usage. Closing due to user error. |
Sorry, really got stuck with this. Please help find out what that user error was. My code used to build, and devices are being manufactured with it. It does not build any longer. I understand it about the underlying library replacement, but the current versions you mentioned fail anyway. @d-a-v , yes,I have tried both the proprietary code and several open examples with what you recommended
Cloned master, installed the beta from https://d-a-v.github.io/esp8266/Arduino/package_esp8266com_index.json Got state() = -2 in all cases I'll follow up with the exact test code in a separate clean post. Thanks |
This is the code with credentials masked, MQTT in IBM IoT cloud. Getting this with the master, beta, and the recent release (2.6.2):
Same code with 2.4.2 shows this:
What am I doing wrong? Does anybody have a working example for any of the recent builds with MQTT over TLS? @TD-er , I still need to try your version. Tomorrow. |
@full-stack-ex As said above, SSL has changed since 2.4.2. |
----------------------------- Delete below -----------------------------
Basic Infos
Platform
Settings in IDE
Problem Description
MQTT connects fine in 2.4.2 but it fails to connect in 2.6.3 and, apparently, any other version after 2.4.2
Connected to IBM cloud via MQTT/SSL (port 8883).
The same behavior observed with a proprietary program and with the standard example.
MCVE Sketch
https://github.com/knolleary/pubsubclient/blob/master/examples/mqtt_esp8266/mqtt_esp8266.ino
Debug Messages
Attempting MQTT connection...failed, rc=-2 try again in 5 seconds
The text was updated successfully, but these errors were encountered: