# Marriott Troubleshooting Guide

## Physical Communication Link

The interface shall be asynchronous and shall use an EIA RS-232 connection. The PMS will support transmit data, receive data, signal ground, and data terminal ready. The vendor must support transmit data, receive data, and signal ground.

Each data character shall contain 11 bits in the format consisting of:

- 1 start bit

- 7 data bits

- 1 even parity bit

- 2 stop bits

The possible serial asynchronous communication bit rates are 110, 300, 600, 1200, 2400, 4800, and 9600 bits per second. The preferred bit rate is 1200 bits per second or lower. The actual rate shall be defined by the application that implements this specification.

## Data Link Control

The function of this communication specification is to effect the orderly transfer of data from one system to another. The data messages are comprised of text and data-link control characters. Data-link control characters are required in each message to act as delimiters and to control the transmission.

## Transmission Codes

The data is transferred as binary-coded characters as defined by the ASCII character set.

## Data Link Control Characters

All hexadecimal representations of the control characters are in a 7 bit ASCII format and do not contain any parity bits.

Data Link Control Characters
All hexadecimal representations of the control characters are in a 7 bit ASCII format and do not contain any parity bits.
ENQ | A 0516 is the enquiry character. An ENQ is used to bid for the link when using a point-to-point link connection.
ACK0 | A 1016 0616 is the ready sequence. An ACK0 shall be sent in response to an ENQ to indicate the communication link is established and the receiving station is ready to receive a data block.
ACK1 | A 1016 0816 is the acknowledge sequence. An ACK1 shall be sent in response to a data block transfer indicating successful reception of the data.
NAK | A 1516 is the negative acknowledge character. A NAK shall be sent in response to an ENQ to indicate the receiving station is not ready to receive a data block. A NAK shall also be sent in response to a data block transfer, indicating unsuccessful reception of the data block (parity error, block check error, message framing error) and requests the data block be retransmitted.
STX | A 0216 is the start of text character. A STX is the first character in a data block. All data blocks must begin with an STX. The STX also triggers the start of the block check calculation. The STX character is followed immediately by the message text.
ETX | A 0316 is the end of text character. An ETX is the last character in a data block. Each data block transfer must terminate with an ETX (followed by the BCC). The ETX triggers the end of the block check calculation. The ETX character is followed immediately by the block check character (BCC).
EOT | A 0416 is the end of transmission character. An EOT is used to signify the termination of a data message transmission. When this code is received, the communication link has been released by the controlling station.

## Operation of the Data Link

The data link shall be designed to operate in a half duplex point-to-point mode. For half duplex operations, a contention situations exists, whereby both stations can attempt to use the communication link simultaneously. To account for this possibility, a station bids for the link using the ENQ (enquiry) control character. The ENQ sequence provides a clear and concise means for requesting control of the link, while leaving a maximum amount of time to monitor the link for bids by the other station. Once a station gains control (this station shall be known as the controlling station and the other station shall be known as the receiving station) of the link, message transmission can start.

To avoid the problem of simultaneous transmission requests, each station shall be assigned a priority, primary and secondary. If simultaneous bidding occurs, the primary station shall continue to bid the link until the secondary station responds or until the retry limit is reached. If the primary stations receives an ENQ and it has not initiated a request for the link, then it replies with an ACK0 if it is ready to receive, or a NAK if not. Thus the secondary station can gain control of the communication link for transmission only when the link is left free by the primary station. The vendor shall be considered the primary station, while the PMS shall be secondary.

Message transmission is terminated and the link is returned to the idle state upon transmission of an EOT by the controlling station. Once the controlling station transmits an EOT to release control of the link, it must wait a minimum of the T1 value before transmitting an ENQ to attempt to regain control of the link. This method gives each station a fair opportunity to obtain control of the link.

## Timeout Timers

Since timing is very critical when competing for control of the line, several timers have been defined. The actual value of the timers shall be defined by the application that implements this specification. These timers are defined as:

T1 | This timeout value represents the time interval the previous controlling station must wait before attempting to regain control of the
T2 | This timeout value represents the time interval the station attempting to gain control must wait for a response. (After sending ENQ, the time to wait for an ACK0 or NAK response). The receiving station must respond within this interval, or a timeout condition will exist.
T3 | This timeout value represents the time interval the controlling station must wait for a response to a data block. (After sending STX (text data) ETX BCC, the time to wait for an ACK1 or NAK response). The receiving station must respond within this interval, or a timeout condition will exist.
T4 | This timeout value represents the time interval the receiving station must wait for a data block from the controlling station. (After sending ACK0 to an ENQ, the time to wait for STX (text data) ETX BCC). The controlling station must transmit the data block within this interval, or the line is assumed to be in an uncontrolled
T5 | This timeout value represents the time interval the receiving station must wait for the controlling station to release control of the line or resend the data block. (After sending ACK1 or NAK to a data block, the time to wait for EOT or the retransmission of the data block, respectively). The controlling station must release control or resend the data block within this interval, or the line is assumed to be uncontrolled.
T6 | This timeout value represents the time interval the station attempting to gain control delays after being denied control of the line. (The time to delay after receiving a NAK response to an ENQ).

## Text Data

Text data is transmitted in complete units called data blocks. A data block is initiated by a start of text (STX) character, and concluded by an end of text (ETX) character. Text data is defined as all characters that occur in a data block between, the STX and the ETX. Text data shall be limited to the ASCII characters between 2016 and 5A16 inclusive.

The content of the text data shall be defined by the particular application that implements this specification.

## Error Detection

Each data block is checked for accuracy by the receiving station. This specification defines two types of error detection that will be used to verify data blocks.

## Parity

Parity checking (also referred to as a vertical redundancy checking) allows individual characters to be validated. When using the 7-bit ASCII character set, an 8th bit can be used as a parity bit. The 8th bit will be defined as the parity bit, using an even parity scheme. For even parity, the parity bit is set a "1" or "0" so the resulting 8 bit character will have an even number of "1" bits in it.

## Block Check Character (BCC)

The block check character (also called a longitudinal redundancy check) is a verification of the total data block. The BCC is accumulated at both the transmitting and receiving stations during the transmission of a data block. This BCC is transmitted immediately following the end of text (ETX) character. The receiving station compares the transmitted BCC with the calculated BCC and determines whether or not the data block was received free of errors.

The BCC is calculated by starting with a zero value and performing an exclusive or operation on each character in the data block beginning with the character immediately following the STX character and ending with, and including, the ETX character. As an example, the transmission STX+A+B+C+ETX would have a BCC of 4316 (not including parity). This would be the result of A XOR B XOR C XOR ETX. In hexadecimal, this would be represented as 4116 XOR 4216 XOR 4316 XOR 0316.

## Line Control Protocol

The line control protocol is designed to give maximum flexibility in the transmission of data between the stations. This protocol is patterned after standard binary synchronous interface protocols. Each control sequence has one or more expected response sequences. The following descriptions identify those expected sequences.

ENQ: A station wishing to transfer a data block transmits an ENQ to gain control of the line. The station attempting to gain control should wait the T2 interval for a response. An ENQ control sequence has one of the following allowed responses:

ACK0: An ACK0 indicates the receiving station is ready to receive the data message at this time. The controlling station must begin transmission of the data block within the T4 interval. If the receiving station does not receive the transmission within the T4 interval, it should assume the line is in an uncontrolled state.

NAK: A NAK indicates the receiving station is not ready to receive the message at this time. The transmitting station should retry the ENQ procedure after a T2 interval delay.

STX (text data) ETX BCC: After a station has successfully obtained control of the line, it must transmit the data block within the T4 interval. After transmitting the data block, the controlling station should expect one of the following responses within the T3 interval:

ACK1: An ACK1 indicates the data was received correctly. Within the T5 interval, the controlling station shall transmit an EOT to release control of the line.

NAK: A NAK indicates the data was not received correctly. Within the T5 interval, the controlling station shall retransmit the data block a maximum of three times before aborting the transfer by sending EOT to release control of the line. The protocol will resume at the line contention level (ENQ).

## Protocol Examples

The following diagrams provide examples of how the PMS and vendor should use the protocol for data block transfer.

Normal delivery of data blocks

(line has been idle for at least T1)

ENQ ----------------------->

(expect response within T2)

<----------------------- ACK0

(expect data block to begin within T4)

STX (text data) ETX BCC --->

(expect response within T3)

<----------------------- ACK1

(expect line release within T5)

EOT ----------------------->

(OK to ENQ immediately)

<----------------------- ENQ

.

.

.

The receiving station is ready to accept data and acknowledges the bid for the line and prepares to receive a data block. Upon receiving the data block and determining it is valid data, the receiving station acknowledges the data block. The controlling station then releases control of the line by transmitting the EOT. At that time, the line is considered uncontrolled and either station may attempt to gain control. However, the station that just released the line must wait the T interval before attempting to regain control.

Receiving station is busy

(line has been idle for at least T1)

ENQ ----------------------->

(expect response within T2)

(receiver not ready)

<----------------------- NAK

(must wait T6 before another attempt)

ENQ ----------------------->

In this case, even though the receiving station is busy and cannot accept a data block at this time, it responds to the ENQ from the station attempting to gain control of the communication line. The station attempting to control the line should retransmit the ENQ after waiting the T6 interval. This process should continue until the receiving station gives permission to transmit the data message by responding with an ACK0.

No response from the receiving station

(line has been idle for at least T1)

ENQ ----------------------->

(expect response within T2)

(nothing from receiver)

(ENQ after T2)

ENQ ----------------------->

(expect response within T2)

(nothing from receiver)

(ENQ after T2)

ENQ ----------------------->

(expect response within T2)

.

.

.

This condition most likely indicates either the receiving station is down (power off or in an off-line mode) or the communication line is down (communication hardware or cable problem). The station attempting to control the line should continue to retransmit the ENQ after the T2 interval has elapsed.

Negative response to a data block transfer

(line has been idle for at least T1)

ENQ ----------------------->

(expect response within T2)

<----------------------- ACK0

(expect data block to begin within T4)

STX (text data) ETX BCC --->

(expect response within T3)

(receiver detects error)

<----------------------- NAK

(expect data block to begin within T5)

STX (text data) ETX BCC --->

(all is good this time)

<----------------------- ACK1

(expect EOT within T5)

EOT ----------------------->

In this example, the receiving station detects a receive error in the data block. The receiving stations NAK's the data block, and the controlling station sends the data block again. The receiving station then detects no error, and the data transfer continues in a normal fashion.

Continued negative responses to a data block

transfer

(line has been idle for at least T1)

ENQ ----------------------->

(expect response within T2)

<----------------------- ACK0

(expect data block to begin within T4)

(initial try)

STX (text data) ETX BCC --->

(expect response within T3)

(receiver detects error)

<----------------------- NAK

(expect data block to begin within T5)

(1st retry)

STX (text data) ETX BCC --->

(expect response within T3)

(receiver detects error)

<----------------------- NAK

(expect data block to begin within T5)

(2nd retry)

STX (text data) ETX BCC --->

(expect response within T3)

(receiver detects error)

<----------------------- NAK

(expect data block to begin within T5)

(3rd retry)

STX (text data) ETX BCC --->

(expect response within T3)

(receiver detects error)

<----------------------- NAK

(expect data block to begin within T5)

(sender gives up)

EOT ----------------------->

In this example, the receiving stations detects an error in each successive attempt to transmit the data block. After the controlling station retries to send the message three times, it gives up, issuing an EOT to inform the receiving station that the control of the communication line is released.

No response to a data block transfer

(line has been idle for at least T1)

ENQ ----------------------->

(expect response within T2)

<----------------------- ACK0

(expect data block to begin within T4)

STX (text data) ETX BCC --->

(expect response within T3)

(nothing from receiver)

(release control)

EOT ----------------------->

(wait for T1)

ENQ ----------------------->

.

.

.

In the event of no response to the data block, the controlling station shall terminate the transfer by releasing control of the data link. The transfer should begin again from the line contention level (ENQ).

No data block transferred

(line has been idle for at least T1)

ENQ ----------------------->

(expect response within T2)

<----------------------- ACK0

(expect data block to begin within T4)

(nothing from sender)

If the station in control does not transmit the data block after receiving the ACK0, the line is assumed to be in an uncontrolled state, and data transfer must be restarted at the line contention level (ENQ).

No release of line control

(line has been idle for at least T1)

ENQ ----------------------->

(expect response within T2)

<----------------------- ACK

(expect data block to begin within T4)

STX (text data) ETX BCC --->

(expect response within T3)

<----------------------- ACK

(expect line release within T5)

(nothing from sender)

If the station in control does not release the line (transmit EOT), the transfer is complete and the line is assumed to be in an uncontrolled state.