ESP32 Bit Pirate home
  • HDUART
  • Intermediate
  • 3 min
  • Serial CLI

Recipe · Intermediate · HDUART

How to bridge a half-duplex UART

Some devices use a single shared wire for serial TX and RX. HDUART mode lets you bridge that line once the GPIO, baud rate and polarity are known.

UART signal lines between two connected devices.
Use HDUART when the console is one wire, not separate RX and TX pins.

Wiring View

BP UART IOshared TX/RX GPIOGNDGND
Generated from the wiring summary: to BP.
Step 1

Commands

The first entry into HDUART mode asks for the shared GPIO, baud rate, data bits, parity, stop bits and inverted mode.

Result

What it means

If target text appears and the console reacts to input, the shared line, baud rate and serial format are probably correct.

Troubleshooting

  • Using normal UART mode on a one-wire bus.
  • Wrong baud rate, parity, stop bits or inverted setting.
  • No shared ground between target and Bit Pirate.
  • The target console is read-only, locked, or only accepts input after boot.

Next steps

  • Document the working baud rate and inversion setting.
  • Use normal UART recipes if you later find separate RX and TX pads.
  • Keep bridge mode for devices you own or have permission to debug.

Half-duplex UART FAQ

When should I use HDUART instead of normal UART?

Use HDUART when the target has one shared serial data line instead of separate RX and TX pins. If you later find two separate pins, normal UART bridge or sniff mode is usually easier to reason about.

What makes half-duplex bridging different from normal UART bridging?

Half-duplex uses one shared data line, so transmit and receive cannot be treated as two independent wires. The bridge has to respect line direction and target timing more carefully than normal UART.

Can I connect a single-wire UART without checking voltage?

No. Check the target logic level and share ground first. A single shared IO line is easy to fight electrically if another device is driving it or if the target uses a level that is not safe for ESP32 GPIO.

Go deeper