MQTT client
Hi ST Community,
I’m working on a project where I need to implement an MQTT client on an STM32 microcontroller. Here’s my current setup:
I have an MQTT broker running on my PC using Mosquitto.
I’ve written a simple C program for publishing messages, and it works fine on my PC (with Paho library, i use visual studio).
Now, I want to port this functionality to an STM32 board, but I’m not sure how to proceed.
I’ve found some example codes online for MQTT on STM32 (https://github.com/stm32duino/STM32Examples/blob/main/examples/Communication/MQTT/PubSubClient/mqtt_STM32Ethernet/mqtt_STM32Ethernet.ino) , but I’m struggling with the initial configuration of the STM32 (I’m new to STM32 and haven’t worked with it before). Specifically:
How do I configure the STM32 (using STM32CubeMX) to support Ethernet and MQTT?
Are there any specific libraries or middleware (like LwIP) that I need to set up?
How do I integrate the MQTT client code with the STM32 HAL (Hardware Abstraction Layer)?
Could someone guide me through the steps or point me to relevant documentation/tutorials? Any help or advice would be greatly appreciated!
I have STM32H732ZGT6
Thank you in advance!
Best regards

