Return to Pattern Library
UART
Echo characters over a UART console
Requires the Temboo extension.
Platform

ESP32

Open in VS Code
Initialize a UART peripheral and echo received characters back over the same interface, confirming serial I/O bring-up and console/logging connectivity.
Applies when
Use for initial serial bring-up on ESP32, after changing console/UART routing, or before building higher-level command protocols, modem interfaces, or serial device integrations.
Show pattern details
Hide pattern details
Intent
Inspect the workspace, identify an appropriate UART that can be exercised without disrupting required debug/console behavior, and echo received characters or lines back to the sender at the configured baud rate.
Expectation
Data sent from a serial terminal is received and returned accurately with no missing, duplicated, or corrupted data during a sustained test.
Success criteria
The complete test sequence is echoed correctly for the configured duration with no unexplained drops, corruption, duplication, or persistent latency problems.
How it is verified
Use a host serial terminal or scripted serial client to send known text and compare the received echo byte-for-byte. Include short bursts and sustained traffic. Firmware-side logs may confirm initialization but should not be interleaved into the echo stream unless the protocol intentionally allows it.