AnsweredAssumed Answered

Problem in MQTT

Question asked by prasanth R on Sep 9, 2019
Latest reply on Sep 12, 2019 by prasanth R

Dear all,

        I'm using IMXRT1064 development board and i want to use lwip mqtt example. So i tried an example which was given in SDK. While running the board getting DHCP IP and it resolves MQTT broker ip then subscribed a topic. But after that the connection gets failed. The serial window comes like

 

Initializing PHY...

 

************************************************
 MQTT client example
************************************************
Getting IP address from DHCP...

 

IPv4 Address     : 10.10.37.1
IPv4 Subnet mask : 255.255.0.0
IPv4 Gateway     : 10.10.0.202

 

Resolving "test.mosquitto.org"...
Connecting to MQTT broker at 5.196.95.208...
MQTT client "lwip_client-123" connected.
Subscribing to the topic "lwip_topic/#" with QoS 0...
Subscribing to the topic "lwip_other/#" with QoS 1...
Subscribed to the topic "lwip_topic/#".
Going to publish to the topic "lwip_topic/100"...
Subscribed to the topic "lwip_other/#".
Published to the topic "lwip_topic/100".
Received 18 bytes from the topic "lwip_topic/100": "message from board"
MQTT client "lwip_client-123" not connected.
Connecting to MQTT broker at 5.196.95.208...
MQTT client "lwip_client-123" connected.
Subscribing to the topic "lwip_topic/#" with QoS 0...
Subscribing to the topic "lwip_other/#" with QoS 1...
MQTT client "lwip_client-123" not connected.
Connecting to MQTT broker at 5.196.95.208...
MQTT client "lwip_client-123" connected.
Subscribing to the topic "lwip_topic/#" with QoS 0...
Subscribing to the topic "lwip_other/#" with QoS 1...
MQTT client "lwip_client-123" not connected.

 

after sending one or two messages it continuously says not connected. So whats may gives a problem. Please help me to find the solution?

 

Thanks & Regards,

Prasanth

Outcomes