Closed Grand-0 closed 3 years ago
The ESP8266 is not able to connect with a WebSocket MQTT broker. The library PubSubClient can only connect to a TCP MQTT broker. Please try with a console application and a MQTT server created with the MqttFactory instead. If this works the ESP code runs fine. The ESP32 has support for WebSockets out of the box. If the problem persists please reopen this ticket.
Unable to connect to server with esp8266 on C++
Hello everyone! I wrote an Asp.Net Core based mqtt server following this example https://github.com/Atlas-LiftTech/MQTTnet.AspNetCore.AttributeRouting/tree/master/ExampleServer. I pushed this broker on hosting. And I trying connecting to broker with esp8266 using Arduino IDE and C++ code. But I didn't connect to the broker. I've changed my connection strings many times, but still can't connect to the broker.
I wrote console application on C# to check the connection string and yes, I connect to the broker using this string. Perhaps the question is very stupid, but I would be very pleased to get help from knowledgeable guys.
This is code Configuration my broker.
This is my sketch for esp8266
a2507-95ed.p.d-f.pw:80/Broker - path to my broker.
I also tried such connection variations but there are no results.
This is code console application on C#.
I am immensely grateful that you took your time to my question)))