Message Sequence
A message exchange is initiated when a location sends a synchronization
(SYN) sequence and an enquiry (ENQ) to another location. If the other
location can accept a message, it acknowledges (ACK) the enquiry.
Throughout the handshaking sequence, each acknowledgment is alternately
numbered one and zero. When an acknowledgment is not received by the
sender then the next one will be out of sequence and an error detected.
As shown in Figure C-2, ENQ is transmitted by the terminal to initiate
the exchange and the response is ACK 0, even positive acknowledgment.
The next step is to synchronize (SYN) the two locations. This is
obtained by transmitting two or more SYN characters, followed by the
message block.
When the computer looks at the message block it detects an error and
transmits a negative acknowledgment (NAK). The terminal then retransmits
the message block. This time it is error-free and the computer transmits
ACK 1, odd positive acknowledgment.
Synchronization is performed at the start of each message block and the
terminal sends SYN SYN followed by the message. The transmission is
error free and the computer responds with ACK 0, even positive
acknowledgment. Since the terminal has no more messages to transmit it
sends the end of transmission (EOT) character. Unless the computer has
something to transmit to the terminal, this completes the exchange and
the computer disconnects from the terminal.
The line protocol characters used in the above example represent only a
few of the BSC control characters. Table C-1 lists character mnemonics
along with their meaning and function.
_______________________________________________________________
| |
| TERMINAL COMPUTER |
| |
| SYN SYN (SYNCHRONIZE)---> |
| |
| ENQ (ENQUIRY)---> |
| |
| EVEN |
| <---ACKO POSITIVE |
| ACKNOWLEDGE|
| |
| SYN SYN (SYNCHRONOUS IDLE)---> |
| |
| TRANSMITS MESSAGE BLOCK---> |
| |
| <---NAK NEGATIVE |
| ACKNOWLEDGE |
| |
| RETRANSMITS BLOCK---> |
| |
| ODD |
| <---ACKI POSITIVE |
| ACKNOWLEDGE |
| |
| SYN SYN MESSAGE BLOCK---> |
| EVEN |
| <---ACK0 POSITIVE |
| ACKNOWLEDGE |
| |
| EOT (END OF TRANSMISSION)---> |
_______________________________________________________________
Figure C-2. BSC Handshaking Sequence
Table C-1. BSC Control Characters
-----------------------------------------------------------------------------------------------
| | | |
| Character | Meaning | Function |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| SYN | Synchronous idle | Establishes and maintains |
| | | character synchronization prior to |
| | | the message block. Also used as |
| | | time fill that maintains |
| | | synchronization in the absence of |
| | | control characters and data. |
| | | |
| STX | Start of Text | Transmitted before a block of text |
| | | characters. Also indicates the |
| | | end of a heading. |
| | | |
| ETB | End of Transmission | Indicates the end of the text |
| | | block starting with STX or SOH. |
| | | BCC is sent after ETB, requiring |
| | | the receiver to respond with ACK, |
| | | NAK, or optionally WACK or RVI. |
| | | STX or SOH is not required for |
| | | succeeding text blocks, but STX is |
| | | required if a header is followed |
| | | by text. |
| | | |
| US or ITB | End of Intermediate | Divides a message for error |
| | Transmission | checking purposes without the |
| | | turnaround required by ETB. BCC |
| | | follows ITB and resets the block |
| | | check count to zero. STX or SOH |
| | | is not required for following text |
| | | blocks, but STX is required if a |
| | | header is followed by text. |
| | | |
| ETX | End of Text | Terminates a block of characters, |
| | | begun with SOH or STX, after the |
| | | last block in a sequence of |
| | | blocks. BCC immediately follows |
| | | ETX, requiring a receiver status |
| | | reply. |
| | | |
| EOT | End of Transmission | Concludes transmission, resets all |
| | | stations to control mode (either |
| | | transmitter or receiver). Also a |
| | | nontransmit response to a poll and |
| | | an abort signal for a malfunction. |
| | | |
-----------------------------------------------------------------------------------------------
Table C-1. BSC Control Characters (continued)
-----------------------------------------------------------------------------------------------
| | | |
| Character | Meaning | Function |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| ENQ | Enquiry | Bids for the line in a |
| | | point-to-point and multipoint |
| | | connection: requests |
| | | retransmission of last |
| | | acknowledgement; or requests that |
| | | preceding block to be ignored. |
| | | Also indicates completion of poll |
| | | or selection sequence. |
| | | |
| ACK (two bytes) | Affirmative Acknowledgement | Previous block accepted and error |
| | | free, receiver ready for next |
| | | block. Also a positive response |
| | | to selection (multipoint) or line |
| | | bid (point-to-point). |
| | | |
| SOH | Start of Heading | Transmitted before the header |
| | | characters. The header characters |
| | | contain information such as the |
| | | routing and priority of the |
| | | message. |
| | | |
| NAK | Negative Acknowledgment | Previous block unacceptable and |
| | | retransmission required. Also a |
| | | negative response to a selection |
| | | or line bid. |
| | | |
| TTD (two bytes) | Temporary Text Delay | Transmitter not ready to commence |
| | | transmission but wants to maintain |
| | | connection. Sent two seconds |
| | | after message received to avoid |
| | | three second timeout. |
| | | |
| RVI (two bytes) | Reverse Interrupt | Sent to a transmitter by a |
| | | receiver in place of ACK, |
| | | indicating the receiver has a high |
| | | priority message waiting |
| | | transmission. |
| | | |
| WACK (two bytes) | Wait before Transmitting | Previous block accepted and error |
| | Positive Acknowledgment | free, but receiver not ready for |
| | | next block. Will continue to |
| | | respond with WACK until ready to |
| | | receive. Also a positive response |
| | | to a text or heading block |
| | | selection sequence (multipoint), |
| | | line bid (point-to-point) or |
| | | identification line bid sequence |
| | | (switched network). |
| | | |
-----------------------------------------------------------------------------------------------
Table C-1. BSC Control Characters (continued)
-----------------------------------------------------------------------------------------------
| | | |
| Character | Meaning | Function |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| DLE | Data Link Escape | Prefix for control characters |
| | | during transparent mode, when |
| | | control characters have no control |
| | | meaning unless prefixed by DLE. |
| | | The two character sequence ACK, |
| | | WACK, and RVI have DLE as the |
| | | first character. |
| | | |
| DLE and EOT | Disconnect Sequence for a | Transmitted on a switched line |
| | Switched Line | when all message exchanges are |
| | | complete. Can optionally be |
| | | transmitted at any time instead of |
| | | EOT to cause a disconnect. |
| | | |
| Pad | None | Added before (leading pad) a |
| | | transmission and after (trailing |
| | | pad) a transmission to ensure the |
| | | first and last characters are |
| | | properly transmitted. |
| | | |
-----------------------------------------------------------------------------------------------