X-Modem



The here returned courses only serve the short overview. For detailed information, the records of Ohmen Techn. and AT&T are responsible.

In the "auto-mode", the recipient first sends the modi-byte for the highest backed X-Modem format.



(1k)WX-Modem CRC = 'W' (1k)X-Modem CRC = 'C' X-Modem (Csum) = NAK (15h) (nur 128byte/Paket)

No first data package is received within 10 seconds, according to we the sign still two further times repeats. No data package was still received afterwards, so the process is switched to the next-lower modes and repeats. After program by 3x NAK, to get without a data package, the transfer with 3 CAN-character is broken off.
A data package is received, however the 1k/Paket-mode doesn't support, this package is prematurely answered with a NAK, which leads to the "framing-break", becomes switch in the station through what on 128byte/Paket and the first record gets fashion the shipping again in this. In all modes, as far as on WX-Modem CRC, the station waits 1sec maximum by each package. on a receipt of the recipient through ACK as well as NAK. In the mistake case or staying out receipt, the package is maximum still repeated in 3x. In the WX-Modem CRC -modes must not answer each package individually the recipient and this doesn't service dispatch by each package either. It is worth a window-size of 4 packages. I.e. the station sends 4 packages directly consecutively and, it still was not supposed to have gotten any receipt for one of the packages in the meantime, waits on a receipt only afterwards. However, a receipt represents unquited package up to now also immediately a confirmation of the prior ones consequently. Consequently, it becomes with an ACK[2] also the package [1] signs. A mistake however becomes with a NAK[n] reported, with what [n] is the package number of the faulty package and rejects finished already through the station still directly afterwards would send package simultaneously. This takes away to the repetition of the packages [n]. At the end of a transfer, the last package is finished the transfer with an EOT (04h) replenished and subsequent with EOF (1Ah) if necessary. During the transfer can break off in the mistake case, that cannot be remedied by a repetition, the transfer through a CAN (18h) the station as well as the recipient. For the further one, the mechanisms still are usable to the temporal syncronisation after X-On / X-Off as well as SYN / DLE. I.e. the recipient is not ready for a next frame, so he sends X-Off or SYN to the station. If the recipient is again ready, so he sends a X-On to the resumption of the transfer as well as finishes the dispatch of SYN. If the pause lasts the station too long, so this can the transfer with X-On / X-Off through a CAN, finish with SYN through a DLE.

constants:



SOH = 01h header for 128byte-pakets STX = 02h header for 1024byte-pakets ACK = 06h acknowledge NAK = 15h negativ acknowledge CAN = 18h cancel transfer EOT = 04h end of transmission EOF = 1Ah end of file X-On = 11h transmit on X-Off = 13h transmit off SYN = 16h syncronous idle DLE = 10h data link escape

Parameter:

< s > = SOH 128byte data STX 1024byte data < c > = Csum standard X-Modem (1byte) CRC-16 CRC-16 (2byte) < k > = NAK X-Modem with Csum 'C' CRC-16 'W' WX-Modem < n > = none present all other than WX-Modem Nr & 03h WX-Modem ° = in WX-Modem not for every frame required good for every two frames required after four frames Nr,#Nr = frame-counter begins with 01h up to FFh the loop to 00h .. FFh -> if first frame with 00h - ignore and answer ACK (Y-Modem)

Nebenbedingungen:



* if data in last frame less than paketsize the transmitter add's EOF (1Ah) to data up to frame-size * if a CAN received of ACK/NAK from the receiver or < s > from the transmitter than leave/abort the X-Modem transfer * if a received frame-number the same at the last answer ACK and ignore the frame otherwise send a NAK * if in WX-Modem and a frame-number is over next needed frame or under window-size answer NAK with the required frame-number * syncronisation: - search a < s > - if next bytes a valid frame-number ->begin of frame - if not -> search next < s > up to 135/1040bytes