cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429ZI NUCLEO connect MQTT broker

QuangIoT
Associate II
I'm facing an issue connecting STM32 to the MQTT broker.

 

 

 

 

5 REPLIES 5

@QuangIoT wrote:
I'm facing an issue connecting STM32 to the MQTT broker

What MQTT broker?

How are you trying to connect: Ethernet? WiFi? Other?

Are you sure that the basic IP connection is working?

Are you sure that your login/connection credentials & settings are correct?

 


@QuangIoT wrote:
 
the mqttstatus only reaches MQTT_CONNECT and then returns to MQTT_START instead of progressing to MQTT_RUNNING.

Sounds like the connection is failing

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I'm using HiveMQ with Ethernet.
I'm certain it's working because I can ping that IP address.
When I log the status, it shows the connection state, but it doesn't reach the running state to send/receive data.

 

 


@QuangIoT wrote:

I'm using HiveMQ with Ethernet.


So have you resolved this question yet: https://community.st.com/t5/stm32-mcus-embedded-software/send-a-message-to-hivemq/td-p/733865 ?

 


@QuangIoT wrote:

I'm certain it's working because I can ping that IP address.


So that's the basic IP connection.

Successful ping is certainly necessary - but may not be sufficient.

 


@QuangIoT wrote:

When I log the status, it shows the connection state, but it doesn't reach the running state


So look at what's necessary to get from 'connected' to 'running', and see where that's failing.

Is the connection dropping?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I have solved the previous issue, but with this one, I still don't know why it can't reach the running state. I also haven't found a solution for this problem yet.


@QuangIoT wrote:

I have solved the previous issue, .


Then please mark the solution in that thread:

https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

 


@QuangIoT wrote:

I still don't know why it can't reach the running state.


Again, look at what's necessary to get from 'connected' to 'running', and see where that's failing.

Is the connection dropping?

Have you used Wireshark or similar to see what's happening on the Ethernet?

https://www.google.com/search?q=Wireshark+mqtt+debugging 

Can you enable extra logging at the client?

Are there logs available at the Broker end?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.