Card reader/writer and communication method

Abstract: When a CPU (10) receives a "card read permission" command from a personal computer (20) connected to a connector (14), through a communication controller (13), the CPU (10) controls a switching controller (16) to switch interfaces through a card I/F (15), controls a non-contact card I/F (17) to send through an antenna (3) a carry signal used for non-contact card communication, then waits for a response signal from an IC card C as a non-contact card. When the CPU (10) receives a response signal from the IC card C, the CPU (10) disables a contact card I/F (18) with use of the switching controller (16), and sends the response signal which is sent from the IC card C to the personal computer (20) through the communication controller (13).

Description: The present invention relates to a card reader/writer for performing data communication of reading/writing information from/into a card, such as an IC card, and a communication method of the card reader/writer. WO 97/46964 discloses a smart card reader with dual mode reading capability. This reader includes a first circuit for reading a proximity type smart card disposed adjacent to or inserted into a card-receiving slot, and a second circuit for reading a contact type smart inserted into the slot. It is an object of the present invention to provide an improved card reader/writer capable of communicating with both a contact card and a non-contact card in order to read/write data therein, and an improved communication method of the card reader/writer. This object is achieved by the card reader/writer of claim 1 and by the communication method of claim 5. Additional developments of the present invention are recited in the sub-claims. The invention can be more fully under stood from the following detailed description when taken in conjunction with the accompanying drawings, in which: FIG. 1 is a perspective view of an IC card reader/writer according to the present invention; FIG. 2 is a block diagram showing the structure of a control system of the IC card reader/writer; FIG. 3 shows an example of a connection of the IC card reader/writer with a superior apparatus; FIG. 4 is a transition diagram for explaining the command processing by the IC card reader/writer according to an embodiment of the invention; FIG. 5 is a transition diagram for explaining the command processing by the IC card reader/writer not in accordance with the invention; and FIG. 6 is a transition diagram for explaining the command processing by the IC card reader/writer not in accordance with the invention. An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a perspective view of an IC card reader/writer 1 according to the present invention. The IC card reader/writer 1 is provided therein with a contact card insertion 2 into which a contact card is inserted and a non-contact card antenna 3 for the communication with a non-contact card. FIG. 2 is a block diagram showing the structure of a control system of the IC card reader/writer 1. The IC card reader/writer 1 has a CPU 10 for controlling the entire system of the IC card reader/writer 1, a ROM 11 for storing a control program, and a RAM 12 used for the controlling. The CPU 10 is connected to a communication controller (SIO) 13 for performing the communication with a superior apparatus (described later), and a card interface (Card I/F) 15 for performing data communication with an IC card (described later). The communication controller 13 for performing the communication with the superior apparatus is connected to a connector 14 connectable to the superior apparatus. The card I/F 15 for performing the data communication with the IC card is connected to both the non-contact card antenna 3 which is connected to the non-contact card I/F 17 for performing the communication with the non-contact IC card through a switching controller 16, and a contact card I/F 18 having a mechanical connector for inserting the contact IC card therein. FIG. 3 shows an example of a connection of the IC card reader/writer 1 to the superior apparatus. A personal computer 20 as the superior apparatus is connected to the connector 14 of the IC card reader/writer 1 via a cable 21 such as RS-232C. Next, the command processing by the IC card reader/writer 1 and the personal computer 20 as the superior apparatus having the above-mentioned constitution will be described below with reference to the transition diagram shown in FIG. 4. The following description relates to the example wherein the communication with the contact card is performed after performing the communication with the non-contact card in accordance with a command issued by the personal computer 20. In receiving a "card read permission" command from the personal computer 20 (S1), the IC card reader/writer 1 tries to perform the communication with the non-contact card, at first. In the communication process, the CPU 10 of the IC card reader/writer 1 controls the switching controller 16 via the card I/F 15 to switch the interface to the non-contact card I/F 17, and controls the non-contact card I/F 17 to send a carry signal used for the non-contact card communication through the antenna 3 to the non-contact IC card C (S2), then waits for a response signal therefrom. When the response signal is sent from the non-contact IC card C through the antenna 3 (S3), the CPU 10 disables the contact card I/F 18 with use of the switching controller 16 (S4). The CPU 10 then sends the response signal sent from the IC card C to the personal computer 20 through the communication controller 13 (S5). The CPU 10 determines that a time-out occurs when a response signal is not supplied from the non-contact IC card C after a predetermined period of time has passed after performing the steps S1 and S2 (S6). The CPU 10 then controls the switching controller 16 to switch the interface to the contact card I/F 18 through the card I/F 15, supplies electric power from the contact card I/F 18 to the contact card (S7), supplies a clock signal to the contact card (S8), and releases a reset releasing signal (RST) for releasing reset(S9). The contact card referred to in this description has a specification corresponding to that defined in ISO 7816. When the CPU 10 receives the response signal (answer to RST) from an IC card C as a contact card (S10) after releasing RST, the CPU 10 determines that the communication with the contact card has been attained, and then controls the switching controller 16 through the card I/F 15 to switch the interfaces so as to disable the interface of the non-contact card (S11), and sends the response signal (answer to RST) to the personal computer 20 through the communication controller 13 (S12). In this embodiment, the communication with the non-contact card is performed at first since the process of the communication with the non-contact card is easier to perform than that of the contact card. In order to perform the communication with the contact card, the contact card needs to be supplied with electric power. Therefore, some protection for detecting a power supply problem needs to be provided on the side of the IC card reader/writer 1. The processing of the communication with the contact card be complicated thereby. Similarly, the communication with the contact card is not performed simultaneously with the communication with the non-contact card in this embodiment. In this embodiment, the interface of the non-contact card and the interface of the contact card are switched to each other in order to reduce the manufacturing cost, and thus the communication with the contact card and that of the non-contact card cannot be attained in the same time. As described above, the switching controller 16 controls the switching of the interfaces in the present embodiment. When the communication with one of the contact card and the non-contact card is attained, the interface of another one of the contact card and the non-contact card is disabled. By disabling one of the interfaces in this manner, data can be supplied/received with reliability during the data communication between the superior apparatus and the IC card. Next, the command processing between the IC card reader/writer 1 and the personal computer 20 will be described below with reference to the transition diagram shown in FIG. 5. This description relates to the selection operation of selecting either the communication with the non-contact card or the communication with the contact card in accordance with the command issued by the personal computer 20. When the CPU 10 of the IC card reader/writer 1 receives a "(contact) card read permission" command from the personal computer 20 (S21), the CPU 10 interprets the command, controls the switching controller 16 to switch the interface to the contact card I/F 18 through the card I/F 15, supplies electric power to the contact card from the contact card I/F 18 (S22), supplies a clock signal to the contact card (S23), and releases a reset releasing signal (RST)(S24). The contact card referred to in this description corresponds to the card defined in ISO 7816. The CPU 10 determines that the communication with the contact card is attained when a response signal (answer to RST) is sent from the IC card C as a contact card after releasing the RST (S25), and controls the switching controller 16 through the card I/F 15 to disable the interface of the non-contact card (S26). The CPU 10 then sends the response signal (answer to RST) to the personal computer 20 through the communication controller 13 (S27). The personal computer 20 then performs the data communication with the IC card C through the IC card reader/writer 1 (S28, S29). When the CPU 10 of the IC card reader/writer 1 receives a "(contact) card ejection request" command from the personal computer 20 (S30), the CPU 10 interprets the command, sends a reset releasing signal to the IC card C as a contact card (S31), interrupts the clock signal (S32), and cuts the power supply (S33). The CPU 10 then ejects the IC card C from the contact card I/F 18, controls the switching controller 16 to switch the interface to the non-contact card I/F 17 through the card I/F 15 in order to enable the non-contact card I/F 17 (S34). It goes without saying that, when the CPU 10 receives the "(non-contact) card read permission" command from the personal computer 20, the CPU 10 of the IC card reader/writer sends the "carry signal used for the non-contact card communication" to the IC card C as a non-contact card, and waits for the response signal from the IC card C as a non-contact card. Next, the command processing between the IC card reader/writer 1 and the personal computer 20 will be described below with reference to the transition diagram of FIG. 6. When the IC card reader/writer 1 receives the "(non-contact) card read permission" command from the personal computer 20 (S41), the CPU 10 controls the switching controller 16 through the card I/F 15 to switch the interface to the non-contact card I/F 17, controls the non-contact card I/F 17 to send the carry signal used for the communication with the non-contact card through the antenna 3 (S42), and waits for the response signal from IC card C as a non-contact card. When the CPU 10 receives the response signal from the IC card C as a non-contact card (S43), the CPU 10 controls the switching controller 16 to switch the interface so as to disable the contact card I/F 18 (S44), and then sends the response signal sent from the IC card C as a non-contact card to the personal computer 20 through the communication controller 13 (S45). When the CPU 10 receives no response signal from the IC card C as a non-contact card after a predetermined period of time has passed after performing the steps S41 and S42, the CPU 10 determines that a time-out occurs (S46), and sends an error status to the personal computer 20 (S47). The transmission of the error status is performed also in the case where the interfaces of the contact card and the non-contact card are automatically switched in the IC card reader/writer 1. As described above, according to the embodiment of the present invention, the circuit is formed so as to be used for both the communication with the contact card and the communication with the non-contact card, and the specifications of the non-contact card I/F and the contact card I/F are set equal. Thereby, the difference between the communication with the contact card and that of the non-contact card in the control CPU is eliminated. By virtue of this feature, the control of the communication is simplified, which enables the control of the communications with both the contact and non-contact cards.

Claims: A card reader/writer (1) comprising: first means (17) for performing data communication with a non-contact card through an antenna (3); second means (18) for performing data communication with a contact card; switching means (16) for switching between the second means and the first means; and control means (10, 11) for performing data communication with the contact card or the non-contact card by using the switching means to switch to one of the first means and the second means; characterized in that : the control means (10, 11) is adapted to perform data communication with the non-contact card at first by using the first means (17) when the control means receive a card read permission signal, and when the data communication with the non-contact card fails to be performed by using the first means, the control means is adapted to perform data communication with the contact card by using the second means (18). The card reader/writer (1) according to claim 1, wherein the control means (10, 11) further comprise: communication control means (10, 11) for switching from the first means (17) to the second means (18) by using the switching means (16) when data communication with the non-contact card fails, thereby permitting the communication with the contact card, and for communicating with the contact card; disabling means (10, 11) for disabling the first means to perform data communication with the non-contact card when the communication control means has attained the communication with the contact card. A card reader/writer (1) according to claim 1 or 2, wherein the card reader/writer is connected to an external apparatus (20) and the control means (10, 11) is adapted to control the switching means (16) to switch to the first means when the card reader/writer receives the card read permission signal from the external apparatus. A card reader/writer (1) according to claim 2 or claim 3 when dependent on claim 2, wherein: the control means (10, 11) is adapted to determine whether or not the non-contact card has sent a first response signal after sending a first driving signal to the non-contact card through the first means (17); and the disabling means (10, 11) is adapted to disable the second means (18) when the control means determine that the non-contact card has sent the first response signal; and further comprising: second control means (10, 11) for, when the control means determine that the non-contact card has sent no first response signal, determining after a second driving signal is sent to the contact card through the second means whether or not the contact card has sent a second response signal; and second disabling means (10, 11) for, when the second control means determine that the contact card has sent the second response signal, disabling the first means. A communication method of a card reader/writer (1), comprising: performing data communication with one of a non-contact card and a contact card by switching between first means (17) for performing data communication with the non-contact card through an antenna (3) and second means (18) for performing data communication with the contact card; characterized in that : the data communication is performed with the non-contact card at first by using the first means (17) when the card reader/writer receives a card read permission signal, and when the data communication with the non-contact card fails to be performed by using the first means (17) after a predetermined period of time has passed, the data communication is performed with the contact card by switching from the first means (17) to the second means (18). The communication method of the card reader/writer (1) according to claim 5, wherein: when the card reader/writer receives the card read permission signal, the card reader/writer switches to the first means (17) to perform the data communication with the non-contact card, when the data communication with the non-contact card is performed by the first means (17), the second means (18) is disabled to perform the data communication with contact card, and when the first means (17) finish the data communication with the non-contact card, the disabling of the second means (18) to perform the data communication with the contact card is released.

Inventors: KAWAGISHI TOSHIYUKI, KAWAGISHI, TOSHIYUKI
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1999
Main classification: G06K7
IPC codes: G06K17, G06K7