17.6.2 Xmodem Protocol

The Xmodem protocol supported is the 128-byte length block. This protocol uses a two-character CRC-16 to guarantee detection of a maximum bit error.

The Xmodem protocol with CRC is accurate if both sender and receiver report successful transmission. Each block of the transfer has the following format:

<SOH><blk #><255-blk #><--128 data bytes--><checksum> in which:

  • <SOH> = 01 hex
  • <blk #> = binary number, starts at 01, increments by 1, and wraps 0FFH to 00H (not to 01)
  • <255-blk #> = 1’s complement of the blk#.
  • <checksum> = 2 bytes CRC16

The figure below shows a transmission using this protocol.

Figure 17-2. Xmodem Transfer Example