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.
Pedro Bertoleti
Hit Me Up On TCP - Part 2 Using TCP/IP for transferring data, MQTT is lightweight and simple-to-use

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.

Every node in a MQTT communication (usually called MQTT client) is connected to a central MQTT server called an MQTT broker and sends and receives messages to other nodes addressed by MQTT topics. When a node publishes a message, it sends the desired payload addressed to a specific MQTT topic, and each node that subscribes to this referred MQTT topic will receive this message. In terms of communication possibilities, any MQTT client can be subscribed to N topics and publish to N topics simultaneously, making MQTT a very versatile communication protocol.

Bu hikaye Circuit Cellar dergisinin August 2024 sayısından alınmıştır.

Start your 7-day Magzter GOLD free trial to access thousands of curated premium stories, and 9,000+ magazines and newspapers.

Bu hikaye Circuit Cellar dergisinin August 2024 sayısından alınmıştır.

Start your 7-day Magzter GOLD free trial to access thousands of curated premium stories, and 9,000+ magazines and newspapers.

CIRCUIT CELLAR DERGISINDEN DAHA FAZLA HIKAYETümünü görüntüle
Renesas New RA8 Entry-Line MCU Groups Brings High Performance of Arm Cortex-M85 Processor to Cost-Sensitive Applications with Market-Leading CoreMark Performance
Circuit Cellar

Renesas New RA8 Entry-Line MCU Groups Brings High Performance of Arm Cortex-M85 Processor to Cost-Sensitive Applications with Market-Leading CoreMark Performance

Renesas Electronics Corp., a premier supplier of advanced semiconductor solutions, introduced the RA8E1 and RA8E2 microcontroller (MCU) groups, extending the industry's most powerful series of MCUs.

time-read
1 min  |
December 2024
Same Sky Expands AMT Absolute Encoder Line to Support Larger Shaft Sizes
Circuit Cellar

Same Sky Expands AMT Absolute Encoder Line to Support Larger Shaft Sizes

Same Sky's Motion & Control Group announced the addition of a new series to its innovative AMT absolute encoder family designed to support larger motor shaft sizes from 9mm to 15.875mm (5/8 inch).

time-read
1 min  |
December 2024
XP Power Launches New Series of Low-Profile, Baseplate-Cooled DC-DC Brick Converters
Circuit Cellar

XP Power Launches New Series of Low-Profile, Baseplate-Cooled DC-DC Brick Converters

The RDF150 and RDF200 series are the latest additions to the RDF series of low-profile, baseplate-cooled, ultra-wide input DC-DC brick converters, which is already available in power outputs of 25W and 50W.

time-read
1 min  |
December 2024
HMI Introduces Ultra-Low Voltage 12-bit GPIO Expander with Interrupt Output
Circuit Cellar

HMI Introduces Ultra-Low Voltage 12-bit GPIO Expander with Interrupt Output

HMI, a leading provider of advanced analog and power management technologies, announced the launch of its HL5310, an innovative ultra-low voltage 12-bit GPIO expander featuring interrupt output.

time-read
1 min  |
December 2024
The Future of Embedded Chip Design Navigating the Chip Creation Space
Circuit Cellar

The Future of Embedded Chip Design Navigating the Chip Creation Space

Custom Silicon at Lower Cost, Reduced Development Time

time-read
6 dak  |
December 2024
The Long and Winding Road
Circuit Cellar

The Long and Winding Road

From Maxim's RS-232 to WeMos ESP32: So Much to Do, So Little Time

time-read
10+ dak  |
December 2024
Start to Finish Driving LCDs
Circuit Cellar

Start to Finish Driving LCDs

Lumex Display with Microchip Driver for a TI MCU

time-read
10+ dak  |
December 2024
Easing the Path for App Releases
Circuit Cellar

Easing the Path for App Releases

Managed Development of React Native with Expo

time-read
10+ dak  |
December 2024
Datasheet: Tiny Embedded Boards
Circuit Cellar

Datasheet: Tiny Embedded Boards

Deliver Power, Performance, and Versatility in Meager Square Millimeters

time-read
2 dak  |
December 2024
Harvesting Ambient Energy
Circuit Cellar

Harvesting Ambient Energy

Hybrid Power Sources Cut IoT Battery Dependency

time-read
10+ dak  |
December 2024