LWIP MQTT not connecting

11 Ansichten (letzte 30 Tage)
Sébastien Trocherie
Sébastien Trocherie am 29 Nov. 2021
Kommentiert: Youssef Amir am 2 Mai 2024
Hi,
I'm using the STM32F746NG discovery board to connect to the thingspeak MQTT broker.
However I can't connect to the server, i'm using dns to get the server ip adres which I then use in the mqtt_client_connect function.
When I get to the callback function the status is 256 (MQTT_CONNECT_DISCONNECTED).
I've had this problem before with a local MQTT broker (mosquitto 2.0), I was able to solve this problem by installing an older version (mosquitto 1.161a).
I'm using the correct credentials because they work in the mqtt_spy application.
Has anyone had this problem before or a sollution for this problem?
With kind regards
Sébastien

Antworten (1)

Vinod
Vinod am 31 Dez. 2021
Could you provide more information - what is the client ID of your device? We may be able to look at the server logs given the client ID to provide you some pointers.
  3 Kommentare
Andrew Bierman
Andrew Bierman am 26 Mär. 2024
My fault. Apparently, subscribing to a nonexistent channel casues the broker to disconnect. Without doing that it appears to work fine.
Youssef Amir
Youssef Amir am 2 Mai 2024
@Andrew Bierman I am also using MQTTX, but I can't get it working. What IP address did you use for the EMQX broker

Melden Sie sich an, um zu kommentieren.

Communitys

Weitere Antworten in  ThingSpeak Community

Kategorien

Mehr zu Android Devices finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by