July 2, 2026By DaqSense R&D Team

Fixing ESP32 Serial Garbage Output: Baud Rate and Boot Message Checklist

#troubleshooting#esp32#serial monitor

ESP32 “serial garbage” usually looks like random symbols, question marks, blocks, or half-readable text in the serial monitor. The board is running, but the bytes are being decoded at the wrong speed or corrupted before they reach the computer.

The good news: most ESP32 serial garbage is not a broken board. It is usually a baud-rate mismatch, bootloader text, wrong board settings, or wiring trouble with an external USB-to-serial adapter.

Quick Diagnosis

What you see Likely cause First fix
All output is unreadable Baud-rate mismatch Match the monitor to Serial.begin(...).
Only the first burst after reset is unreadable Boot ROM or bootloader output Ignore it or monitor at the boot baud rate.
Output is readable sometimes, then corrupts Loose wiring or weak ground Check TX, RX, GND, and USB cable.
Upload works, monitor is garbage on custom board Wrong crystal or board definition Check Tools > Board and crystal settings.
External adapter gets hot or board behaves oddly 5 V logic on 3.3 V ESP32 pins Use a 3.3 V USB-to-serial adapter.

1. Match the Baud Rate

Your firmware and serial monitor must use the same baud rate. If your code says:

void setup() {
  Serial.begin(115200);
}

Then the serial monitor must be set to 115200 baud. If the monitor is set to 9600, the bytes are decoded at the wrong speed and the output becomes junk.

Common ESP32 baud rates:

Baud Where you may see it
9600 Older examples and slow debug logs
57600 Some legacy sketches
115200 Common ESP32 default for examples and boot logs
921600 Fast upload or high-rate logging setups

If you inherited firmware and do not know the baud rate, search for:

Serial.begin

Also check Serial1.begin(...) or Serial2.begin(...) if you are using a hardware UART other than the USB console.

2. Understand ESP32 Boot Output

It is normal for an ESP32 to print boot information immediately after reset. That boot text may appear before your sketch starts. Depending on the chip, framework, and monitor settings, it can look different from your application logs.

If you see one short burst of junk at reset and then your own messages are readable, your application serial settings are probably fine.

Use this test sketch:

void setup() {
  Serial.begin(115200);
  delay(500);
  Serial.println("app started");
}

void loop() {
  Serial.println("tick");
  delay(1000);
}

Expected behavior:

[possible boot text here]
app started
tick
tick
tick

If only the boot text looks odd, ignore it for normal logging. If you are debugging boot loops, set your monitor to the chip’s boot message rate and press reset.

3. Confirm the Correct Board and Crystal Settings

On some ESP32 variants and custom boards, incorrect board settings can make UART timing wrong. If the software assumes one crystal frequency and the hardware uses another, the baud generator can be off enough to corrupt serial output.

In Arduino IDE, check:

  • Tools > Board
  • Tools > Port
  • Tools > CPU Frequency
  • Tools > Flash Frequency
  • Crystal frequency options if shown for that board package

This matters most for:

  • Custom ESP32 boards
  • ESP32-S2, ESP32-S3, ESP32-C3, and ESP32-C6 variants
  • Boards selected as a generic module when a more specific profile exists

If you are unsure, upload the same sketch to a known-good DevKit. If it reads correctly there, your firmware is probably fine and the custom board configuration needs attention.

4. Check External USB-to-Serial Wiring

If your ESP32 board has a built-in USB port, skip this section. If you are using a separate FTDI, CP2102, CH340, or other USB-to-serial adapter, check the wiring carefully.

Minimum connections:

Adapter pin ESP32 pin
GND GND
TX RX
RX TX

Common mistakes:

  • TX connected to TX instead of RX.
  • No shared ground between adapter and ESP32.
  • Jumper wires loose on the breadboard.
  • Adapter set to 5 V logic.
  • ESP32 powered from one source while adapter uses another ground reference.

The ESP32 is a 3.3 V logic device. A 5 V serial adapter can damage it. Use a 3.3 V adapter or level shifting.

5. Look for Power and Cable Problems

ESP32 boards draw more current when Wi-Fi or Bluetooth starts. A weak USB cable, unpowered hub, or overloaded sensor rail can make the serial connection reset or corrupt.

Signs of power trouble:

  • Port appears and disappears.
  • Serial output restarts from boot messages repeatedly.
  • Garbage appears when Wi-Fi starts.
  • Board works from one USB port but not another.

Debug with the simplest setup:

  1. Disconnect external sensors.
  2. Plug directly into the computer.
  3. Use a short data-capable USB cable.
  4. Run the minimal tick sketch above.

6. Separate Garbage from Data Formatting Problems

Unreadable binary symbols are a serial decoding issue. Messy but readable text is usually a formatting issue.

Example of a formatting problem:

Temp: 24.1 C Hum: 48.2 %
Temp: 24.2 C Hum: 48.1 %

That is readable, but it is not ideal for CSV logging. For data collection, print clean delimited rows:

Serial.print(tempC, 2);
Serial.print(",");
Serial.println(humidity, 2);

Result:

24.10,48.20
24.20,48.10

After the Output Is Readable

Once the baud rate and wiring are fixed, the next step is making the stream useful. DaqSense can connect to the ESP32 serial port, split comma-separated rows into columns, show the table live, apply calibration formulas, and record clean CSV files.

That gives you a quick way to confirm that the output is not only readable, but structured enough for real testing.