Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
ref:zmodem [2018/03/01 12:21] – old revision restored digital man | ref:zmodem [2020/12/01 18:15] – [Frame Header] Add a frame type table digital man | ||
---|---|---|---|
Line 63: | Line 63: | ||
zmodem places no constraints on the content files. | zmodem places no constraints on the content files. | ||
+ | |||
+ | ===== FRAMING ===== | ||
+ | |||
+ | ==== ZMODEM Frame ==== | ||
+ | There 2 classes of ZMODEM Frames: | ||
+ | * Hexadecimal (HEX) frames, contain only US-ASCII characters | ||
+ | * Binary (BIN16 or BIN32) frames, contain //almost// all possible 8-bit octet values | ||
+ | |||
+ | === HEX Frame === | ||
+ | <frame header> [CR] LF [XON] | ||
+ | |||
+ | HEX frames are terminated with an ASCII linefeed character. Some ZMODEM implementations send the HEX frame terminating linefeed character with the high bit set (0x8A). Also, for some HEX frame types, the frame terminator may be followed by an XON (0x11) character (" | ||
+ | |||
+ | === Binary Frame === | ||
+ | <frame header> [[<* data subpacket> | ||
+ | | ||
+ | Binary frames may contain zero or more data subpackets (depending on the frame type). The final subpacket of a binary data frame will be of type ZCRCW or ZCRCE. | ||
+ | |||
+ | ==== Frame Header ==== | ||
+ | <frame encoding> | ||
+ | |||
+ | **Frame Encoding** (single byte): | ||
+ | |||
+ | The //Frame Encoding// is also sometimes called the "Frame Style" | ||
+ | |||
+ | ^ Frame Style ^ Value ^ Notes ^ | ||
+ | | HEX | ASCII ''' | ||
+ | | BIN16 | ASCII ''' | ||
+ | | BIN32 | ASCII ''' | ||
+ | |||
+ | Notes: | ||
+ | * All frames sent by the " | ||
+ | |||
+ | **Frame Type** (single byte): | ||
+ | |||
+ | ^ Frame Type ^ Value ^ TX((from sender))^ RX((from receiver)) ^ Data Subpkt | ||
+ | | ZRQINIT | ||
+ | | ZRINIT | ||
+ | | ZSINIT | ||
+ | | ZACK | 0x03 | Y | ||
+ | | ZFILE | 0x04 | Y | ||
+ | | ZSKIP | 0x05 | - | ||
+ | | ZNAK | 0x06 | - | ||
+ | | ZABORT | ||
+ | | ZFIN | 0x08 | Y | ||
+ | | ZRPOS | 0x09 | - | ||
+ | | ZDATA | 0x0A | Y | ||
+ | | ZEOF | 0x0B | Y | ||
+ | | ZFERROR | ||
+ | | ZCRC | 0x0D | Y | ||
+ | | ZFREECNT | ||
+ | |||
+ | **Frame Info**: Up to 15 bytes (but typically 4) of frame type-specific information.\\ | ||
+ | Note that later claims of //16// bytes of possible frame header data include the //Frame Type// byte. | ||
+ | |||
+ | **Frame Header Integrity**: | ||
+ | |||
+ | ==== Data Subpacket ==== | ||
+ | < | ||
+ | |||
+ | **ZDLE** is the ZMODEM Data-link-escape character ('' | ||
+ | |||
+ | === Data Subpacket Length === | ||
+ | |||
+ | * Data Subpackets may contain up to **1024** bytes of //data// (special octet values are transposed and escaped with //ZDLE//) | ||
+ | * The Data Subpacket Length is also sometimes referred to as the transmit "block size" | ||
+ | * The Data Subpacket Length can be dynamically adjusted by the sender during the transfer of a file, e.g. in response to errors reported by the receiver | ||
+ | * Some ZMODEM implementations (e.g. " | ||
+ | |||
+ | === Data Subpacket Types === | ||
+ | The Data Subpacket Type is encoded in a single byte. | ||
+ | |||
+ | ^ Type ^ ZACK/ZRPOS expected ^ End-of-Frame ^ Meaning | ||
+ | | ZCRCW | Yes (synchronous) | ||
+ | | ZCRCE | Only errors | ||
+ | | ZCRCQ | Yes (asynchronous) | ||
+ | | ZCRCG | Only errors | ||
+ | |||
+ | === Data Subpacket Integrity === | ||
+ | The Subpacket //data// and //type// bytes are integrity-protected by either a 16-bit or 32-bit CRC. | ||
===== LINK ESCAPE ENCODING ===== | ===== LINK ESCAPE ENCODING ===== | ||
Line 859: | Line 939: | ||
===== See Also ===== | ===== See Also ===== | ||
* [[util: | * [[util: | ||
- | * [[http:// | ||
* [[: | * [[: | ||
{{tag> | {{tag> | ||