10 Hostmode
to the stuffing. Stuffing means that after every byte with the value #170, a further byte
with the value #0 is inserted. (The CRC calculation is only carried out on the original
packet, not on the stuffed packet.) The packet counter concerns itself always with the
original length of the packet (without stuffing!).
Directly after the packet is received, and thus at the lowest sub-protocol level, the packet
receiver (MASTER and SLAVE) carries out a so-called Byte-de-stuffing. This removes
the #0 bytes inserted by the packet transmitter. The byte-de-stuffing begins directly after
the first byte after the recognized #170 - #170 header. After every byte with the value
#170, one byte is erased, providing it is a #0 byte. (If the following byte does not have a
value of "#0", then error handling is carried out, refer to chapter
, page
The MASTER uses a 1 bit packet-counter, using bit 7 of the CMD/INF-bytes, that is
incremented (= inverted) on sending a
new
(not repeated) packet. This packet counter
(and request flag) allows the SLAVE to positively identify repeated MASTER packets.
The slave possesses the possibility to quickly inform the Master that the last transmitted
packet should be repeated, by inserting a short request packet. The request packet has the
format: "#170#170#170#85".
10.8.3
MASTER protocol
Definition of the MASTER-condition
•
NACK-condition
- When no reaction is received from the SLAVE within 250 ms after the MASTER
transmitted packet has ended.
- This is a minimum time. The PTC-IIex answers within a few milliseconds. With
very slow TNCs the waiting time can be changed in the MASTER program.
(Note: Timeout watchdog is stopped as soon as a packet-header is received (i.e. the
packet starts being read in). The maximum useable data length of a
null-terminated
packet must not exceed 256).
- If a packet-header is identified within 250 ms, a packet is read in, and a CRC error
takes place.
- If a request-packet is identified.
•
ACK-condition
- If a data-packet with the correct CRC is received.
Reaction of the MASTER to various conditions
•
Reaction of the MASTER to an NACK condition.
- Repetition (transmit) of the buffered last packet with the request-bit unchanged.
•
Reaction of the MASTER to an ACK condition.
- A new packet can be sent to the slave, if available. The request flag is inverted
before the transmission. (Note: this packet must also be buffered in case a repetition
is requested.)
147
Summary of Contents for PTC-IIex
Page 14: ...List of Figures and Tables XII...
Page 30: ...3 Installation 16...
Page 108: ...7 Audio 94...
Page 126: ...8 FAX 112...
Page 173: ...12 SYStest 159...
Page 183: ...14 Circuit Description 169...
Page 195: ...15 Basics 181...
Page 201: ...B Technical Data 187...
Page 202: ...C Layout Appendix C 19 Layout B 1 Motherboard Figure B 1 Motherboard 188...
Page 203: ...C Layout 189...
Page 215: ...Index 202...