ESP32 FAQ

ESP32 UART: Serial, TX2, AT Commands

// uart · faq

Filed under: ESP32 · UART · Updated August 2026

ESP32 UART questions come in three flavors: which pins, which API, and why nothing comes back. Three hardware serials, one 115200 default, one loopback test that settles arguments.

How to Use Hardware Serial in ESP32?

Serial, Serial1, Serial2 — three hardware UARTs, each with begin(baud) and read()/write(). Serial sits on the USB bridge for boot logs and flashing; the other two are free. Remap pins freely: Serial2.begin(115200, SERIAL_8N1, RX2, TX2). How to use hardware serial in esp32 is 90% this paragraph.

How to Send AT Commands to ESP32?

Two different things people mean here. Most common: the ESP32 runs the official AT firmware and you type AT commands at it — AT returns OK, AT+GMR returns the version. The other meaning: driving a separate AT device (LTE, GPS) from the ESP32’s serial. Both: open the port, write the command, read the response.

How to Send Serial Data Out of ESP32 TX2?

Serial2.write(data) — that’s it. How to send serial data out of esp32 tx2 beyond one line: pick your payload, wire TX2 to the target’s RX, share ground. Two gotchas: 3.3V out reads fine on most 5V Arduino inputs, but true 5V needs a shifter; and TX2 defaults to GPIO17 on many devkits.

How to Use TX2 on ESP32?

A plain hardware UART pin: begin the port, write, read. How to use tx2 on esp32 without the defaults: remap with Serial2.begin(baud, SERIAL_8N1, rxPin, txPin) — any pins work. Defaults depend on your board’s silkscreen.

Is TX2 on ESP32 Different Then TX0?

Yes — one of the few hard differences. TX0 sits on the USB-serial bridge for boot logs and flashing; the chip talks through it at reset. TX2 is a free UART with nothing attached, usable once you begin() it. The TX1 variant gets asked too — is tx2 on esp32 different then tx1 — no: same idea, different default pins (GPIO1/GPIO3).

How to Use Putty with ESP32?

Putty: Serial mode, COM port (Device Manager → Ports), 115200. Putty suits boot logs and AT firmware — raw bytes, nothing added. One setting: Connection → Serial → Flow control = None, or the board stops responding.

How to Check ESP32 for UART Response?

The loopback test settles it: jumper TX to RX, echo what you read. No echo — suspects in order: baud, pins, board. How to check esp32 for uart response without a jumper: send known bytes, watch for RX activity. The debugging FAQ has the failure decode.

How to Transmit Data with UART ESP32?

print() writes text, write() writes raw bytes — vital for fixed frames. How to transmit data with uart esp32 reliably: agree on baud and frame (8N1 everywhere), send a delimiter, read until it arrives. The default RX buffer is 256 bytes — call Serial.setRxBufferSize(1024) before begin() for bursts.

How to Find the ESP32 Serial Number?

esptool.py chip_id reads the chip’s unique eFuse MAC — the de facto serial number. On my board, –port COM7 printed MAC: 24:0A:C4:8F:11:2B. The eFuse is ground truth and survives reflashing — module stickers don’t. The PlatformIO FAQ shows the toolchain.

How to Use AT Commands in ESP32?

Flash the official AT firmware with esptool, open the port at 115200: AT for alive, AT+GMR for version, AT+CWMODE for Wi-Fi. How to use at commands in esp32 is a full protocol — and people searching “how to send tx2 on esp32” usually want the pin: GPIO17. AT firmware is the ESP32’s second life as a Wi-Fi coprocessor — the getting-started FAQ has board-side basics.

Type, Echo, Verify — In Your Browser

When UART “does not work”, the first diagnostic is a loopback — and ours runs in the simulator:

ESP32 Serial Echo ready!
Type anything in the Serial Monitor...
Echo: hello
Echo: any text you like

If the echo answers, the code, the monitor settings and the virtual TX/RX path are all sane — the same divide-and-conquer you run on a bench with two jumper wires, minus the soldering iron.

Leave a Reply

Your email address will not be published. Required fields are marked *