cancel
Showing results for 
Search instead for 
Did you mean: 

send a message to HiveMQ

QuangIoT
Associate II

 

I am running an STM32 NUCLEO F429ZI project connected to HiveMQ, with the following details in the mqtt_app.c file using LWIP and MBEDTLS:

char* strUrlDefault = "mqtt://broker-dev.vconnex.vn:888";
char* strUsernameDefault = "SmartHome";
char* strPassWordDefault = "Sm@rtH0me!2020";
char* strCmdTopicDefault = "CmdTopicTest";
char* strContentTopicDefault = "ContentTopicTest";

How should these parameters be changed for HiveMQ, and are there any other files in STM32IDE that need to be modified in order for the project to work correctly?

QuangIoT_0-1729506155323.png

This is mqtt_app.c file

QuangIoT_1-1729506240236.png

This is mqtt_app.h

QuangIoT_2-1729506325355.png

Structure of project
I hope everyone can help. If I haven't provided enough information, please feel free to ask for more.

6 REPLIES 6
QuangIoT
Associate II

How to connect STM32F429ZI to MQTT HiveMQ? What is the connection principle, and what is the connection command? What are the steps to connect STM32F429ZI to HiveMQ?

QuangIoT_1-1729478648425.pngQuangIoT_2-1729478673054.pngQuangIoT_3-1729478695945.png

 

Andrew Neil
Evangelist III

Please see the posting tips for how to properly post source code - not as images:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

 

Do you have basic TCP/IP working?

SofLit
ST Employee

Hi @QuangIoT ,

Please paste your code using </> button instead of sharing screenshots of it.

Review our tips on posting here.

Thank you

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@QuangIoT wrote:

How to connect STM32F429ZI to MQTT HiveMQ? What is the connection principle, and what is the connection command? What are the steps to connect STM32F429ZI to HiveMQ?


HiveMQTT neither knows nor cares what microcontroller you use - these things would all be the same irrespective of your platform.

I suggest you start by reviewing these basic principles in the HiveMQ documentation, and general MQTT documentation, tutorials, etc.

https://docs.hivemq.com/hivemq/latest/user-guide/index.html

https://mqtt.org/

https://en.wikipedia.org/wiki/MQTT

https://www.emqx.com/en/blog/the-easiest-guide-to-getting-started-with-mqtt

 

"I am not particularly concerned about HiveMQ. I only describe my issue with setting up MQTT information, using HiveMQ as an example. My issue is wanting to modify the username, password, port, and URL but I don’t know which files to edit."

 

@QuangIoT wrote:

I am not particularly concerned about HiveMQ ... My issue is wanting to modify the username, password, port, and URL


But those details will be entirely specific to HiveMQ and how you are using it - cloud? local server? etc ...

 

https://www.hivemq.com/resources/

https://www.hivemq.com/webinars/

https://www.hivemq.com/community/