Introduction
XMODEM is a low-speed file transfer protocol. KERMIT is a file transfer protocol used in an asynchronous communication environment. The main difference between it and XMODEM is: KERMIT can send multiple files at a time, while XMODEM can only send one file at a time; KERMIT responds with a complete packet at the receiver, while XMODEM responds with a single byte; KERMIT provides multiple error corrections. XMODEM only provides an error-checking technology.
Protocol
In terms of flow control, different control schemes can be adopted from different sides. The simplest method is to increase the buffer storage space of the receiving end, so that the receiving end can buffer more data. But this is only a passive and negative method. Because, on the one hand, the system does not allow too large buffer space; on the other hand, when the rate is significantly mismatched, and a large amount of data is transmitted, even if the buffer space is large, there will be insufficient phenomenon. A scheme of sending control characters called "XON/XOFF" is generally adopted, and the control characters are used to determine whether the sender continues to send data, which is more active, more active, and more effective in comparison.
XON/XOFF (continue/stop) is a data flow control protocol between the computer and other components connected in an asynchronous serial connection. For example, the speed at which a computer sends data to a printer is usually faster than the speed at which the printer can print. The printer contains a buffer to store data so that the printer can catch up with the computer. If the buffer becomes full before the printer catches up, the small microprocessor of the printer sends back an XOFF signal to stop data transmission. After printing quite a lot of data, when the buffer memory becomes empty, the printer sends an XON signal to let the computer continue. Send data. "X" stands for "transmitter", and X/ON and X/OFF are signals to turn on and off the transmitter. The actual signal of X/ON is the bit combination of ASCII keyboard combination of Ctrl+Q, and the X/OFF signal is the character of Ctrl+S. When defining a modem for a computer operating system, you may need to use XON/XOFF or CTS/RTS to specify the use of flow control. When sending binary data, XON/XOFF may not be recognized because it is translated into characters.
XON/XOFF is an asynchronous communication protocol. The receiving device or computer uses special characters to control the data flow transmitted by the sending device or computer. When the receiving computer cannot continue to receive data, it sends an XOFF control character to tell the sender to stop the transmission; when the transmission can be resumed, the computer sends an XON character to notify the sender. Among them, XON uses the control character DC1 in the ASCII character set, and XOFF uses the control character DC3 in the ASCII character set. When the receiver on the communication line is overloaded, it sends an XOFF character to the sender, and the sender suspends sending data after receiving the XOFF character; waits for the receiver to process the data in the buffer, and then to the sender after the overload is restored Send an XON character to notify the sender to resume data transmission. In a data transmission process, the cycle of XOFF and XON can be repeated many times, but these operations are transparent to the user, which means that the user does not care about it.
Many asynchronous data communication software packages support the XON/XOFF protocol. This kind of scheme can also be used for computers to send characters to printers or other terminal devices (such as MODEM serial communication). In this case, the control components in the printer or terminal devices are used to control the flow of characters.