ESP32 Bit Pirate home
  • UART
  • Intermediate
  • 10 min
  • Serial CLI

Recipe · Intermediate · UART

How to transfer files over UART XMODEM

Some bootloaders and recovery consoles still use XMODEM. Bit Pirate can send or receive files through UART while storing data on the SD card.

File transfer workflow between device and storage.
Keep storage and UART setup separate: mount/check files first, then start XMODEM.

Wiring View

BP TXBP RXRXBP TXGNDBP GND
Generated from the wiring summary: to BP.
Step 1

Commands

Run the commands below after selecting the right Bit Pirate mode and confirming the wiring.

Result

What success looks like

The transfer advances block by block and exits cleanly. Repeated NAKs usually mean the target is not ready, the baud rate is wrong or the file path is invalid.

Troubleshooting

  • File is not present on the SD card.
  • Target is not in XMODEM receive/send mode.
  • Baud rate mismatch.
  • Noise or weak ground causing block retries.

Next steps

  • Use a small known file to validate the path first.
  • Keep the baud rate conservative if block retries appear.
  • Use read after the transfer to check the bootloader response.

UART XMODEM transfer FAQ

Why does XMODEM require an SD card?

The UART XMODEM workflow sends files from SD or receives files to SD, so the file path must exist and the card must be mounted before starting the transfer.

What roles do sender and receiver have in XMODEM?

One side must wait in receive mode while the other sends blocks with acknowledgements and retries. Choosing the wrong direction changes the whole transfer flow.

How should I test XMODEM safely?

Use a small known file first, keep the baud rate conservative, and save the received file under a new name so you can compare it before attempting a firmware recovery transfer.

Go deeper