Problem in MQTT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
7,649件の閲覧回数
prasanthapplied
Contributor III

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

ラベル(1)
0 件の賞賛
返信
1 解決策
7,134件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi prasanth R,

   I think it is also related to the web, or the MQTT broker side stability.

   Because, sometimes, when I can't connect the mqtt, I find even the mqtt.fx also lost the connection:

pastedImage_1.png

   I think, this is also the problem why the SDK author can't reproduce our problems in the previous time.

   So, maybe you also can create your own MQTT stable broker, and test it again on your side.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
---------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
22 返答(返信)
308件の閲覧回数
prasanthapplied
Contributor III

Dear Kerry,

        How long will you need to test the code?

Prasanth

0 件の賞賛
返信
308件の閲覧回数
prasanthapplied
Contributor III

Okay Sure.

0 件の賞賛
返信