
APPENDIX
Serial Bus Protocol
136
2.10
•
19.01.2007
First
First=1 means the HDLC frame contains the first segment of an ethernet
frame. Ethernet-Frames. For unsegmented frames always apply First=1.
3
FrameNum
HDLC frame number. Transmitter increments modulo 4 for each new HDLC
frame.
Last
Last=1 means that HDLC frame contains the last segment of an ethernet
frame. For unsegmented frames always apply Last=1.
Ctrl
The Ctrl byte has the fixed value 0x03. It identfies the UI frame type.
ETH
User data contain a ethernet frame segment.
CRC
16 bit HDLC checksum as described in RFC 1662. It is calculated over Adrr,
Ctrl and ETH fields
5.3.4.4 Transparency
The HDLC specification demands the value 0x7e never to occur as a character in a HDLC
frame, i.e. nor in user data nor in CRC, as an example. The following algorithm is applied:
The transmitter will first compile the complete HDLC frame including CRC. On the output to
the serial interface every occurance of 0x7e between flag bytes will be replaced with the
sequence 0x7d 0x5e. The same way, 0x7d is replaced by the sequence 0x7d 0x5d.
When reading data from the serial interface, the receiver will first detect frame start and
frame end from the flag bytes. In the following, each occurance of 0x7d will be removed and
the character following 0x7d will be x-or-ed with 0x20. This way 0x5d becomes 0x7d and
0x5e becomes 0x7e.
3
Segmentation currently not supported