YMODEM
YMODEM
Main page

YMODEM

logo
Community Hub0 subscribers

YMODEM

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
YMODEM

YMODEM is a file transfer protocol used between microcomputers connected together using modems. It was primarily used to transfer files to and from bulletin board systems. YMODEM was developed by Chuck Forsberg as an expansion of XMODEM and was first implemented in his CP/M YAM program. Initially also known as YAM, it was formally given the name "YMODEM" in 1985 by Ward Christensen, author of the original XMODEM.

YMODEM extended XMODEM in three ways, combining features found in other extended XMODEM varieties. Like XMODEM-CRC, YMODEM replaced the 8-bit checksum with a 16-bit cyclic redundancy check (CRC), but made it the default form of correction instead of optional. From TeLink it added the "block 0" header that sent the filename and size, which allowed batch transfers (multiple files in a single session) and eliminated the need to add padding at the end of the file. Finally, YMODEM allowed the block size to be increased from the original 128 bytes of data to 1024, as in XMODEM-1k, which greatly improved throughput on faster modems.

Forsberg built the standard with all of these features as runtime options, allowing a single protocol driver to fall back to XMODEM-CRC or even XMODEM when connecting to non-YAM systems. He believed that programmers would want to implement as many of these features as possible on any given platform. He was dismayed to find that the majority of implementations were actually providing nothing more than 1k block size with CRC-16, failing to implement the "block 0" while continuing to use the YMODEM name. The result was the release of many mutually incompatible YMODEM implementations, and the use of the name YMODEM Batch to clearly indicate those versions that did support the complete standard.

The original XMODEM was a very simple protocol and that is the reason for its success; it could be implemented on practically any machine of the era, even those with very limited processors and storage. It worked by breaking up the data to be sent into 128-byte packets, adding a 3-byte header and 1-byte checksum footer, and sending the resulting 132-byte packets out in order. The receiving computer recalculated the checksum from the 128 bytes of data, and if it matched the checksum sent in the footer it sent back an ACK, and if it did not match, a NAK. When the sender received an ACK it sent the next packet, while a NAK caused it to re-send the last one.

There were a number of problems with the protocol. The use of a simple checksum meant some common errors could go unnoticed. The small packet size and requirement to wait for the ACK or NAK led to slow performance on higher speed links or ones with significant latency. Finally, as the transfer contained no details of the file, every file had to be manually started, which could be a chore when many small files were being transferred.

Solutions to these problems were developed during the early 1980s. XMODEM-CRC replaced the checksum with a 16-bit cyclic redundancy check (CRC), which was much more resistant to common errors. XMODEM-1k expanded the packet size from 128 bytes to 1024, improving performance on higher-speed connections, while others, like WXMODEM and SEAlink instead introduced sliding window systems to combat both performance and latency, at the cost of some complexity. Still others, like TeLink and MODEM7, added file information so that a single transfer could contain multiple files, allowing batches of files to be sent with a single command.

Chuck Forsberg, author of the CP/M "Yet Another Modem program", or YAM, decided to write a single protocol driver that supported many features compared to XMODEM and called it YMODEM. When the users started a transfer they could indicate which options they wanted on the command line, for instance, saying they wished to use CRC. The protocol was written so that it would attempt this style, but gracefully fall-back to match whatever capabilities the remote software did implement.

One problem with the original XMODEM was that there was no defined way to abort the transfer once started. The normal solution was to send NAKs to every subsequent packet if the user requested it. Since the XMODEM protocol defined a limit of ten NAKs to abort a send, and each packet might take a second to send, this meant there was a ten second delay where the sender continually sent data that was simply ignored.

See all
User Avatar
No comments yet.