After the supply voltage, clock signal and reset signal have been applied, the smart card sends an Answer to Reset (ATR) via the I/O lead. This data string, which contains at most 33 bytes, is always sent with a divider value (clock rate conversion factor) of 372 in compliance with the ISO/IEC 7816-3 standard. It contains various parameters related to the transmission protocol and the card. This divider value should be used even if the transmission protocol used after the ATR employs a different divider value (e.g. 64). This ensures that an ATR from any card can always be received, regardless of the parameters of the transmission protocol ultimately used. It is very rare for an ATR to have the maximum allowable length. It most often consists of only a few bytes. Particularly in applications where the card should be usable very quickly after the activation sequence, the ATR should be short. A typical example is paying a road toll using a smart card electronic purse. Even if the vehicle passes through the toll gate quickly, it must be possible to reliably debit the card in the short time available. The start of the ATR transmission must occur between 400 and 40,000 clock cycles after the terminal issues the reset signal. With a clock rate of 3.5712 MHz, this corresponds to an interval of 112 μs to 11.20 ms, while at 4.9152 MHz the interval is 81.38 μs to 8.14 ms.6 If the terminal does not receive the start of the ATR within this interval, it repeats the activation sequence several times (usually up to three times) to try to detect anATR. If all of these attempts fail, the terminal assumes that the card is faulty and reacts accordingly. During the ATR, the time between the leading edges of two successive bytes may be up to 9600 etu according to ISO/IEC 7816-3. This period is designated the ‘initial waiting time’, and it is exactly one second at a clock rate of 3.5712 MHz. This means that the standard permits a one-second delay between the individual bytes of the ATR when it is sent to the terminal. In some smart card operating systems, this time is utilized for internal computations and EEPROM write accesses. The internal write buffer for atomic operations is often flushed at the same time. The data string and data elements of the ATR are defined and described in detail in the ISO/IEC 7816-3 standard. The basic ATR format is described in Figure 6.11 and Table 6.1. The first two bytes, designated TS and T0, define several fundamental transmission parameters and indicate the presence of subsequent bytes. The interface characters specify special transmission parameters for the protocol, which are important for the following data transmissions. The historical characters describe the extent of the smart card’s basic functions. The check character, which is a checksum of the previous bytes, may optionally be sent as the last byte of the ATR, depending on the transmission protocol used.

ATR characters
The initial character
This byte, designated ‘TS’, specifies the convention used for all the data in the ATR and subsequent communications processes. In addition, the TS byte contains a characteristic bit pattern that can be used by the terminal to determine the value of the divider. For this purpose, the terminal can measure the time between the first two falling edges in TS and divide it by three. The result is the duration of one etu. However, since the divider is fixed at 372 for the ATR, the terminal does not normally evaluate this synchronization pattern. The first byte is a mandatory part of the ATR and must always be sent. Only two codes are allowed for this byte: ’3B’for the direct convention and’3F’for the inverse convention. The direct convention is normally used in Germany, but the inverse convention is normally used in France. The convention does not affect the security of the transmission. Of course, every operating system producer prefers one or the other for historical reasons, but all terminals and many smart cards support both conventions.

The format character
The second byte, T0, contains a bit field that indicates which interface characters follow it in theATR. It also indicates the number of historical characters following the interface characters. Like TS, this byte must be present in every ATR.

The interface characters
The interface characters specify all of the transmission parameters for the current protocol. They consist of the TAi, TBi, TCi and TDi bytes. However, these bytes are optional in the ATR, and they may be omitted as appropriate. Since default values are defined for all of the parameters of the transmission protocol, interface characters are often not required in the ATR for a normal communications process. The interface characters can be classified into global interface characters and specific interface characters. The global interface characters specify basic parameters for the transmission protocol, such as the divider, that apply to all subsequent protocols. The specific interface characters specify parameters for a particular transmission protocol. The ‘work waiting time’ for T = 0 is a typical example of such a parameter. In principle, the global interface characters apply to all protocols, but for historical reasons (since originally only the T = 0 protocol was defined in the ISO standards), several of these characters are only relevant to the T = 0 protocol. If T = 0 is not used, they can be omitted, in which case the preset values apply. Each TDi byte is only used to provide links to subsequent interface characters. For this purpose, the upper nibble of each TDi byte contains a bit pattern indicating which of the TA(i+1), TB(i+1), TC(i+1) and TD(i+1) interface characters followit, using the same coding as for the T0 format character. The lower nibble of each TDi byte identifies the available transmission protocol in each case. A TDi byte must always be sent if any subsequent interface characters are to be sent. The other interface characters (TAi, TBi and TCi), which are not used for linking, define the available transmission protocol(s). Their meanings according to the ISO/IEC 7816-3 standard are described below.

The global interface character TA1
The parameter FI in the upper nibble encodes the divider (clock rate conversion factor) F. The parameter DI in the lower nibble encodes the bit rate adjustment factor D. The bit rate adjustment factor (D) and the clock rate conversion factor (F) allow the transmission rate to be modified and adapted to individual circumstances. The frequency of the applied clock (in units of Hertz) is shown in the above formulas as f . The value of the maximum allowable clock frequency is given by fmax. The standard value for fmax is 5 MHz.

The global interface character TA(i)
The value of TA(i) is always interpreted as XI || UI if i > 2 and T = 15 =’F'in TD(i–1). In this case, TA(i) contains the clock stop indicator XI, which indicates the logical state the clock line must assume when the clock is stopped, and the class indicator UI, which specifies the supply voltage class.

The global interface character TB1
Bits b7 and b6 of TB1 encode a programming voltage factor called ‘II’. Bits b5–b1 define the parameter ‘PI1’. The most significant bit, b8, is always set to 0, which effectively means that it is not used. These parameters were needed for the first generation of smart cards, since they used EPROM for data storage instead of EEPROM, which is currently standard. The necessary high voltages and currents for EPROM programming had to be provided by the terminal via the Vpp contact. However, since smart cards without internal charge pumps no longer exist, the specific coding of this byte can be ignored. Parameters PI1 and II thus always have the value 0, which indicates that no external programming voltage is needed. If the TB1 parameter is omitted in the ATR, the default Vpp value of 5 V at 50 mA applies, as specified in the standard.

The global interface character TC1
TC1 encodes an extra guard time, designated N, as an unsigned hexadecimal integer. This extra guard time is defined as an extension to the duration of the stop bit. The value N indicates how many additional etu’s are to be added to the guard time. TC1 is interpreted linearly except for N =’FF’, which has a special meaning. With the T = 1 protocol, the normal guard time of 2 etu is changed to 1 etu if N =’FF’. With the T = 0 protocol, the standard guard time of 2 etu is retained in this case, to allow an error to be indicated by a low level within the guard time interval. In practice, reducing the guard time to 11 etu with the T = 1 protocol increases the effective data transmission rate by nearly 10 percent, since only 11 bits have to be sent for each character instead of 12.

The global interface character TB2
TB2 contains the value of PI2. This parameter specifies the external programming voltage in tenths of a volt. It is normally no longer used in the ATR, for the same reason as TB1.

Specific interface character for the T = 0 transmission protocol
The specific interface character TC2
TC2 is the final parameter for the T = 0 protocol. It contains the parameter WI, which encodes the ‘work waiting time’. This is the maximum interval between the leading edges of two consecutive bytes:
work waiting time = (960·D·WI) work etu
If the TC2 parameter is not present in the ATR, the default value of the work waiting time is used (WI = 10).

Specific interface characters for the T = 1 transmission protocol
The following additional bytes are defined for the T = 1 transmission protocol in accordance with ISO/IEC 7816-3. In this case, the interface characters prescribed for T = 0 are used only as necessary. For this protocol, the parameter index i must always be greater than 2. The specific interface characters TAi, TBi and TCi (i >2) always apply to the transmission protocol specified in TD(i – 1).

Specific interface character TAi (i > 2)
The TAi byte contains the maximum length of the information field that can be received by the card (IFSC). This value must be in the range of 1 through 254. The default value of IFSC is 32 bytes. Since the standard that defines theATRparameters does not specify all possible transmission protocol parameters in terms of interface characters, specific implementations may use a variety of supplementary interface characters. A typical example is provided by the German national T = 14 protocol. Several additional ATR bytes are defined for this protocol to meet its specific needs. These can be decoded only by users of this protocol, since only they knowthe applicable specification. This is not standardized, nor is it made known outside of the applications that use it. Global interface character TA2 his byte indicates the allowed modes for the PPS. This is explained in more detail in Section 6.4, which describes the PPS.

The historical characters
For a long time, the historical characters were not defined by any standard. As a result, they contain a wide variety of information, depending on the producer of the operating system. Many companies use the available bytes to identify the operating system and the associated version number of the ROM mask. This is usually encoded in ASCII, so it is easy to interpret. Historical characters are not required to be present in the ATR, so they may be entirely omitted. In some situations, this can be beneficial, since it makes the ATR shorter and thus quicker to send. The ISO/IEC 7816-4 standard provides for an ATR file in addition to the historical characters. This file, with the reserved FID’2F01′, contains additional data for the ATR. It is intended to be an extension to the historical characters, which are limited to 15 bytes. The content of this file, whose structure is not defined by the standard, is ASN.1-coded. The parameters in theATR file or the historical characters may contain complex information relating to the smart card and the operating system used in the card. For example, they can indicate which file selection and implicit selection functions are supported by the smart card and provide information about the logical channel mechanism. They can also hold additional information about the card issuer, the card and chip serial numbers, the ROM mask version, the chip and the operating system. The coding of the relevant data objects is defined in the ISO/IEC 7816-4 and 7816-5 standards. According to ISO/IEC 7816-4, the historical characters can contain the following three data fields: an obligatory category indicator, one or more optional data blocks in compact TLV format and an optional status indicator. The compact TLV format has a tag in the first nibble and the length of the following data in the second nibble. The category indicator is transferred in T1. It contains information about the structure of the data in the ATR. The data following the category indicator include information about the services supported by the smart card operating system and the operating system functions. The most important of these items are described in Tables 6.19 through 6.22. The status indicator indicates the life-cycle stage of the smart card.

The check character
This last byte in the ATR is the check character (TCK), which contains the XOR checksum of the bytes from T0 through the last byte before the check character. This checksum can be used in addition to parity testing to verify the correctness of the ATR transmission. However, despite the apparent simplicity of the structure and computation of this checksum, there are several significant differences among various transmission protocols. If only the T = 0 transmission protocol is indicated in the ATR, no checksum is allowed to not be present at the end of the ATR. In this case, it is not sent at all, since bytewise error detection using parity checking and retransmission of erroneous bytes is mandatory in the T = 0 protocol. By contrast, a TCK byte must be present in the T = 1 protocol. The checksum is then computed starting with byte T0 and ending with the final interface character, or with the final historical character if historical characters are present.