TransCore 05716 Manuel D’Utilisation

Page de 210
Communications Protocols
6-13
Incorrect CRC
If the host detects an incorrect CRC value in a reader message, it retransmits the com-
mand with the same sequence number. If the host detects an incorrect CRC value in an 
asynchronous reader transmission, it transmits a NAK
 
message.
Transmission Timeout
If the MPRR does not respond to a host command within a specified interval, the host 
software retransmits the command with the same sequence number.
Receive Timeout
If the host receives a
 <som> 
but does not receive a matching
 <eom> 
within a specified 
timeout interval, it discards the incomplete message and resets its receiver.
Asynchronous Message/Command Message Collision
If the host receives an asynchronous reader transmission at the same time it transmits 
a command, it ignores the asynchronous message and waits for the MPRR’s response. 
The MPRR retransmits asynchronous data after it transmits the command message.
ECP Reliability
An undetected error is defined as a message having incorrect data or status but no par-
ity or CRC errors. An error transaction is defined as a message having either a parity 
or CRC error. Laboratory testing indicates an undetected error rate of less than one 
undetected error per 1,000,000 error transactions with parity enabled.
To ensure this error rate is not exceeded, the host must enable parity and adhere 
closely to the timing specifications discussed previously in this chapter in the “Timing 
and Synchronization” section.
CRC Calculation
The CRC used by the ECP is based on a 16-bit algorithm. The algorithm, as imple-
mented, operates on eight-bit characters, for example, seven-bit ASCII character plus 
one optional parity bit. The 16-bit result is converted to four ASCII hex characters and 
is appended to messages transmitted by the MPRR.
The MPRR accepts four ASCII < ` > characters (60 hex) as a wild card CRC value in 
lieu of a valid four-character CRC value to facilitate testing and diagnostic checkout.
The MPRR implements the algorithm with a 512-byte lookup table to reduce the pro-
cessing overhead requirements. 
To simplify the implementation of the CRC algorithm by host software developers, 
several examples of the calculation are provided in C source code on the following 
pages. The calculation may be performed with or without a lookup table, depending 
on the trade-off between code memory and processing overhead.