Skip to main content
Associate III
October 24, 2024
Question

STM32F429ZI NUCLEO connect MQTT broker

  • October 24, 2024
  • 5 replies
  • 2903 views
I'm facing an issue connecting STM32 to the MQTT broker.

 

 

 

 

This topic has been closed for replies.

5 replies

Andrew Neil
Super User
October 24, 2024

@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.
QuangIoTAuthor
Associate III
October 24, 2024

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.

 

 

Andrew Neil
Super User
October 24, 2024

@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.