ESP32 Bit Pirate home
  • UART
  • Beginner
  • 5 min
  • Serial CLI

Recipe · Beginner · UART

How to read UART as raw hex bytes

Use UART raw mode to view serial traffic as hexadecimal bytes instead of printable ASCII.

UART signal lines between two connected devices.
A practical ESP32 Bit Pirate recipe based on documented firmware commands.
Step 1

Commands

Run this sequence from the CLI. Adjust pins, addresses or filenames to match your own setup.

Result

What it means

Hex output makes it easier to recognize headers, checksums and packet boundaries before writing a parser.

Troubleshooting

  • Re-enter the selected mode setup if pins changed.
  • Confirm the target shares ground with the ESP32 Bit Pirate.
  • Start with short commands before using longer capture or bridge sessions.

Next steps

  • Use bytecode to send a request and read a fixed number of bytes.
  • Switch back to read for printable logs.
  • Capture the same traffic with a logic analyzer if timing matters.

UART raw hex FAQ

When is UART raw mode better than text read?

Use raw mode when the stream includes binary frames, control bytes, checksums, zero bytes or non-printable characters. Text read is better for boot logs and human-readable console output.

What does raw hex mode reveal that text mode hides?

Raw hex preserves byte values that may not be printable text, including binary framing, control characters and protocol markers. It is better than text mode when you do not yet know the payload format.

How do I use raw bytes for protocol analysis?

Look for repeated headers, fixed lengths, counters and checksums. Capture the same action several times, then separate stable fields from values that change with state, time or command.

Go deeper