Problem in MQTT

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in MQTT

Jump to solution
2,489 Views
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

Labels (1)
0 Kudos
1 Solution
1,974 Views
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.
---------------------------------------------------------------------------

View solution in original post

0 Kudos
22 Replies
1,908 Views
drodgers
Senior Contributor I

Make sure that you are locking/unlocking the TCPIP core prior to calling the MQTT API.  See my post here.

David R.

0 Kudos
1,914 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi prasanth R ,

 Please tell me which SDK example you are using?

  Please give me that example code path in the SDK, then I will help you to check it.

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 Kudos
1,914 Views
prasanthapplied
Contributor III

Hi Kerry,

   SDK Version is 2.6.1.

   Example code path is "C:\Users\AA-PDEE21\Documents\MCUXpressoIDE_11.0.0_2516\workspace\evkmimxrt1064_emwin_gui_demo"

Thanks & Regards,

Prasanth

0 Kudos
1,914 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi prasanth R,

  Do you mean this project:

SDK_2.6.1_EVK-MIMXRT1064\boards\evkmimxrt1064\emwin_examples\emwin_gui_demo

 But this example just he emwin with LCD, it doesn't have the MQTT code.

  Please help double check it, you you really use this example?

 Or do you run this code:

\SDK_2.6.1_EVK-MIMXRT1064\boards\evkmimxrt1064\lwip_examples\lwip_mqtt

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 Kudos
1,914 Views
arimendes
Contributor III

Kerry, 

I've just downloaded the SDK_2.6.1EVK-MIMXRT1064 and I didn't find the lwip mqtt example in the path: \SDK_2.6.1EVK-MIMXRT1064\boards\ev mimxrt1064\lwip examples\lwip mqtt

 

Do I have to add something more than the lwip component to have lwip mqtt example?

 Ari.

0 Kudos
1,914 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Ari Mendes,

   When you generate the SDK, please select all the middleware component:

pastedImage_1.png

Then you will find the mqtt project.

Best Regards,

Kerry

0 Kudos
1,914 Views
prasanthapplied
Contributor III

Dear Kerry,

         Already i download the SDK with all the software components.

0 Kudos
1,914 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi prasanth R,

   The download reply if used for Ari Mendes, I know you already get it.

   Today, I have finished my test platform, I test it, and reproduce your problem, it seems, it is not stable, this is my test result:

Initializing PHY...

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

IPv4 Address     : 192.168.43.199
IPv4 Subnet mask : 255.255.255.0
IPv4 Gateway     : 192.168.43.1

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/#".
Subscribed to the topic "lwip_other/#".
Going to publish to the topic "lwip_topic/100"...
Going to publish to the topic "lwip_topic/100"...
Published to the topic "lwip_topic/100".
Received 18 bytes from the topic "lwip_topic/100": "message from board"
Published to the topic "lwip_topic/100".
Received 18 bytes from the topic "lwip_topic/100": "message from board"
Going to publish to the topic "lwip_topic/100"...
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
Going to publish to the topic "lwip_topic/100"...
Published to the topic "lwip_topic/100".
Received 18 bytes from the topic "lwip_topic/100": "message from board"
Going to publish to the topic "lwip_topic/100"...
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
Received 6 bytes from the topic "lwip_topic/100": "123456"
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
Received 6 bytes from the topic "lwip_topic/100": "123456"
Received 6 bytes from the topic "lwip_topic/100": "123456"
Received 6 bytes from the topic "lwip_topic/100": "123456"
Received 6 bytes from the topic "lwip_topic/100": "123456"
Received 6 bytes from the topic "lwip_topic/100": "123456"
Received 6 bytes from the topic "lwip_topic/100": "123456"
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
Received 6 bytes from the topic "lwip_topic/100": "123456"
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".
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...
Subscribed to the topic "lwip_topic/#".
Subscribed to the topic "lwip_other/#".

Sometimes connected, sometimes not connected, then I use the MQTT.FX to test the test.mosquitto.org, the publish and subscribe is working.

pastedImage_1.png

pastedImage_2.png

From the printf log, we also find:

pastedImage_4.png

Sometimes, the RT board subscribe can receive the data which is published by the mqtt.fx.

About this detail problem, I will check it with our related department, I will give more reply in the next week.

Please keep more patient, thanks.

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 Kudos
1,914 Views
prasanthapplied
Contributor III

Dear Kerry,

This is exactly the same problem what I face. I will wait for your reply.

Thanks & regards,

Prasanth.

0 Kudos
1,914 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi prasanth R,

     Today, I test it again on my side, this is my test result:

    You can find, it can publish and receive the data, but just sometimes, it disconnected:

   You can test it again, whether you can receive the data and publish the data again?

Initializing PHY...

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

IPv4 Address     : 192.168.43.200
IPv4 Subnet mask : 255.255.255.0
IPv4 Gateway     : 192.168.43.1

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...
Going to publish to the topic "lwip_topic/100"...
Subscribed to the topic "lwip_topic/#".
Received 4 bytes from the topic "lwip_topic/100": "8888"
Subscribed to the topic "lwip_other/#".
Received 4 bytes from the topic "lwip_other/10": "3333"
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...
Subscribed to the topic "lwip_topic/#".
Received 4 bytes from the topic "lwip_topic/100": "8888"
Subscribed to the topic "lwip_other/#".
Received 4 bytes from the topic "lwip_other/10": "3333"
Going to publish to the topic "lwip_topic/100"...
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...
Subscribed to the topic "lwip_topic/#".
Received 4 bytes from the topic "lwip_topic/100": "8888"
Subscribed to the topic "lwip_other/#".
Received 4 bytes from the topic "lwip_other/10": "3333"
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...
Subscribed to the topic "lwip_topic/#".
Received 4 bytes from the topic "lwip_topic/100": "8888"
Subscribed to the topic "lwip_other/#".
Received 4 bytes from the topic "lwip_other/10": "3333"
Going to publish to the topic "lwip_topic/100"...
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...
Subscribed to the topic "lwip_topic/#".
Received 4 bytes from the topic "lwip_topic/100": "8888"
Subscribed to the topic "lwip_other/#".
Received 4 bytes from the topic "lwip_other/10": "3333"
Going to publish to the topic "lwip_topic/100"...
Published to the topic "lwip_topic/100".
Received 18 bytes from the topic "lwip_topic/100": "message from board"
Going to publish to the topic "lwip_topic/100"...
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...
Subscribed to the topic "lwip_topic/#".
Received 4 bytes from the topic "lwip_topic/100": "8888"
Subscribed to the topic "lwip_other/#".
Received 4 bytes from the topic "lwip_other/10": "3333"
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...
Subscribed to the topic "lwip_topic/#".
Received 4 bytes from the topic "lwip_topic/100": "8888"
Subscribed to the topic "lwip_other/#".
Received 4 bytes from the topic "lwip_other/10": "3333"
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...
Subscribed to the topic "lwip_topic/#".
Received 4 bytes from the topic "lwip_topic/100": "8888"
Subscribed to the topic "lwip_other/#".
Received 4 bytes from the topic "lwip_other/10": "3333"
MQTT client "lwip_client-123" not connected.
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

  About this problem, I also have talked it with our SDK testing team, they have meet the similar problem in the previous time, but after talking to the project owner, the owner didn't produce the problem.

   Now, our testing team help us to test the newest SDK again, they also reproduce the disconnect problem, they already help tol report the bug to the SDK R&D department again.

   Anyway, if I get any valuable information from our internal side, I will let you know.

   From my today's test result, at least, the code can do the publish and subscribe function, when I use the MQTT to publish the data, the RT board also can receive it. So, you can test it again.  From our original post, it seems, you can receive nothing, that really a problem, and different with my latest result.

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 Kudos
1,914 Views
prasanthapplied
Contributor III

Dear Kerry,

I tested the same code again. Now it works fine not disconnected. I don't know how this happened. I attached a screenshot for your reference.mqtt.PNG

0 Kudos
1,975 Views
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 Kudos
1,908 Views
prasanthapplied
Contributor III

Dear Kerry,

       Okay sure i will test it on my side. Thank you very much for your help.

Thanks & Regards,

Prasanth.

0 Kudos
1,914 Views
prasanthapplied
Contributor III

Dear Kerry,

        I drag and dropped the sdk to MCUXpresso Installed SDK window the select the project using Import SDK Example which is available at the Quick start panel. then i select the board and lwip and lwip mqtt. I attached a screenshot to it. 

I didn't download or install more than this.

Thanks & Regards,

Prasanth.

0 Kudos
1,914 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi prasanth R,

    Sorry for my later reply, really a lot busy recently.

   I have checked it on my side these days, but my company's website is secured, so I can't test the MQTT project directly, I need to buy the Rounter, and use the mobile 4G through the Rounter to get the unsecure network for Ethernet, I already buy the Rounter, but still didn't receive it, maybe still need more time.

   Anyway, I will also help you to check it with our SDK testing team, this project should works, just like the readme.text test result.

  Any updated information from my side, I will let you know.

  Thanks a lot for your understanding.


Have a great day,
TIC

-------------------------------------------------------------------------------
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 Kudos
1,914 Views
prasanthapplied
Contributor III

Dear Kerry,

          Okay sure. Take your time and update me.

Thanks & Regards,

Prasanth.

0 Kudos
1,914 Views
prasanthapplied
Contributor III

Sorry mistakenly i updated wrong directory. The directory is "C:\Users\AA-PDEE21\Documents\MCUXpressoIDE_11.0.0_2516\workspace\evkmimxrt1064_lwip_mqtt_freertos". Please check this.

0 Kudos
1,914 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi prasanth R,

   Thanks for your updated information, you should import the code from this SDK path:

SDK_2.6.1_EVK-MIMXRT1064\boards\evkmimxrt1064\lwip_examples\lwip_mqtt\freertos

   Could you tell me which MQTT testing server you are using? MQTT fx or others, do you connect it successfully, can you also share some screen about it?

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 Kudos
1,914 Views
prasanthapplied
Contributor III

Hi Kerry,

        I didn't change mqtt server. I used the same what was given from an example code. mqtt1.PNGmqtt2.PNG

After first page frequently it says "lwip_client-123" not connected. But i didn't have any internet issues.

Thanks & Regards,

Prasanth.

0 Kudos
1,914 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Prasanth.,

    Thanks for your updated information.

   I will test this code on my side, and give you updated information later, please give me more time.

 

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 Kudos