Try GOLD - Free
Hit Me Up On TCP - Part 2 Using TCP/IP for transferring data, MQTT is lightweight and simple-to-use
Circuit Cellar
|August 2024
This is the second in a two-part series where Pedro highlights network communication using ESP32 SOC and the ESP-IDF framework. Part two shows how to establish a multiple-end communication through MQTT, with an ESP32 SOC on one end to another end that can be anything capable of communicating through MQTT. Transport fundamentals are covered through a practical example showing how an ESP32-S2 SoC communicates using MQTT.
Embedded systems are nearly ubiquitous in our lives, affecting both developers and everyday users. Almost every electronic and electrical device around us relies on embedded systems, from smartwatches and phones to modern vehicles like electric cars, electric buses and rental bikes.
The widespread presence of these systems introduces a critical requirement: network communication capability. Many of these devices, integral to our daily routines, need to communicate with other devices or even cloud services to enhance our comfort and efficiency in daily tasks. Consequently, network communication capability - whether local or over the Internet has become a fundamental requirement for embedded systems solutions.
This article explores one of the most popular and scalable methods to allow embedded systems' communication over the network: MQTT. It covers from TCP sockets fundamentals to a practical example on how to communicate to an ESP32-S2 SoC using MQTT communication protocol.
MQTT OVERVIEW
A good start point is to define what MQTT is. MQTT stands for Message Queuing Telemetry Transport, and it was created by IBM in the late 90s. MQTT uses TCP/IP as a layer for transferring data, and has been designed to be a lightweight and simpleto-use network protocol, working with the publish-subscribe paradigm, as seen in the MQTT simplified diagram shown in Figure 1.

This story is from the August 2024 edition of Circuit Cellar.
Subscribe to Magzter GOLD to access thousands of curated premium stories, and 10,000+ magazines and newspapers.
Already a subscriber? Sign In
MORE STORIES FROM Circuit Cellar
Circuit Cellar
Vishay Intertechnology Automotive-Grade Optocouplers Deliver High Isolation Voltage Ratings and Distance for EVs and Solar Inverters
Vishay Intertechnology, Inc. introduced two new Automotive-Grade optocouplers with phototransistor output in a widebody package featuring a comparative tracking index (CTI) of 600.
1 min
July 2026
Circuit Cellar
WWVB Timecode Generator A Tool for Testing Radio-Controlled Clocks
In this article, Robert describes how he built a timecode generator that provides simulated code from WWVB, a radio station operated by the National Institute of Standards and Technology, which is used to synchronize millions of radio-controlled clocks.
16 mins
July 2026
Circuit Cellar
MCUs at the Heart of the Edge Modern MCUs Go Beyond Simple Process Control
Microcontroller Units (MCUs) are the power at the heart of modern embedded systems.
2 mins
July 2026
Circuit Cellar
650V ICeGaN Device for Automotive Applications from CGD Helps Increase EV Range
Cambridge GaN Devices (CGD) has developed a 650V GaN IC for automotive applications that addresses automakers' desires to improve inverter efficiency.
1 min
July 2026
Circuit Cellar
Blues Latest IoT Modules Notecard for Skylo and Notecarrier CX
Satellite comms for IoT projects may seem the domain of enterprise customers, but new modules from Blues can bring satellites within reach even for small professional and research projects.
22 mins
July 2026
Circuit Cellar
Rust: An Embedded Lightning Rod Nothing Is Quite as It Seems
Linus Torvald’s release of Linux 7.0 announced the finalization of Rust-related projects in the kernel: From now on, the programming language is to be considered a first-class member of Linux.
10 mins
July 2026
Circuit Cellar
PLS' Debug and Trace Tool UDE Supports ST's Stellar P3E Automotive Microcontroller
The debug, trace, and test tool UDE Universal Debug Engine from PLS Programmierbare Logik & Systeme, has expanded its support to encompass the Stellar P3E.
2 mins
July 2026
Circuit Cellar
The Tireless Intern: LLM Coding Agents for Embedded Work Using AI Speeds Security Tooling
This article discusses a case study of using a large language model (LLM) to develop a tool for embedded security, that would have otherwise taken several weeks (or months) of effort in a few days.
10 mins
July 2026
Circuit Cellar
IoT Infrastructure: On-Premises Deployment or Cloud Solution?
Designing an IoT system is not only about sensors and dashboards.
5 mins
July 2026
Circuit Cellar
Signal-to-Noise Ratio for Voice Activity Detection Devices
Users needs to be able to give AI glasses voice commands and be sure the device is only picking up their speech, not other sounds.
4 mins
July 2026
Listen
Translate
Change font size
