Xmodem
This is a simple file transfer
protocol that was developed in the late 1970's. Data is divided into blocks. Each
block is composed of
·
Start of header character-SOH, ASCII 1
·
One byte block number-starting at 0 and incrementing to 255,
then 'wrapping' back and starting at zero again
·
The one's complement of the block number
·
128 byte data block size
·
checksum byte-a single byte calculated by adding together
the 128 data bytes and ignoring the carry in the addition. The receiving
computer compares the received checksum with the calculated checksum. If they
match, the receiving computer sends an 'OK' to the sender and the sender
transmits another block. If the checksums do not match a 'NOT OK' is sent back
to the sender and the block is retransmitted. The process continues until all
files have been transferred.
A one byte checksum is not
adequate in detecting all errors an extension to the Xmodem known as Xmodem-crc
was devised. That is, a cyclic redundancy check is applied to the block. The
binary numbers in the block are treated as one huge binary number and this is
divided by a number, ie CRC-16 the binary number is divided by 16. The
remainder is transmitted and compared with one calculated by the receiver.
The drawbacks of Xmodem
·
Transmission is slow because of 'acknowledge'(ACK) and 'not
acknowledge'(NAK) protocol.
·
It does not work well with packet-handling systems.
·
A two-byte Cyclic Redundancy Computation (CRC) is needed to
overcome multiple errors that can occur
in a noisy line.
·
Original block of data was 128 bytes. Longer blocks 1k are
still small.
·
Designed for connections where each end of the connection is
totally occupied in processing the data.