[go: up one dir, main page]

HK1089841B - Communication apparatus, communication method - Google Patents

Communication apparatus, communication method Download PDF

Info

Publication number
HK1089841B
HK1089841B HK06110240.1A HK06110240A HK1089841B HK 1089841 B HK1089841 B HK 1089841B HK 06110240 A HK06110240 A HK 06110240A HK 1089841 B HK1089841 B HK 1089841B
Authority
HK
Hong Kong
Prior art keywords
packet
command
reader
writer
timeout period
Prior art date
Application number
HK06110240.1A
Other languages
Chinese (zh)
Other versions
HK1089841A1 (en
Inventor
山下胜也
坂本和之
Original Assignee
索尼株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from JP2005023433A external-priority patent/JP4337051B2/en
Application filed by 索尼株式会社 filed Critical 索尼株式会社
Publication of HK1089841A1 publication Critical patent/HK1089841A1/en
Publication of HK1089841B publication Critical patent/HK1089841B/en

Links

Description

Communication apparatus, communication method, and program
Cross Reference to Related Applications
The present invention comprises subject matter relating to Japanese patent application JP2005-023433 filed on.31.2005 to the present patent office and the entire content of which is incorporated herein by reference.
Technical Field
The invention relates to a communication apparatus, a communication method, and a program. In particular, the present invention relates to a communication apparatus, a communication method, and a program that enable a reader/writer that performs non-contact communication with an IC (integrated circuit) card to easily communicate with the IC card even in the event of interference between the reader/writer and another reader/writer.
Background
In recent years, a noncontact IC card system in which an IC card and a reader/writer communicate with each other in a noncontact manner by means of electromagnetic waves has rapidly gained popularity.
In the non-contact IC card system, the reader/writer outputs electromagnetic waves. When the portable IC card passes through the reader/writer, the IC card operates by taking energy from mutual induction caused by electromagnetic waves output from the reader/writer, and starts communication with the reader/writer. The reader/writer transmits data to the IC card by modulating electromagnetic waves output therefrom. On the other hand, the IC card transmits data to the reader/writer by modulating an unmodulated electromagnetic wave output from the reader/writer by so-called load modulation.
As described above, in the non-contact IC card system, the IC card and the reader/writer communicate with each other in a non-contact manner. Such a system is very convenient and is now widely used for automatic ticket gates at stations, for example.
The automatic ticket gate needs to handle the entrance/exit of a large number of persons in a short time, and thus needs to have many readers/writers. However, a reader/writer serving as an automatic ticket gate is placed in a limited space at a station doorway. If many readers/writers are placed, these readers/writers tend to be very close to each other.
In the case where the readers/writers are close to each other, if the readers/writers use carrier waves of the same frequency, electromagnetic waves output from the readers/writers cause mutual interference, so that the readers/writers cannot communicate with an IC card carrying the reader/writer therethrough.
Fig. 1 shows a state in which a plurality of readers/writers cause disturbance.
In fig. 1, the IC card C is carried through the reader/writer a, and thus the reader/writer a should communicate only with the IC card C.
However, if there is another reader/writer B close to the reader/writer a as shown in fig. 1, the electromagnetic wave output from the reader/writer a and the electromagnetic wave output from the reader/writer B cause mutual interference, and therefore, the reader/writer a receives the electromagnetic wave causing mutual interference, thereby performing load modulation as the IC card C. Therefore, the communication between the reader/writer a and the IC card C will be disturbed.
In order to prevent the communication between the reader/writer a and the IC card C from being disturbed by such interference, the first method has been proposed. In the first method, the readers/writers a and B are disposed at a predetermined distance apart so that electromagnetic waves output therefrom do not cause mutual interference.
However, in the first method, the number of readers/writers that can be placed at the inlet and outlet will be reduced. It is difficult to cope with the entrance/exit of a large number of persons in a short time.
There have also been proposed several methods, of which the second method is to provide a disturbance detection unit for detecting disturbance in the reader/writer so as not to perform data communication when the disturbance is caused (for example, see patent document 1: japanese unexamined patent application publication 10-293824); a third method is to invert the phase of the radiation field between adjacent readers/writers (for example, see patent document 2: japanese unexamined patent application publication No. 11-345294); the fourth method is to provide a function of changing the carrier frequency in the reader/writer (see, for example, japanese unexamined patent application publication 2000-20651).
However, in the second method, a hardware device serving as a disturbance detection unit needs to be provided in the reader/writer, which increases the cost of the reader/writer.
In a third method of phase-inverting the radiation field between adjacent readers/writers, a hardware device for phase-inverting needs to be provided. Further, in the third method, the setter needs to set the reader/writer by devising the set position of the reader/writer so as to satisfy the set condition that the radiation fields in adjacent readers/writers are absolutely inverted, which is very inconvenient.
In the fourth method, the setter of the reader/writer needs to manage the carrier frequency of the reader/writer. Particularly, when a reader/writer is added or a position of the reader/writer is changed, a great burden is imposed on a setter.
In addition, a fifth method is also proposed. In the fifth method, if a reception error occurs, that is, if the reader/writer cannot receive a correct response packet from the IC card, the reader/writer retransmits a command packet to the IC card (retries transmission of the command packet).
More specifically, the packet is transmitted/received by means of noncontact communication between a reader/writer constituting a noncontact IC card system and an IC card. The reader/writer transmits a command packet, which is a packet containing command information for executing predetermined processing, to the IC card. The IC card transmits a response packet, which is a packet containing a response to the command packet from the reader/writer, to the reader/writer.
In the fifth method, the reader/writer transmits a command packet, waits and receives a packet (response packet), and checks whether the packet has an error. If the packet received by the reader/writer has an error, the reader/writer immediately retransmits the command packet. Thereafter, the reader/writer repeatedly performs packet (response packet) reception, packet error check, and command packet retransmission until a correct response is received from the IC card.
The fifth method is effective for interference caused in the following case. For example, there is one IC card near an IC card carried past the reader/writer. In this case, both the IC cards react to the command packet transmitted by the reader/writer, and both transmit a response packet to the command packet, which causes interference.
However, when interference is caused between two readers a and B close to each other as described above with reference to fig. 1, it is not always possible to improve the performance of communication between the reader a and the IC card C carrying the passing reader by means of the fifth method of retransmitting the command packet. On the contrary, the communication performance may be degraded.
Fig. 2 and 3 show operations of the readers a and B and the IC card C performed when the IC card C is carried past the reader a of the two readers a and B close to each other.
Referring to fig. 2, the reader/writer a transmits a command packet P in step S1A1The packet has a command code of 0x10 ("0 x" indicates that the character (string) followed by it is a hexadecimal number). Then, the process proceeds to step S2, where the reader/writer a enters a reception wait state to wait for reception of the command packet PA1The response packet of (2).
Each packet transmitted/received between the reader/writer a or B and the IC card C contains a command code or a response code indicating the packet type. The command code or response code indicates that the packet is a command packet or a response packet.
In FIG. 2, the reader/writer A transmits a command packet P having a command code 0x10 in step S1A1. For example, assuming that the response code of the response packet to the command packet having the command code 0x10 is 0x11, the reader/writer a waits for receiving one packet (response packet) having the response code 0x11 in the reception wait state at step S2.
On the other hand, in step S11, the IC card C receives the command packet P having the command code 0x10 transmitted from the reader/writer AA1And starts to group P according to the commandA1To perform the processing. When a command packet P according to the command from the reader/writer A is executedA1After the processing of (2), the IC card C groups the command PA1In response, a response packet with a response code of 0x11 is transmitted.
On the other hand, the reader/writer B performs polling to detect that one IC card passes (i.e., detects that an IC card exists at a nearby position). Specifically, the reader/writer B periodically transmits a command packet having a command code of 0x 80.
In FIG. 2, in step S21, the reader/writer B transmits a command packet P having a command code of 0x80B1. Further, the reader/writer B periodically transmits a command packet having a command code 0x 80.
When the reader/writer B is atTransmitting packet P in step S21B1At this time, the reader/writer A is in the reception waiting state in step S2, and thus the packet P from the reader/writer B is received in step S3B1
However, the packet P from the reader/writer BB1Is a command packet with a command code of 0x80, not for a command packet P to be receivedA1I.e., it is not a packet with a response code of 0x 11. Thus, the reader/writer a determines the packet P received in step S3B1There is an error, and the command packet is retransmitted in step S4. In other words, the reader/writer A transmits a command packet P having a command code of 0x10A2
In this case, while the reader/writer A retransmits the command packet having the command code 0x10, if the IC card C transmits a packet P for the command packetA1Then the reader/writer a will not receive the response packet from the IC card C.
The packet transmitted between the reader/writer and the IC card constituting the noncontact IC card system may include a serial ID (identification). The serial ID is a value that is incremented one by authorized readers/writers and IC cards in order to prevent so-called masquerading (masquerading) in which an unauthorized reader/writer or IC card interrupts communication performed by the authorized reader/writer and IC card and masquerades as an authorized reader/writer or IC card.
Fig. 3 shows operations performed by the readers a and B and the IC card C in the case where a packet containing a serial ID is transmitted between the reader a or B and the IC card.
In step S31, as in the case shown in FIG. 1, the reader/writer A transmits a packet (command packet) P having a sequence ID11A1And enters a reception waiting state to wait for reception of the command packet PA1The response packet of (2).
At step S41, the IC card C carrying the passed reader/writer a receives the packet P from the reader/writer aA1And is andbegin in accordance with packet PA1To perform the processing.
On the other hand, the reader/writer B performs polling as in fig. 2. In fig. 3, the reader/writer B transmits a packet (command packet) P in step S51B
When the reader/writer B transfers the packet P in step S51BAt this time, the reader/writer a is in a reception wait state. Then, in step S32, the reader/writer a receives the packet P from the reader/writer BB
Packet P from reader/writer BBIs a command packet other than the command packet P to be received by the reader/writer aA1The response packet of (2).
Therefore, as in fig. 2, the reader/writer a determines the packet P received in step S32BThere is an error, and one packet (command packet) is retransmitted in step S33. That is, the reader/writer A transfers the packet PA2This is taken as packet PA1Is retransmitted.
At this time, the reader/writer a adds 1 to the sequence ID. In particular, due to the previously transmitted packet PA1Is 11, so packet P will beA2Is set to 12.
In step S42, the IC card C receives the packet P from the reader/writer aA2
The IC card C completes the grouping P containing the serial ID11 received in step S41A1After the processing of (4), the IC card C responds to the packet P in step S43A1Transmitting a packet PC
Packet PCIs for a packet P from reader/writer a containing sequence ID11A1The response packet of (2). Thus, the IC card C will group PCAdds 1 to the sequence ID of (2) to make it 12.
In step S34, the reader/writer a receives the packet P from the IC card CC. However, this packet PCIs 12, and thisNot by the packet P previously transmitted by the reader/writer aA2Plus 1 (13) to the sequence ID12 of (a).
Thus, the reader/writer a determines the packet P received in step S34CWith an error (in which case the packet P will be determined)CIs an incorrect packet) and a packet is retransmitted in step S35. That is, the reader/writer A transmits the packet PA3This is taken as packet PA1Is retransmitted.
At this time, due to the previously transmitted packet PA2Is 12, so the reader/writer a will increment the packet P by 1 for 12A3Is set to 13.
The packet P received by the reader/writer a in step S34CIs the packet P transmitted in step S31 for the reader/writer aA1Is received. However, packet PCIs that the reader/writer a transmitted the packet P in step S33A1Of the retransmitted packet PA2And then transferred from the IC card C. Thus, the reader/writer A will act as a buffer for the packet PA1Is correct response packet PCTreated as for packet PA2Determines that an error has occurred, and retransmits the command packet.
Disclosure of Invention
As described above, if the reader/writer a retransmits a packet immediately after detecting an error in the received packet, the packet is frequently retransmitted each time an error is detected in the packet received by the reader/writer a due to interference caused between the reader/writers a and B. This interferes with communication between the reader/writer a and the IC card C carried through the reader/writer. Therefore, the communication performance (the responsiveness of the IC card C) will be degraded, thereby resulting in a decrease in the reliability of the entire non-contact IC card system.
The present invention has been made in view of these circumstances, and has as its object: even in an environment where a plurality of readers/writers cause interference, communication between the readers/writers and the IC card can be carried out without fail.
A communication apparatus according to an embodiment of the present invention includes: a transmission control unit configured to transmit a command; a timeout period checking unit configured to check whether a timeout period to wait for a response to the command has elapsed; a retransmission control unit configured to retransmit the command only after a timeout period has elapsed; an error checking unit configured to check whether data received within a timeout period has an error; and a processing unit configured to regard the data received within the timeout period as a correct response to the command if the data is free from errors, and to perform processing in accordance with the response. If the received data within the timeout period has an error, the retransmission control unit does not retransmit the command, but the timeout period checking unit continues to check whether the timeout period has elapsed.
The communication method according to the embodiment of the invention comprises the following steps: controlling the transmission to transmit the command; checking whether a timeout period to wait for a response to the command has elapsed; controlling retransmission so that the command is retransmitted only after a timeout period has elapsed; checking whether the data received within the timeout period has errors; and if the data received within the timeout period is error-free, treating the data as a correct response to the command, and performing processing in accordance with the response. If the data received within the timeout period has an error, the command is not retransmitted in the retransmission control step, but whether the timeout period has elapsed or not is continuously checked in the timeout period checking step.
A program according to an embodiment of the present invention includes the steps of: controlling the transmission to transmit the command; checking whether a timeout period to wait for a response to the command has elapsed; controlling retransmission so that the command is retransmitted only after a timeout period has elapsed; checking whether the data received within the timeout period has errors; and if the data received within the timeout period is error-free, treating the data as a correct response to the command, and performing processing in accordance with the response. If the data received within the timeout period has an error, the command is not retransmitted in the retransmission control step, but whether the timeout period has elapsed or not is continuously checked in the timeout period checking step.
In the present invention, a command is transmitted, and it is checked whether a timeout period to wait for a response to the command has elapsed. Only after a timeout period has elapsed will the command be retransmitted. In addition, the data received within the timeout period is checked for errors. If the data received within the timeout period has no error, the received data is regarded as a correct response to the command, and processing is performed in accordance with the response. On the other hand, if the data received within the timeout period has an error, the command is not retransmitted, but it is continuously checked whether the timeout period has elapsed.
According to the present invention, it is possible to easily perform non-contact communication in an environment where interference occurs. More specifically, even if a reader/writer that communicates with an IC card in a noncontact manner is in an environment that causes interference between the reader/writer and another reader/writer, the reader/writer can easily communicate with the IC card.
Drawings
FIG. 1 shows a state in which a plurality of readers/writers cause interference;
fig. 2 is a flowchart (arrow diagram) describing the operation of the readers/writers a and B and the IC card C;
FIG. 3 is a flowchart describing the operation of the readers A and B and the IC card C;
fig. 4 is a block diagram showing a configuration example of an IC card system according to an embodiment of the present invention;
fig. 5 shows the format of a packet transmitted by the reader/writer 1 or the IC card 3;
fig. 6 is a flowchart describing the operation of the reader/writer 1;
fig. 7 is a flowchart (arrow diagram) describing the operation of the reader/writer 1, the IC card 3, and another reader/writer; and
fig. 8 is a flowchart describing the operation of the reader/writer 1, the IC card 3, and another reader/writer.
Detailed Description
Before describing embodiments of the present invention, correspondence between the features of the claims and the specific elements disclosed in the embodiments of the present invention will be first discussed below. This description is intended to ensure that an embodiment that supports the claimed invention is described in the specification. Therefore, even if an element in the following embodiments is not described as being associated with a certain feature of the present invention, it does not necessarily mean that the element is not associated with the recited feature of the claims. Conversely, even if an element is described herein as being associated with a certain feature of the claims, it does not necessarily mean that the element is not associated with other features of the claims.
Furthermore, the description should not be considered limiting, but rather so that all inventive aspects disclosed in the examples are described in the claims. That is, this description does not deny the existence of certain inventive aspects that are described in the examples but not claimed in the claims of this patent application, that is, certain inventive aspects that may be claimed through divisional applications in the future, or that may be claimed otherwise.
A communication apparatus according to an embodiment of the present invention is a communication apparatus (e.g., the reader/writer 1 shown in fig. 4) that performs communication in a noncontact manner. The communication device includes: a transmission control unit (e.g., the microcomputer 11 shown in fig. 4 for executing step S102 shown in fig. 6) configured to transmit a command; a timeout period checking unit (e.g., the microcomputer 11 shown in fig. 4 for executing step S104 shown in fig. 6) configured to check whether a timeout period to wait for a response to the command has elapsed; a retransmission control unit (e.g., the microcomputer 11 shown in fig. 4 for executing step S110 shown in fig. 6) configured to retransmit the command only after the timeout period has elapsed; an error checking unit (e.g., the microcomputer 11 shown in fig. 4 for executing steps S106, S107, or S108 shown in fig. 6) configured to check whether or not data received within a timeout period has an error; and a processing unit (e.g., the microcomputer 11 shown in fig. 4 for executing step S109 shown in fig. 6) configured to regard the data as a correct response to the command in the case where the data received within the timeout period has no error, and to execute processing in accordance with the response. If the data received within the timeout period has an error, the retransmission control unit does not retransmit the command, but the timeout period checking unit continues to check whether the timeout period has elapsed.
The communication method according to the present invention is a communication method for a communication device (for example, the reader/writer 1 shown in fig. 4) that performs communication in a noncontact manner. The communication method comprises the following steps: controlling the transmission so as to transmit a command (e.g., step S102 shown in fig. 6); checking whether a timeout period to wait for a response to the command has elapsed (e.g., step S104 shown in fig. 6); controlling retransmission so that the command is retransmitted only after the timeout period has elapsed (e.g., step S110 shown in fig. 6); checking whether the data received within the timeout period has an error (e.g., step S106, S107, or S108 shown in fig. 6); and if the data received within the timeout period has no error, the data is regarded as a correct response to the command, and processing is performed in accordance with the response (e.g., step S109 shown in fig. 6). If the data received within the timeout period has an error, the command is not retransmitted in the retransmission control step, but whether the timeout period has elapsed or not is continuously checked in the timeout period checking step.
The program according to the embodiment of the present invention is a program executed by a computer, such as (the CPU11A of) the microcomputer 11 shown in fig. 4, for controlling a communication apparatus, such as the reader/writer 1 shown in fig. 4, which performs communication in a non-contact manner. The procedure comprises the following steps: controlling the transmission so as to transmit a command (e.g., step S102 shown in fig. 6); checking whether a timeout period to wait for a response to the command has elapsed (e.g., step S104 shown in fig. 6); controlling retransmission so that the command is retransmitted only after the timeout period has elapsed (e.g., step S110 shown in fig. 6); checking whether the data received within the timeout period has an error (e.g., step S106, S107, or S108 shown in fig. 6); and if the data received within the timeout period has no error, the data is regarded as a correct response to the command, and processing is performed in accordance with the response (e.g., step S109 shown in fig. 6). If the data received within the timeout period has an error, the command is not retransmitted in the retransmission control step, but whether the timeout period has elapsed or not is continuously checked in the timeout period checking step.
Embodiments of the present invention will be described hereinafter with reference to the accompanying drawings.
Fig. 4 shows a configuration example of an IC card system according to an embodiment of the present invention.
In the IC card system shown in fig. 4, the reader/writer 1 operates under the control of the host computer 2 and communicates with the IC card 3 in a noncontact manner.
The reader/writer 1 includes a microcomputer 11, an I/F (interface) 12, a transmission circuit 13, a modulation circuit 14, an antenna 15, a demodulation circuit 16, an external circuit 17, and a timer 18.
The microcomputer 11 includes a CPU (central processing unit) 11A, RAM (random access memory) 11B and an EEPROM (electrically erasable programmable read only memory) 11C, controls each unit of the reader/writer 1, and realizes various processes by executing programs.
More specifically, CPU11A executes the program stored in EEPROM11C (by loading the program into RAM 11B as necessary). By executing the program, the CPU11A generates a packet (command packet) to be transmitted to the IC card 3, controls transmission processing of transmitting the packet by means of electromagnetic waves, checks whether a timeout period (described below) has elapsed, and controls retransmission processing of retransmitting the packet by means of electromagnetic waves. In addition, the CPU11A also checks whether the packet (reception packet) received by the antenna 15 and supplied from the demodulation circuit 16 has an error, and performs processing in accordance with an error-free correct response packet from the IC card 3.
The CPU11A generates a packet to be transmitted to the IC card 3, and supplies the packet to the modulation circuit 14 so as to transmit the packet by means of electromagnetic waves. At this time, the CPU11A encodes the packet to be supplied to the modulation circuit 14 into a manchester code or the like. Further, the CPU11A receives a packet received by the antenna 15 and supplied from the demodulation circuit 16. Since the packet is encoded in the manchester code or the like, the CPU11A decodes the manchester code.
The RAM 11B temporarily stores programs executed by the CPU11A and data necessary for the CPU11A to operate. The program executed by the CPU11A is installed in the EERPOM 11C. EEPROM11C also stores necessary data.
The I/F12 is an interface between the host computer 2 and the microcomputer 11. The host computer 2 controls the microcomputer 11 via the I/F12. The microcomputer 11 transmits data to the host computer 2 via the I/F12.
The program executed by the microcomputer 11(CPU 11A) may be installed in advance in the EEPROM11C, or may be installed from the host computer 2 to the EEPROM11C via the I/F12. Alternatively, the program may also be recorded on a removable recording medium such as a flexible disk, a CD-ROM (compact disc read only memory), an MO (magneto optical) disk, a DVD (digital versatile disc), a magnetic disk, or a semiconductor memory, and the program may be installed in EEPROM11C by driving the recording medium by a drive (not shown).
Further, the program may also be transferred from a download site to the reader/writer 1 in a wireless manner by means of an artificial satellite for digital satellite broadcasting, or may be transferred to the reader/writer 1 in a wired manner through a network such as a LAN (local area network) or the internet. The reader/writer 1 can receive the transferred program in the I/F12 and install it on the EEPROM 11C.
The transmission circuit 13 generates a carrier wave having a predetermined single frequency from the antenna 15 and supplies the carrier wave to the modulation circuit 14.
The modulation circuit 14 modulates the carrier wave from the transmission circuit 13 (for example, by amplitude modulation (ASK (amplitude shift keying))) in accordance with a packet (command packet) supplied from the microcomputer 11, and supplies the acquired modulated signal to the antenna 15. Therefore, an electromagnetic wave corresponding to a modulation signal generated by modulating a carrier wave in accordance with a packet supplied from the microcomputer 11 to the modulation circuit 14 is radiated from the antenna 15.
After transmitting the packet (command packet), the reader/writer 1 enters a reception waiting state to wait for reception of a response packet to the command packet. In the reception waiting state, the modulation circuit 14 supplies the carrier wave from the transmission circuit 13 to the antenna 15 without performing modulation. Therefore, in the reception standby state, the antenna 15 radiates electromagnetic waves corresponding to the carrier waves.
More specifically, the IC card 3 transmits a packet (response packet) to the reader/writer 1 that outputs an electromagnetic wave by performing so-called load modulation in which the electromagnetic wave (carrier wave) radiated from the reader/writer 1 is modulated by changing the impedance from the reader/writer 1 side to the IC card 3. Therefore, the reader/writer 1 emits an electromagnetic wave corresponding to the carrier wave in the reception waiting state to wait for reception of the response packet from the IC card 3.
The antenna 15 includes a closed-loop coil, and emits electromagnetic waves when a current (signal) flowing through the coil changes. When the carried IC card 3 passes through the reader/writer 1, the antenna 15 approaches the IC card 3, and the IC card 3 changes the impedance from the reader/writer 1 side, whereby the current (signal) flowing through the antenna 15 changes.
The demodulation circuit 16 receives and demodulates the current (signal) flowing through the antenna 15 to acquire (a manchester code or the like of) a packet, and supplies the packet to the microcomputer 11.
The external circuit 17 is a secure tamper-resistant IC chip. The external circuit 17 encrypts data to be transmitted to the IC card 3 and decrypts data contained in a packet supplied from the IC card 3 under the control of the microcomputer 11.
The timer (circuit) 18 counts a timeout period under the control of the microcomputer 11.
In this embodiment, the IC card 3 transmits a packet by performing load modulation that modulates an electromagnetic wave (carrier wave) output from the reader/writer 1. Alternatively, the IC card 3 may transmit the packet by outputting the carrier wave and modulating the carrier wave. In this case, the reader/writer 1 stops outputting the carrier wave in the reception waiting state.
The IC card 3 may extract energy from the electromagnetic waves radiated from the reader/writer 1, or may contain a battery itself.
Fig. 5 shows the format of a packet (command packet or response packet) transmitted by the reader/writer 1 or the IC card 3 shown in fig. 4.
From its header, the packet includes, in order, a header, a packet length, a command code/response code, a sequence ID, actual data, and a packet check code.
The header contains predetermined information (header information). The packet length indicates the length (data length) of the entire packet.
The command code/response code indicates the packet type, that is, it indicates whether the packet is a command packet or a response packet, as described above.
The serial ID is used to prevent masquerading, and as described above, it is a value that is incremented one by the reader/writer 1 or the IC card 3. Before transmitting a packet, the reader/writer 1 sets the sequence ID of the packet to a value different from the sequence ID of the previously transmitted packet. Then, the IC card 3 receives the packet from the reader/writer 1. Before transmitting the response packet to the packet, the IC card 3 sets the sequence ID of the response packet to a value generated by adding 1 to the sequence ID of the packet from the reader/writer 1. The reader/writer 1 receives the response packet from the IC card 3. Further, before transmitting the packet to the IC card 3, the reader/writer 1 sets the sequence ID of the packet to a value generated by adding 1 to the sequence ID of the response packet from the IC card 3. In this way, before the communication is ended, the reader/writer 1 and the IC card 3 set the sequence ID of the packet to be transmitted to a value generated by adding 1 to the sequence ID of the previously received packet.
Thus, the reader/writer 1 and the IC card 3 can determine whether or not the received packet is a correct packet by checking whether or not the sequence ID of the received packet has a value generated by adding 1 to the sequence ID of the previously transmitted packet.
The actual data is actual data transmitted from the reader/writer 1 or the IC card 3 to the other. Here, the actual data also contains a command when necessary. Specifically, for example, when the reader/writer 1 requests the IC card 3 to read data, the reader/writer 1 transmits a command packet containing a read command requesting the read data. This read command is included as actual data in the command packet. Also, when the reader/writer 1 requests writing of data to the IC card 3, the reader/writer 1 transmits a command packet containing a write command requesting writing of data. In this case, the write command and the data to be written are contained as actual data in the command packet.
The packet check code is an error checking (detection) code for checking the coherency of the packet.
Next, the operation of the reader/writer 1 shown in fig. 4 will be described with reference to the flowchart shown in fig. 6.
At step S101, (the CPU11A of) the microcomputer 11 generates a command packet having the format shown in fig. 5. Then, the process proceeds to step S102, where the microcomputer 11 controls transmission so as to transmit the command packet by means of the electromagnetic wave. That is, the microcomputer 11 supplies the command packet to the modulation circuit 14, and controls the modulation circuit 14 so as to transmit the command packet.
Under the control of the microcomputer 11, the modulation circuit 14 modulates the command packet supplied from the transmission circuit 13 in accordance with the command packet supplied from the microcomputer 11 to acquire a modulated signal, and supplies the modulated signal to the antenna 15. Therefore, an electromagnetic wave corresponding to a modulation signal generated by modulating a carrier wave in accordance with a packet supplied from the microcomputer 11 to the modulation circuit 14 is radiated from the antenna 15, thereby transmitting a command packet to the IC card 3.
Then, the process proceeds from step S102 to S103, where the microcomputer 11 calculates a timeout period to wait for a response packet to the command packet transmitted in step S102. Further, the microcomputer 11 controls the timer 18 to start counting the timeout period. Accordingly, the timer 18 starts to calculate the timeout period, and the reader/writer 1 enters the reception wait state.
Here, the microcomputer 11 sets the timeout period to about several milliseconds to several tens of milliseconds in accordance with the application of the IC card system (e.g., automatic ticket gate) or the command contained in the command packet. Alternatively, the timeout period may be fixed to a predetermined period.
After the timer 18 starts counting the timeout period in step S103, the process proceeds to step S104, where the microcomputer 11 refers to the time counted by the timer 18 to check (determine) whether the timeout period has elapsed.
If it is determined in step S104 that the timeout period has not elapsed, the process proceeds to step S105, where the microcomputer 11 determines whether a packet is received from the outside. If it is determined in step S105 that the packet is not received, the process returns to step S104, and the same steps are repeatedly performed.
If it is determined in step S105 that a packet is received, that is, if a packet transmitted from the outside is received through the antenna 15 and demodulated by the demodulation circuit 16 and supplied to the microcomputer 11, the process proceeds to step S106. Then, error checking is performed in steps S106 to S108 in order to check (determine) whether or not the packet (hereinafter referred to as a received packet) supplied from the demodulation circuit 16 to the microcomputer 11 has an error.
Specifically, in step S106, the microcomputer 11 refers to the packet length of the received packet (fig. 5), and determines whether the received packet has an error according to the packet length.
The response packet to the command packet transmitted by the reader/writer 1 in step S102 has an expected packet length.
More specifically, for example, a response packet to a command packet containing a read command requesting to read data contains data read in accordance with the read command, and thus the response packet length is longer. On the other hand, a response packet to a command packet including a write command requesting writing of data does not include data used in the case of a read command, and therefore the length of the response packet is short.
Thus, a response packet to a command packet containing a read command is expected to be longer, while a response packet to a command packet containing a write command is expected to be shorter.
In step S106, it is determined whether the received packet has an error according to whether the received packet has a packet length expected for the response packet of the command packet transmitted in step S102.
If it is determined in step S106 that the received packet has an error according to the packet length, that is, if the packet length of the received packet is different from the packet length expected for the response packet to the command packet transmitted in step S102, the microcomputer 11 discards the received packet so as to return to step S104, and continues to check whether the timeout period has elapsed.
That is, if the received packet received within the timeout period has an error, the microcomputer 11 does not perform retransmission (described later). In other words, the microcomputer 11 does not retransmit the command packet, but continues to check whether the timeout period has elapsed.
If it is determined in step S106 that the received packet has no error according to the packet length, that is, if the packet length of the received packet is the packet length expected for the response packet to the command packet transmitted in step S102, the process proceeds to step S107. At step S107, the microcomputer 11 refers to the packet check code (fig. 5) of the received packet, and determines whether the received packet has an error according to the packet check code.
If it is determined in step S107 that the received packet has an error from the packet check code of the received packet, the microcomputer 11 discards the received packet and returns to step S104, and then continues to check whether or not the timeout period has elapsed.
In other words, if the received packet received within the timeout period has an error, the microcomputer 11 does not retransmit the command packet but continues to check whether the timeout period has elapsed.
If it is determined in step S107 that the received packet has no error from the packet check code, the process proceeds to step S108, where the microcomputer 11 refers to the command code/response code (fig. 5) of the received packet to determine whether the received packet has an error from the command code/response code.
If it is determined in step S108 that the received packet has an error from the command code/response code of the received packet, that is, if the command code/response code of the received packet does not match the response code expected for the response packet of the command packet in step S102, the microcomputer 11 discards the received packet, returns to step S104, and continues to check whether the timeout period has elapsed.
That is, if the received packet received within the timeout period has an error, the microcomputer 11 does not retransmit the command packet but continues to check whether the timeout period has elapsed.
On the other hand, if it is determined in step S108 that the received packet has no error from the command code/response code, that is, if the command code/response code of the received packet matches the response code expected for the response packet of the command packet transmitted in step S102, the process proceeds to step S109, where the microcomputer 11 determines that the received packet is a correct response packet for the command packet transmitted in step S102, and performs processing in accordance with the response packet, and then the processing ends.
For example, it is assumed that the IC card 3 has a function of a pass, and that the command packet transmitted in step S102 contains a read command requesting reading of data on the valid period and the usable area of the pass, and that a correct response packet containing data on the valid period and the usable area of the pass can be acquired as a response packet to the command packet. In this case, the microcomputer 11 responds to the response packet, checking the validity period of the pass and whether the usable area is correct.
On the other hand, if it is determined in step S104 that the timeout period has elapsed, that is, if the microcomputer fails to receive a correct response packet within the timeout period (in the case of no error), the process proceeds to step S110, in which the microcomputer 11 retransmits the command packet transmitted in step S102, and then the process ends.
That is, in step S110, steps S101 to S110 in the flowchart shown in fig. 6 are cyclically executed in order to retransmit the command packet.
As described above, if the received packet received within the timeout period has an error, the reader/writer 1 does not retransmit the command packet but continues to check whether the timeout period has elapsed. That is, before the timeout occurs, the reader/writer 1 does not retransmit the command packet even if the received packet has an error, but waits for the received packet in the reception waiting state. If the received packet received within the timeout period has no error, the reader/writer 1 regards the received packet as a correct response packet to the command packet and performs processing in accordance with the response packet. Only after the timeout period has elapsed does the reader/writer 1 retransmit the command packet. Therefore, as described below with reference to fig. 7 and 8, even if another reader/writer is placed in close proximity to the reader/writer 1, the reader/writer 1 can communicate with the IC card 3 carried past the reader/writer while suppressing the interference effect caused by the other reader/writer.
The reader/writer 1 does not retransmit the command packet immediately after detecting an error in the received packet, and it retransmits the command packet only after the timeout period has elapsed. Therefore, the transmission (retransmission) frequency of the command packet will be decreased. Therefore, when the carried IC card 3 passes another reader/writer placed in close proximity to the reader/writer 1, interference with communication between the another reader/writer and the IC card 3 caused by frequent retransmission of command packets by the reader/writer 1 can be suppressed.
Next, operations of the reader/writer 1, the IC card 3, and the other reader/writer performed when the IC card 3 is carried past the reader/writer 1 in a case where the other reader/writer is placed in close proximity to the reader/writer 1 will be described with reference to fig. 7 and 8.
The other reader/writer has the same structure as the reader/writer 1 shown in fig. 4.
Operations of the reader/writer 1, the IC card 3, and another reader/writer performed when the reader/writer 1 can receive a response packet from the IC card 3 carrying the reader/writer within a timeout period are described first with reference to fig. 7.
In fig. 7, the reader/writer 1 transmits a command packet P having a command code of 0x10 in step S1211. Then, in step S122, the reader/writer 1 starts a count timeout period to enter a reception wait state.
Here, assuming that the response code of the response packet to the command packet having the command code 0x10 is 0x11, the reader/writer 1 waits for reception of a response packet having the response code 0x11 in the reception waiting state at step S122.
In step S131, the IC card 3 receives the command packet P having the command code 0x10 from the reader/writer 11And starts to group P according to the command1The process is executed.
On the other hand, the other reader/writer performs polling so as to detect that one IC card passes (presence of one IC card at a nearby position). Specifically, the other reader/writer periodically transmits a command packet having a command code of 0x 80.
In fig. 7, the other reader/writer transmits a command packet P having a command code 0x80 in step S1411'. Thereafter, the other reader/writer periodically transmits a command packet having a command code of 0x 80.
After the reception waiting state is started in step S122, the reader/writer 1 receives the packet P from the other reader/writer in step S1231’。
Packet P from another reader/writer1' is a command packet with a command code of 0x80, which is not intended to be received by the reader/writer 1 for a command packet P1I.e., it is not a packet with a response code of 0x 11. Thus, the reader/writer 1 determines the packet P received in step S1231' has errors, and discards the packet P1'. Further, since the timeout period has not elapsed, the reader/writer 1 continues to count the timeout period (and continues to receive the wait state).
Then, another reader/writer transmits a command packet P having a command code of 0x80 at step S1422'. In step S124, the reader/writer 1 receives the packet P from another reader/writer2’。
The packet P received previously (in step S123) with the reader/writer 11' As such, a packet P from another reader/writer2' is a command packet with a command code of 0x80, not a packet with a response code of 0x11 expected to be received by the reader/writer 1. Thus, the reader/writer 1 doesThe packet P received in the pacing step S1242' has an error, and discards the packet. Then, since the timeout period has not elapsed, the reader/writer 1 continues to count the timeout period (and continues the reception wait state).
On the other hand, the IC card 3 completes the grouping P in accordance with the command from the reader/writer 11Then transmits the packet P with the response code 0x11 in step S1322As for the command packet P1The response packet of (2).
At this time, the reader/writer 1 is counting the timeout period and is in the reception waiting state, whereby it receives the packet P from the IC card 3 in step S1252
Packet P from IC card 32Is a response packet with a response code of 0x11, and is a response packet (expected) to be received by the reader/writer 1. Thus, the reader/writer 1 determines the packet P received in step S1252Is a correct response packet without error and ends the counting timeout period, and is further in accordance with the response packet P2To perform the processing.
As described above, during the timeout period, the reader/writer 1 does not retransmit the command packet but waits for the reception of the packet even if the received packet has an error. When receiving an error-free packet, the reader/writer 1 determines that the error-free received packet is a correct response packet to the command packet, and the reader/writer 1 performs processing in accordance with the response even if another packet received in the timeout period has an error.
Therefore, unlike the case shown in fig. 2 in which the command packet is retransmitted upon detection of an error in the received packet, the process of the reader/writer 1 receiving the response packet from the IC card 3 is relatively less likely to be interfered with by the retransmission of the command packet.
Next, operations of the reader/writer 1, the IC card 3, and another reader/writer performed when the reader/writer 1 cannot receive a response packet from the IC card 3 carrying the reader/writer within a timeout period will be described with reference to fig. 8.
In fig. 8, the reader/writer 1 transmits a command packet P having a command code 0x10 in step S1511. Then, the process proceeds to step S152, where the reader/writer 1 starts counting the timeout period, and enters a reception wait state.
That is, as in step S122 shown in fig. 7, the reader/writer 1 enters a reception wait state to wait for reception of a response packet to the command packet having the command code 0x10, i.e., a response packet having the response code 0x 11.
In step S161, the IC card 3 receives the command packet P having the command code 0x10 transmitted from the reader/writer 11And starts to group P according to the command1To perform the processing.
On the other hand, as in the case shown in fig. 7, another reader/writer periodically transmits a command packet having a command code of 0x 80.
In fig. 8, another reader/writer transmits a command packet P having a command code of 0x80 in step S1711'. Thereafter, another reader/writer periodically transmits a command packet having a command code of 0x 80.
After the reception waiting state is started in step S152, the reader/writer 1 receives the packet P from another reader/writer in step S1531’。
Packet P from another reader/writer1' is a command packet with a command code of 0x80, not a packet with a response code of 0x11 that is expected to be received by the reader/writer 1. Thus, the reader/writer 1 determines the packet P received in step S1531' has errors, and discards the packet P1'. Further, since the timeout period has not elapsed, the reader/writer 1 continues to count the timeout period (and continues to receive the wait state).
Then, another reader/writer transmits a command packet P having a command code of 0x80 at step S1722'. In step S154, the reader/writer 1 receives a signal from another reader/writerPacket P of2’。
With the packet P previously received by the reader/writer 1 (in step S153)1' As such, a packet P from another reader/writer2' a packet with a response code of 0x11 is not expected to be received by the reader/writer 1. Thus, the reader/writer 1 determines the packet P received in step S1542' has errors and discards the packet. Then, since the timeout period has not elapsed, the reader/writer 1 continues to count the timeout period (and continues the reception wait state).
On the other hand, the IC card 3 completes the grouping P in accordance with the command from the reader/writer 11And (4) processing. Then, in step S162, the IC card 3 transmits a response packet P having a response code 0x112As for the command packet P1The response packet of (2). Here, it is assumed that the reader/writer 1 is receiving the packet P from another reader/writer in step S1542' simultaneous transmission of packets P2And it is assumed that the reader/writer 1 cannot receive the packet P from the IC card 32
In this case, the IC card 3 transmits the command packet P in step S1621Response packet P of2And therefore does not retransmit the response packet P2
On the other hand, the reader/writer 1 is waiting to receive the command packet P1The response packet of (2). However, the IC card 3 has transmitted the command packet P1Response packet P of2(in step S162), and does not retransmit the response packet P2. Therefore, the command packet P cannot be received at the reader/writer 11The timeout period is passed at the same time as the response packet.
After the timeout period elapses, the reader/writer 1 retransmits the command packet in step S155. That is, the reader/writer 1 transmits a command packet P3This is taken as a packet having a command code of 0x 10.
In step S163, the IC card 3 receives the command packet P from the reader/writer 13. However, the device is not suitable for use in a kitchenThereafter, the IC card 3 groups P in accordance with the command3To perform processing and transmit a command packet P3The response packet of (2).
As described above, the reader/writer 1 retransmits the command packet only after the timeout period has elapsed. Frequent retransmission of command packets can be avoided. Further, even if the reader/writer 1 fails to receive the response packet from the IC card 3 for some reason, the reader/writer 1 can receive the response packet from the IC card 3 by retransmitting the command packet after the timeout period has elapsed.
In the flowchart shown in fig. 6, whether the received packet has an error is determined based on the packet length (data length) of the received packet, a packet check code (a code for checking for errors), and a command code/response code (a code for indicating the type of the received packet). Alternatively, whether the received packet has an error may be determined based on the sequence ID (fig. 5) of the received packet.
In the flowchart shown in fig. 6, whether the received packet has an error is determined by sequentially referring to the packet length of the received packet, the packet check code, and the command/response code. However, the packet length, the packet check code, and the command/response code may be referenced in another order to determine whether the received packet has an error.
The processing shown in the flowchart of fig. 6 may be executed by allowing the microcomputer 11 to execute a program or by using dedicated hardware.
As described above, the reader/writer 1 does not retransmit the command packet even if the received packet has an error before the timeout occurs, but waits for the received packet in the reception waiting state. If the received packet has no error within the timeout period, the reader/writer 1 determines that the received packet is a correct response packet to the command packet, and performs processing in accordance with the response packet. The reader/writer 1 retransmits the command packet only after the timeout period has elapsed. Therefore, the command packet is retransmitted less frequently than in the case shown in fig. 2 and 3 where the command packet is retransmitted when an error is detected in the received packet. In this way, even in an environment where the reader/writer 1 is close to another reader/writer and interference occurs therebetween, the reader/writer 1 through which the IC card 3 is carried can communicate with the IC card 3 by suppressing the interference effect.
Without adding new hardware, by changing a part of the program executed by the microcomputer 1I, it is easy to change the processing of retransmitting the command packet when an error in the received packet is detected (the processing performed by the reader/writer a described with reference to fig. 1 to 3) to the following processing: the command packet is not retransmitted even when there is an error in the received packet, but the received packet is waited in a reception waiting state before a timeout occurs, if the received packet has no error within the timeout period, the received packet is regarded as a correct response packet to the command packet and processing is performed in accordance with the response packet, and the command packet (processing performed by the reader/writer 1) is retransmitted only after the timeout period has elapsed.
Therefore, even if the reader/writer 1 is in an environment that causes interference between the reader/writer 1 and another reader/writer, that is, even if the reader/writer 1 is placed in close proximity to another reader/writer, the reader/writer 1 can easily communicate with the IC card 3.
Thus, it is almost unnecessary to consider interference between the reader/writer 1 and another reader/writer while the reader/writer 1 is disposed. Since the setting conditions are not as strict as in the related art, various costs required for setting the reader/writer 1 can be reduced. Further, the reader/writer 1 may be provided in various environments, and an IC card system including the reader/writer 1 may be used for various applications.
As described above, the reader/writer 1 can be configured without adding new hardware, whereby an increase in the manufacturing cost of the reader/writer 1 can be suppressed.
Further, since the command packet is retransmitted less, interference with communication between another reader/writer close to the reader/writer 1 and the IC card 3 due to retransmission of the command packet by the reader/writer 1 is less generated. Further, interference with communication between the reader/writer 1 and the IC card 3 caused by another reader/writer close to the reader/writer 1 retransmitting the command packet also occurs less frequently. Thus, the communication performance between the reader/writer and the IC card 3 (the responsiveness of the IC card 3) is improved, and the actual communication speed can be increased.
Further, since the command packet is less retransmitted, the power consumption of the reader/writer 1 can be reduced.
The case where the present invention is applied to an IC card system is described above. Further, the present invention is also applicable to a system that performs non-contact communication (wireless communication), such as a wireless tag system.
In this specification, as for a program that allows a computer (the CPU11A of the microcomputer) to execute various processes, the processing steps describing the program are not necessarily executed in chronological order in the order described in the flowchart, and the steps may be executed in parallel or executed one by one (for example, including parallel processing or processing by an object).
The program may be processed by a computer, or may be processed in a distributed manner by a plurality of computers.
Those skilled in the art will appreciate that various modifications, combinations, sub-combinations and substitutions are possible, depending on design requirements and other factors, as long as they come within the scope of the appended claims and their equivalents.

Claims (4)

1. A communication apparatus that performs communication in a non-contact manner, comprising:
transmission control means for transmitting a command;
timeout period checking means for checking whether a timeout period waiting for a response to the command has elapsed;
retransmission control means for retransmitting the command only after the timeout period has elapsed;
error checking means for checking whether the data received within the timeout period has an error; and
processing means for regarding data received within the timeout period as a correct response to the command in the case where the data has no error, and performing processing in accordance with the response,
if the received data within the timeout period has errors, the retransmission control device does not retransmit the command, but the timeout period checking device continues to check whether the timeout period has elapsed.
2. The communication device of claim 1, wherein the received data comprises a data length of the received data, an error checking code, or a code indicating a type of the received data, and
wherein the error checking means checks whether the received data has an error based on the data length, the error checking code, or a code indicating the type of the received data.
3. A communication method for a communication device that performs communication in a non-contact manner, the communication method comprising the steps of:
controlling the transmission to transmit the command;
checking whether a timeout period waiting for a response to the command has elapsed;
controlling retransmission so that the command is retransmitted only after a timeout period has elapsed;
checking whether the data received within the timeout period has errors; and
if the data received within the timeout period is error-free, the data is treated as a correct response to the command, and processing is performed in accordance with the response,
wherein if the data received within the timeout period has an error, the command is not retransmitted in the retransmission control step, but whether the timeout period has elapsed or not is continuously checked in the timeout period checking step.
4. A communication apparatus that performs communication in a non-contact manner, comprising:
a transmission control unit configured to transmit a command;
a timeout period checking unit configured to check whether a timeout period waiting for a response to the command has elapsed;
a retransmission control unit configured to retransmit the command only after a timeout period has elapsed;
an error checking unit configured to check whether data received within a timeout period has an error; and
a processing unit configured to, in a case where data received within a timeout period has no error, regard the data as a correct response to the command, and perform processing in accordance with the response,
wherein, if the data received within the timeout period has an error, the retransmission control unit does not retransmit the command, but the timeout period checking unit continues to check whether the timeout period has elapsed.
HK06110240.1A 2005-01-31 2006-09-15 Communication apparatus, communication method HK1089841B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005023433A JP4337051B2 (en) 2005-01-31 2005-01-31 COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
JP2005-023433 2005-01-31

Publications (2)

Publication Number Publication Date
HK1089841A1 HK1089841A1 (en) 2006-12-08
HK1089841B true HK1089841B (en) 2009-05-22

Family

ID=

Similar Documents

Publication Publication Date Title
CA2148145C (en) Passive transponder
CN101241542B (en) Communication apparatus, communication method
EP1896863B1 (en) Rfid communication systems and methods
AU2010290085B2 (en) RFID portal system with RFID tags having various read ranges
US9928388B1 (en) Sequential encoding for RFID tags
EP1845475A1 (en) Communication medium, communication medium processing apparatus, and communication medium processing system
US20070241865A1 (en) Wireless IC tag with counter, and information management system
US9317725B1 (en) RFID protocol
CN101159025A (en) RFID tag reader and method
US7468668B2 (en) Semiconductor device for IC tag, IC tag, and control method for IC tag for detecting and executing command from radio wave
HK1089841B (en) Communication apparatus, communication method
EP2166485B1 (en) RFID Reaction time reduction
EP1580903B1 (en) Semiconductor device
JPH113407A (en) Communication system and device
JP2003223619A (en) Card insertion type non-contact type IC card reader / writer
JP2001283163A (en) IC card reader / writer device
CN112771784B (en) System and method for device coexistence
Transponder HITAG S
JP2006025117A (en) Reader/writer
JPH11288446A (en) Wireless card, communication device and communication method using the same
JP2023146841A (en) Information processing device and information processing method
HK40048516B (en) Systems and methods for device coexistence
HK40048516A (en) Systems and methods for device coexistence
JP2001175901A (en) Non-contact information recording medium processor
HK1078161A1 (en) Contactless proximity automated data collection system and method