---
title: "MQTT Client on W5500 + STM32"
url: "https://maker.wiznet.io/scarlet/projects/mqtt-client-on-w5500-stm32/"
markdown_url: "https://maker.wiznet.io/scarlet/projects/mqtt-client-on-w5500-stm32/md"
type: "UCC: User Created Content"
author: "eXtreme Electronics"
author_url: "https://www.youtube.com/watch?v=uBc6TSgYrW4"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "eXtreme Electronics"
original_url: "https://www.youtube.com/watch?v=uBc6TSgYrW4"
published: "2023-07-18"
language: "en"
likes: 0
views: 302
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# MQTT Client on W5500 + STM32

> Here I am showing my demo of MQTT Client running on STM32F051 and W5500 as Ethernet device. The MQTT Client is based on Paho open source MQT

Original author: eXtreme Electronics (source: https://www.youtube.com/watch?v=uBc6TSgYrW4)

## Article

This video provides a guide on establishing communication between the STM32 microcontroller and an Android mobile device using the MQTT protocol. MQTT, a lightweight message broker protocol, is widely adopted for reliable communication between IoT devices and applications. In this guide, we will utilize the MQTT broker, Mosquitto, to set up real-time communication and explain the process of data exchange between the Android app and the STM32 board.

(00:00) first of all I will launch the mosquito mqtt broker and for that I have created a desktop icon here so that I can launch it easily with a single click and what I have done here I am using this V switch and I have also specified a custom configuration file on the command line and here I have also opened this terminal real terminal and this is my Cube ID and I will use this real term to view the outputs from my stm32 so now let us start I am launching mosquito and here you can see it is started running now I will open my mqtt on my Android

(00:45) phone and in this IP address this hosts IP address I will put the IP address of my PC where mosquito server is running here you can see that my Android mobile is connecting to mosquito and it has connected here on the my mqtt Android app I have already subscribed to the topic on which my microcontroller that is stm32 is publishing the message now I will power up my stm32 board and here you can see the LED gluing here you can see the messages sent by my stm32 on serial terminal and here on the mosquito terminal we can see that it is

(01:48) receiving published from my stm32 this is my ID of my sm32 i o tens w55 so as you can see uh I am sending a I am publishing a message every second from my embedded host that is stm32 and this is mosquitoes receiving that message and it is relaying it to the subscriber which is my Android phone and here you and here you can also see the messages appearing on my Android phone complete video course is available on udemy soon I will post detailed videos that teaches you how to implement the mqtt protocol on your w5500 base project

(02:51) so go there enroll in the course see you there

---

Source: https://maker.wiznet.io/scarlet/projects/mqtt-client-on-w5500-stm32/
