2026-04-28 11:22 PM
Hello!
I have a custom board with STM32F746VGT6 MCU, LAN8742A Eth PHY and Ethernet socket. I would like to implement MQTT communication in my project with my board as a client. I am familiar with LwIP and FreeRTOS and use both of these libraries in my current program.
I already tried using WolfSSL and WolfMQTT (and succeeded to some degree), but it wasn't very pleasant experience and I had to manually copy and change many files to make it work. I want to rewrite the MQTT implementation as the current one doesn't work very efficiently, but I don't really know where to start.
I'm grateful for all suggestions!
2026-04-29 3:55 AM
Hi,
You could consider using Mongoose. It is a networking library, designed to be used in embedded systems, with a focus on the STM32 devices, including the STM32F746 MCU. It has support for a considerable amount of networking protocols, including MQTT (up to version 5.0). The MQTT API is well documented and integrating Mongoose into your project is straightforward: you just need to copy the 2 source files, along with a few other simple tweaks and configurations and it will work! Also, there is no need to use LwIP (although Mongoose can work with it as well), since Mongoose comes with its own built-in TCP/IP network stack.
To get a better understanding on how to use Mongoose, you can try having a look at any of these tutorials. Simply run them in your Linux/Windows environment and inspect the code to get a feel on how to use the MQTT API in your applications.
Or if you want to test it directly on your board, there is this example of a Mongoose project running on the Nucleo-F746ZG board (auto-generated by the Mongoose Wizard tool), it also includes a simple MQTT client to which you can add your own logic to it. To download it to your computer, simply go to the Settings tab, select an empty directory where you want it to be stored and click the blue "Generate C/C++ button" in the upper corner. You can then build it and flash it to your board.
Heads up: I am part of the Mongoose development team, I hope this helps you with your project.
2026-04-29 5:06 AM - edited 2026-04-29 7:12 AM
Some suggestions here from @STea:
PS:
From the MQTT.org website:
Getting started - Basic Concepts & Tutorials
MQTT Software - including loads of clients
#MQTT
2026-04-29 6:56 AM
Thank You for suggestions. I will read Your replies in the near future when I have more free time.