# File Transfers

Serial allows you to send or receive files using the following protocols.

To send a file, choose “Send File…” from the File menu, or drop a file into the terminal window from the Finder.

To receive a file, choose “Receive File…” from the File menu.

## Text

- Uses the currently selected text pacing mode to avoid overflowing the input buffer on the target device
- Converts line endings
- Converts character encoding to the chosen encoding

When used with the “Wait for Echo” text pacing mode you may use this mode to execute a series of commands stored within a file on the target device.

This mode is automatically invoked when pasting more than one line into a terminal window.

## Binary (Raw)

This mode sends the bytes contained in the file without any conversion or rate limiting.

## XMODEM

- Requires 8-bit data path
- Not compatible with XON/XOFF flow control
- Receiver initiates the transfer; start the sender first to avoid delay
- No file name or size is transmitted to the receiver. As a result, up to 127 bytes (or 1023 bytes if using the 1K option) of the padding character 0x1A will be added to the end of the received file
- Receiver determines whether CRC or Checksum error detection are used, so you will only see these options when receiving a file
- Sender determines block size

### Send Options

- 1K Block Size: Send 1K blocks instead of the default 128-byte blocks. This can make transfers faster.
- Reduce Padding: When enabled, Serial my fall back to using 128-byte blocks for the final bytes of the file to reduce the amount of padding. This is the default behavior for XMODEM but it may be incompatible with some embedded applications.

### Receive Options

- CRC-16: Use a 16-bit CRC for error detection.
- Checksum: Use an 8-bit checksum for error detection. Less robust than the CRC-16 method.

## YMODEM

- Requires 8-bit data path
- Not compatible with XON/XOFF flow control
- Receiver initiates the transfer; start the sender first to avoid delay
- Sender determines block size
- File size and name are transmitted avoiding XMODEM’s padding issue

### Send Options

- 1K Block Size: Send 1K blocks instead of the default 128-byte blocks. This can make transfers faster.
- Use Simplified Header: Sends a simplified YMODEM header containing only the file size. Hyperterm, the Windows default terminal application prior to Vista, does not include the mtime, mode, or remaining files indicator in the YMODEM header. Some embedded applications rely on this behavior.

## ZMODEM

- Requires 8-bit data path
- Compatible with XON/XOFF flow control

## Kermit

- Requires 8-bit data path
- Compatible with XON/XOFF flow control