JP5684059B2 - IC card and control method of IC card - Google Patents

IC card and control method of IC card Download PDF

Info

Publication number
JP5684059B2
JP5684059B2 JP2011141097A JP2011141097A JP5684059B2 JP 5684059 B2 JP5684059 B2 JP 5684059B2 JP 2011141097 A JP2011141097 A JP 2011141097A JP 2011141097 A JP2011141097 A JP 2011141097A JP 5684059 B2 JP5684059 B2 JP 5684059B2
Authority
JP
Japan
Prior art keywords
card
collision
unit
flag
initial response
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2011141097A
Other languages
Japanese (ja)
Other versions
JP2013008241A (en
Inventor
内田 圭亮
圭亮 内田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2011141097A priority Critical patent/JP5684059B2/en
Publication of JP2013008241A publication Critical patent/JP2013008241A/en
Application granted granted Critical
Publication of JP5684059B2 publication Critical patent/JP5684059B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明の実施形態は、ICカード、及びICカードの制御方法に関する。   Embodiments described herein relate generally to an IC card and an IC card control method.

一般的に、ICカードは、プラスチックなどで形成されたカード状の本体と本体に埋め込まれたICモジュールとを備えている。ICモジュールは、ICチップを有している。ICチップは、電源が無い状態でもデータを保持することができるEEPROM(Electrically Erasable Programmable Read−Only Memory)またはフラッシュROMなどの不揮発性メモリと、種々の演算を実行するCPUとを有している。   In general, an IC card includes a card-like main body formed of plastic or the like and an IC module embedded in the main body. The IC module has an IC chip. The IC chip has a nonvolatile memory such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) or a flash ROM that can hold data even in the absence of a power source, and a CPU that executes various operations.

ICカードは、例えば、国際標準規格ISO/IEC7816、及びISO/IEC14443に準拠したICカードである。ICカードは、携帯性に優れ、且つ、外部装置との通信及び複雑な演算処理を行う事ができる。また、偽造が難しい為、ICカードは、機密性の高い情報などを格納してセキュリティシステム、電子商取引などに用いられることが想定される。   The IC card is, for example, an IC card conforming to international standards ISO / IEC7816 and ISO / IEC14443. The IC card is excellent in portability and can perform communication with an external device and complicated calculation processing. Further, since it is difficult to forge, the IC card is assumed to store highly confidential information and be used for a security system, electronic commerce, and the like.

また、近年、非接触通信によりデータの送受信を行うことができるICカードが一般的に普及している。上記したような非接触通信を行うICカードは、ICチップとアンテナとを備えている。ICカードは、ICカードを処理するICカード処理装置のリーダライタから発せられる磁界を受けて、カード内のアンテナを電磁誘導により起電させることにより動作する。また、ICカードは、非接触通信により処理装置からコマンドを受信した場合、受信したコマンドに応じてアプリケーションを実行する。これにより、ICカードは、種々の機能を実現することができる。   In recent years, IC cards capable of transmitting and receiving data by non-contact communication have become popular. An IC card that performs non-contact communication as described above includes an IC chip and an antenna. An IC card operates by receiving a magnetic field generated from a reader / writer of an IC card processing apparatus that processes the IC card and causing an antenna in the card to generate electricity by electromagnetic induction. Further, when the IC card receives a command from the processing device by non-contact communication, the IC card executes an application according to the received command. Thereby, the IC card can realize various functions.

ICカードの処理装置は、標準の通信速度で、無線通信により初期応答要求コマンドを送信する。ICカードは、初期応答要求コマンドを受信する場合、初期応答要求コマンドに対するレスポンス(初期応答)を生成し、生成したレスポンスを処理装置に送信する。処理装置は、レスポンスを受け取ることにより、通信可能範囲にICカードが存在することを認識することができる。   The IC card processing device transmits an initial response request command by wireless communication at a standard communication speed. When receiving the initial response request command, the IC card generates a response (initial response) to the initial response request command and transmits the generated response to the processing device. By receiving the response, the processing device can recognize that the IC card exists in the communicable range.

また、処理装置は、通信可能範囲内に存在する複数枚のICカードを認識する為に、アンチコリジョンを行う。この場合、処理装置は、複数の時間枠(スロット)を設定し、ICカードに対して初期応答要求コマンド及びアンチコリジョンのコマンドを送信する。ICカードは、乱数を生成し、乱数に応じてスロットを選択し、選択したスロットで初期応答要求コマンドに対するレスポンスをICカードの処理装置に送信する。これにより、処理装置は、ICカードからレスポンスを受信することができる。   Further, the processing device performs anti-collision to recognize a plurality of IC cards existing within the communicable range. In this case, the processing apparatus sets a plurality of time frames (slots) and transmits an initial response request command and an anti-collision command to the IC card. The IC card generates a random number, selects a slot according to the random number, and transmits a response to the initial response request command to the IC card processing device in the selected slot. Thereby, the processing apparatus can receive a response from the IC card.

特開2002−203219号公報JP 2002-203219 A

しかし、処理装置の通信可能範囲内にICカードが一枚しか存在しない状態でアンチコリジョンのコマンドを受信した場合、ICカードは、アンチコリジョンを行う。即ち、ICカードは、乱数を生成し、乱数に応じてスロットを選択し、選択したスロットで初期応答要求コマンドに対するレスポンスをICカードの処理装置に送信する。この為、例えば最初以外のスロットを選択した場合にレスポンスの送信が遅れる可能性があるという課題がある。   However, when an anti-collision command is received with only one IC card within the communicable range of the processing device, the IC card performs anti-collision. That is, the IC card generates a random number, selects a slot according to the random number, and transmits a response to the initial response request command to the IC card processing device in the selected slot. Therefore, for example, when a slot other than the first slot is selected, there is a problem that response transmission may be delayed.

そこで、より速く非接触通信を行う事ができるICカード、及びICカードの制御方法を提供することを目的とする。   Accordingly, it is an object of the present invention to provide an IC card capable of performing contactless communication faster and an IC card control method.

一実施形態に係るICカードは、外部機器と非接触通信を行うICカードであって、前記外部機器から送信された初期応答要求コマンドを受信する受信部と、前記受信部により受信された前記初期応答要求コマンドを解析し、前記初期応答要求コマンドにより示されたアンチコリジョンのための複数のスロットを認識する解析部と、前記初期応答要求コマンドに対するレスポンスを生成するコマンド処理部と、前記外部機器との最後の非接触通信時にコリジョンが生じなかったことを示すフラグを記憶する不揮発性メモリと、前記不揮発性メモリにより前記フラグが記憶されている場合、前記解析部により認識した複数のスロットのうちの最初のスロットを選択する第1のスロット選択部と、前記不揮発性メモリにより前記フラグが記憶されていない場合、前記解析部により認識した複数のスロットのうちの1つを選択する第2のスロット選択部と、前記第1のスロット選択部または第2のスロット選択部により選択されたスロットで前記コマンド処理部により生成された前記レスポンスを前記外部機器に送信する送信部と、前記送信部により前記レスポンスを前記外部機器に送信する際の前記コリジョンを検出し、前記コリジョンが検出されなかった場合、前記フラグを前記不揮発性メモリに書き込み、前記コリジョンが検出された場合、前記不揮発性メモリにより記憶されている前記フラグを削除するコリジョン検出部と、を具備し、前記コリジョン検出部は、前記初期応答要求コマンドを複数回受信した場合、前記コリジョンを検出する。 An IC card according to an embodiment is an IC card that performs non-contact communication with an external device, the receiving unit receiving an initial response request command transmitted from the external device, and the initial received by the receiving unit Analyzing a response request command, recognizing a plurality of slots for anti-collision indicated by the initial response request command, a command processing unit for generating a response to the initial response request command, and the external device; of a nonvolatile memory for storing a flag indicating that the last collision during non-contact communication has not occurred, if the flag by the non-volatile memory is stored, among the plurality of slots recognized by the analysis unit a first slot selection unit for selecting a first slot, the flag stored by the nonvolatile memory If not, a second slot selection unit that selects one of the plurality of slots recognized by the analysis unit, and the command in the slot selected by the first slot selection unit or the second slot selection unit A transmission unit that transmits the response generated by the processing unit to the external device, and the collision when the response is transmitted to the external device by the transmission unit, and the collision is not detected, A collision detection unit that writes a flag to the nonvolatile memory and deletes the flag stored in the nonvolatile memory when the collision is detected , the collision detection unit including the initial response request When the command is received a plurality of times, the collision is detected .

図1は、一実施形態に係るICカード処理システムについて説明するための図である。FIG. 1 is a diagram for explaining an IC card processing system according to an embodiment. 図2は、一実施形態に係るICカードについて説明するための図である。FIG. 2 is a diagram for explaining an IC card according to an embodiment. 図3は、一実施形態に係るICカード処理システムについて説明するための図である。FIG. 3 is a diagram for explaining an IC card processing system according to an embodiment. 図4は、一実施形態に係るICカード処理システムについて説明するための図である。FIG. 4 is a diagram for explaining an IC card processing system according to an embodiment. 図5は、一実施形態に係るICカード処理システムについて説明するための図である。FIG. 5 is a diagram for explaining an IC card processing system according to an embodiment. 図6は、一実施形態に係るICカード処理システムについて説明するための図である。FIG. 6 is a diagram for explaining an IC card processing system according to an embodiment. 図7は、一実施形態に係るICカード処理システムについて説明するための図である。FIG. 7 is a diagram for explaining an IC card processing system according to an embodiment.

以下、図面を参照しながら、一実施形態に係るICカード、ICカードの処理装置、及びICカードの処理システムについて詳細に説明する。   Hereinafter, an IC card, an IC card processing device, and an IC card processing system according to an embodiment will be described in detail with reference to the drawings.

本実施形態に係るICカード20及びICカードを処理する処理装置(端末装置)10は、例えば、ISO/IEC14443などにより規定されている非接触通信の機能を備える。これにより、ICカード20及び端末装置10は、互いにデータの送受信を行うことができる。   The IC card 20 and the processing device (terminal device) 10 that processes the IC card according to the present embodiment have a non-contact communication function defined by, for example, ISO / IEC14443. Thereby, the IC card 20 and the terminal device 10 can transmit and receive data to and from each other.

図1は、一実施形態に係るICカード処理システム1の構成例を示す。
ICカード処理システム1は、ICカード20を処理する端末装置10と、ICカード20と、を備える。端末装置10とICカード20とは、上記したように非接触通信により互いに種々のデータを送受信する。
FIG. 1 shows a configuration example of an IC card processing system 1 according to an embodiment.
The IC card processing system 1 includes a terminal device 10 that processes the IC card 20 and an IC card 20. As described above, the terminal device 10 and the IC card 20 transmit and receive various data by non-contact communication.

端末装置10は、CPU11、ROM12、RAM13、不揮発性メモリ14、送受信部15、共振部16、ロジック部17、上位インターフェース18、及び電源部19を備える。CPU11、ROM12、RAM13、不揮発性メモリ14、送受信部15、共振部16、ロジック部17、及び上位インターフェース18は、それぞれバスを介して互いに接続されている。   The terminal device 10 includes a CPU 11, a ROM 12, a RAM 13, a nonvolatile memory 14, a transmission / reception unit 15, a resonance unit 16, a logic unit 17, a host interface 18, and a power supply unit 19. The CPU 11, the ROM 12, the RAM 13, the nonvolatile memory 14, the transmission / reception unit 15, the resonance unit 16, the logic unit 17, and the host interface 18 are connected to each other via a bus.

CPU11は、端末装置10全体の制御を司る制御部として機能する。CPU11は、ROM12又は不揮発性メモリ14に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。例えば、CPU11は、送受信部15及び共振部16を介してICカード20とコマンド及びレスポンスの送受信を行う。   The CPU 11 functions as a control unit that controls the entire terminal device 10. The CPU 11 performs various processes based on the control program and control data stored in the ROM 12 or the nonvolatile memory 14. For example, the CPU 11 transmits and receives commands and responses to and from the IC card 20 via the transmission / reception unit 15 and the resonance unit 16.

ROM12は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。RAM13は、ワーキングメモリとして機能する揮発性のメモリである。RAM13は、CPU11の処理中のデータなどを一時的に格納する。例えば、RAM13は、送受信部15及び共振部16を介して外部の機器と送受信するデータを一時的に格納する。また、RAM13は、CPU11が実行するプログラムを一時的に格納する。   The ROM 12 is a non-volatile memory that stores a control program and control data in advance. The RAM 13 is a volatile memory that functions as a working memory. The RAM 13 temporarily stores data being processed by the CPU 11. For example, the RAM 13 temporarily stores data to be transmitted / received to / from an external device via the transmission / reception unit 15 and the resonance unit 16. The RAM 13 temporarily stores a program executed by the CPU 11.

不揮発性メモリ14は、例えばEEPROM、FRAMなどを備える。不揮発性メモリ14は、例えば、制御用のプログラム、制御データ、アプリケーション、及びアプリケーションに用いられるデータなどを記憶する。   The nonvolatile memory 14 includes, for example, an EEPROM, an FRAM, and the like. The nonvolatile memory 14 stores, for example, a control program, control data, an application, and data used for the application.

送受信部15及び共振部16は、ICカード20と通信を行うためのインターフェース装置である。   The transmission / reception unit 15 and the resonance unit 16 are interface devices for communicating with the IC card 20.

送受信部15は、共振部16により送受信するデータに対して信号処理を施す。例えば、送受信部15は、符号化、復号、変調、及び復調を行なう。送受信部15は、符号化及び変調を施したデータを共振部16に供給する。   The transmission / reception unit 15 performs signal processing on data transmitted / received by the resonance unit 16. For example, the transmission / reception unit 15 performs encoding, decoding, modulation, and demodulation. The transmission / reception unit 15 supplies the encoded and modulated data to the resonance unit 16.

共振部16は、例えば所定の共振周波数を有するアンテナを有する。共振部16は、送受信部15から供給されるデータに応じて磁界を発生させる。これにより、端末装置10は、通信可能範囲に存在するICカード20に対してデータを非接触で送信することができる。   The resonating unit 16 includes an antenna having a predetermined resonance frequency, for example. The resonance unit 16 generates a magnetic field according to data supplied from the transmission / reception unit 15. Thereby, the terminal device 10 can transmit data to the IC card 20 existing in the communicable range in a non-contact manner.

また、共振部16は、磁界を検知し、検知した磁界に応じてデータを生成する。これにより、共振部16は、データを非接触で受信することができる。共振部16は、受信したデータを送受信部15に供給する。送受信部15は、共振部16により受信したデータに対して復調及び復号を行う。これにより、端末装置10は、ICカード20から送信された元のデータを取得することができる。   The resonating unit 16 detects a magnetic field and generates data according to the detected magnetic field. Thereby, the resonance part 16 can receive data non-contactingly. The resonance unit 16 supplies the received data to the transmission / reception unit 15. The transmission / reception unit 15 demodulates and decodes the data received by the resonance unit 16. Thereby, the terminal device 10 can acquire the original data transmitted from the IC card 20.

ロジック部17は、所定の演算処理を行う。例えば、ロジック部17は、CPU11の制御に基づいて、データの暗号化、復号、及び乱数生成などの演算処理を行う。   The logic unit 17 performs predetermined calculation processing. For example, the logic unit 17 performs arithmetic processing such as data encryption, decryption, and random number generation based on the control of the CPU 11.

上位インターフェース18は、上位端末と通信するためのインターフェースである。上位端末は、例えば操作部及び表示部などを備える。操作部は、例えば操作キーなどを備え、操作者により入力される操作に基づいて、操作信号を生成する。表示部は、種々の情報を表示する。上位インターフェース18は、上位端末からデータを受け取り、CPU11に伝送する。また、上位インターフェース18は、送受信部15及び共振部16によりICカード20から取得したデータを上位端末に伝送する構成であってもよい。   The upper interface 18 is an interface for communicating with the upper terminal. The host terminal includes, for example, an operation unit and a display unit. The operation unit includes an operation key, for example, and generates an operation signal based on an operation input by the operator. The display unit displays various information. The upper interface 18 receives data from the upper terminal and transmits it to the CPU 11. The upper interface 18 may be configured to transmit data acquired from the IC card 20 by the transmission / reception unit 15 and the resonance unit 16 to the upper terminal.

電源部19は、端末装置10の各部に電力を供給する。   The power supply unit 19 supplies power to each unit of the terminal device 10.

図2は、一実施形態に係るICカード20の構成例を示す。
図2に示すように、ICカード20は、例えば、矩形状の本体21と、本体21内に内蔵されたICモジュール22とを備える。ICモジュール22は、ICチップ23と、共振部(アンテナ)24とを備える。ICチップ23と共振部24とは、互いに接続された状態でICモジュール22内に形成されている。
FIG. 2 shows a configuration example of the IC card 20 according to one embodiment.
As shown in FIG. 2, the IC card 20 includes, for example, a rectangular main body 21 and an IC module 22 built in the main body 21. The IC module 22 includes an IC chip 23 and a resonance unit (antenna) 24. The IC chip 23 and the resonance unit 24 are formed in the IC module 22 in a state where they are connected to each other.

なお、本体21は、少なくとも共振部24が配設されるICモジュール22を設置可能な形状であれば、矩形状に限らず如何なる形状であっても良い。   The main body 21 is not limited to a rectangular shape, and may have any shape as long as the IC module 22 in which at least the resonating portion 24 is disposed can be installed.

ICチップ23は、CPU25、ROM26、RAM27、不揮発性メモリ28、送受信部29、電源部31、及びロジック部32などを備える。CPU25、ROM26、RAM27、不揮発性メモリ28、送受信部29、電源部31、及びロジック部32は、バスを介して互いに接続されている。   The IC chip 23 includes a CPU 25, a ROM 26, a RAM 27, a nonvolatile memory 28, a transmission / reception unit 29, a power supply unit 31, a logic unit 32, and the like. The CPU 25, the ROM 26, the RAM 27, the nonvolatile memory 28, the transmission / reception unit 29, the power supply unit 31, and the logic unit 32 are connected to each other via a bus.

共振部24は、端末装置(外部機器)10の共振部16と通信を行うためのインターフェースである。共振部24は、例えば、ICモジュール22内に所定の形状で配設される金属線により構成されるアンテナコイルを備える。   The resonance unit 24 is an interface for communicating with the resonance unit 16 of the terminal device (external device) 10. The resonating unit 24 includes, for example, an antenna coil configured by a metal wire disposed in a predetermined shape in the IC module 22.

ICカード20は、端末装置10に送信するデータに応じてアンテナコイルにより磁界を発生させる。これにより、ICカード20は、端末装置10に対してデータを送信することができる。また、ICカード20は、電磁誘導によりアンテナコイルに発生する誘導電流に基づいて端末装置10から送信されるデータを認識する。   The IC card 20 generates a magnetic field by the antenna coil in accordance with data transmitted to the terminal device 10. Thereby, the IC card 20 can transmit data to the terminal device 10. Further, the IC card 20 recognizes data transmitted from the terminal device 10 based on the induced current generated in the antenna coil by electromagnetic induction.

CPU25は、ICカード20全体の制御を司る制御部として機能する。CPU25は、ROM26あるいは不揮発性メモリ28に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。例えば、端末装置10から受信したコマンドに応じて種々の処理を行い、処理結果としてのレスポンスなどのデータの生成を行なう。   The CPU 25 functions as a control unit that controls the entire IC card 20. The CPU 25 performs various processes based on the control program and control data stored in the ROM 26 or the nonvolatile memory 28. For example, various processes are performed in accordance with commands received from the terminal device 10 and data such as responses as processing results is generated.

ROM26は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。ROM26は、製造段階で制御プログラム及び制御データなどを記憶した状態でICカード20内に組み込まれる。即ち、ROM26に記憶される制御プログラム及び制御データは、予めICカード20の仕様に応じて組み込まれる。   The ROM 26 is a non-volatile memory that stores a control program and control data in advance. The ROM 26 is incorporated in the IC card 20 in a state where a control program, control data, and the like are stored at the manufacturing stage. That is, the control program and control data stored in the ROM 26 are incorporated in advance according to the specifications of the IC card 20.

RAM27は、ワーキングメモリとして機能する揮発性のメモリである。RAM27は、CPU25の処理中のデータなどを一時的に格納する。例えば、RAM27は、共振部24を介して端末装置10から受信したデータを一時的に格納する。またRAM27は、共振部24を介して端末装置10に送信するデータを一時的に格納する。またさらに、RAM27は、CPU25が実行するプログラムを一時的に格納する。   The RAM 27 is a volatile memory that functions as a working memory. The RAM 27 temporarily stores data being processed by the CPU 25. For example, the RAM 27 temporarily stores data received from the terminal device 10 via the resonance unit 24. The RAM 27 temporarily stores data to be transmitted to the terminal device 10 via the resonance unit 24. Furthermore, the RAM 27 temporarily stores a program executed by the CPU 25.

不揮発性メモリ28は、例えば、EEPROMあるいはフラッシュROMなどのデータの書き込み及び書換えが可能な不揮発性のメモリを備える。不揮発性メモリ28は、ICカード20の運用用途に応じて制御プログラム及び種々のデータを格納する。   The non-volatile memory 28 includes a non-volatile memory capable of writing and rewriting data, such as an EEPROM or a flash ROM. The nonvolatile memory 28 stores a control program and various data according to the usage application of the IC card 20.

たとえば、不揮発性メモリ28では、プログラムファイル及びデータファイルなどが創成される。創成された各ファイルには、制御プログラム及び種々のデータなどが書き込まれる。CPU25は、不揮発性メモリ28、または、ROM26に記憶されているプログラムを実行することにより、種々の処理を実現することができる。   For example, in the nonvolatile memory 28, a program file and a data file are created. A control program and various data are written in each created file. The CPU 25 can implement various processes by executing programs stored in the nonvolatile memory 28 or the ROM 26.

送受信部29は、端末装置10に送信するデータに対して符号化、負荷変調などの信号処理を行う。例えば、送受信部29は、端末装置10に送信するデータの変調(増幅)を行う。送受信部29は、信号処理を施したデータを共振部24に送信する。   The transmission / reception unit 29 performs signal processing such as encoding and load modulation on the data transmitted to the terminal device 10. For example, the transmission / reception unit 29 modulates (amplifies) data to be transmitted to the terminal device 10. The transmission / reception unit 29 transmits the data subjected to signal processing to the resonance unit 24.

また、送受信部29は、共振部24により受信する信号に対して復調、及び復号を行う。例えば、送受信部29は、共振部24により受信する信号の解析を行う。これにより、送受信部29は、2値の論理データを取得する。送受信部29は、解析したデータをバスを介してCPU25に送信する。   The transmission / reception unit 29 demodulates and decodes the signal received by the resonance unit 24. For example, the transmission / reception unit 29 analyzes a signal received by the resonance unit 24. As a result, the transmission / reception unit 29 acquires binary logical data. The transmission / reception unit 29 transmits the analyzed data to the CPU 25 via the bus.

電源部31は、共振部24により受け取られた電波(例えばキャリア波)に基づいて電力を生成する。さらに、電源部31は、動作クロックを生成する。電源部31は、生成した電力及び動作クロックをICカード20の各部に供給する。ICカード20の各部は、電力の供給を受けた場合、動作可能な状態になる。   The power supply unit 31 generates power based on radio waves (for example, carrier waves) received by the resonance unit 24. Furthermore, the power supply unit 31 generates an operation clock. The power supply unit 31 supplies the generated power and operation clock to each unit of the IC card 20. Each unit of the IC card 20 becomes operable when supplied with power.

ロジック部32は、演算処理をハードウエアにより行う演算部である。例えば、ロジック部32は、端末装置10からのコマンドに基づいて、暗号化、復号、及び乱数の生成などの処理を行う。例えば、端末装置10から相互認証コマンドを受信する場合、ロジック部32は、乱数を生成し、生成した乱数をCPU25に伝送する。   The logic unit 32 is an arithmetic unit that performs arithmetic processing by hardware. For example, the logic unit 32 performs processing such as encryption, decryption, and random number generation based on a command from the terminal device 10. For example, when receiving a mutual authentication command from the terminal device 10, the logic unit 32 generates a random number and transmits the generated random number to the CPU 25.

また、不揮発性メモリ28は、コリジョンフラグを記憶する記憶部(メモリ)28aを有する。ICカード20は、端末装置10との通信時に、コリジョンが生じたか否かに基づいてコリジョンフラグを書き換える。コリジョンが生じた場合、ICカード20は、メモリ28aのコリジョンフラグを「ON」に書き換える。また、コリジョンが生じなかった場合、ICカード20は、メモリ28aのコリジョンフラグを「OFF」に書き換える。   Further, the nonvolatile memory 28 includes a storage unit (memory) 28a that stores a collision flag. The IC card 20 rewrites the collision flag based on whether or not a collision has occurred during communication with the terminal device 10. When a collision occurs, the IC card 20 rewrites the collision flag in the memory 28a to “ON”. If no collision occurs, the IC card 20 rewrites the collision flag in the memory 28a to “OFF”.

さらに、ICカード20は、アンチコリジョン処理をコリジョンフラグの「ON/OFF」に基づいて切り替える。即ち、ICカード20は、コリジョンフラグが「ON」である場合、乱数を生成し、生成した乱数に基づいてアンチコリジョンのスロットを選択する。また、ICカード20は、コリジョンフラグが「OFF」である場合、予め設定されたスロットを選択する。   Furthermore, the IC card 20 switches the anti-collision process based on “ON / OFF” of the collision flag. That is, when the collision flag is “ON”, the IC card 20 generates a random number and selects an anti-collision slot based on the generated random number. Further, the IC card 20 selects a preset slot when the collision flag is “OFF”.

図3は、端末装置10の動作の例について示す。
端末装置10は、ICカード20の検知を行なう為に、共振部16により送信する初期応答要求コマンドを生成する(ステップS11)。端末装置10は、図4に示すような初期応答要求コマンドを生成する。なお、本実施形態では、端末装置10は、スロットマーカ方式によりアンチコリジョンを行う構成であるが、タイムスロット方式、または他のスロットを要するアンチコリジョンを行う構成であってもよい。
FIG. 3 shows an example of the operation of the terminal device 10.
The terminal device 10 generates an initial response request command to be transmitted by the resonance unit 16 in order to detect the IC card 20 (step S11). The terminal device 10 generates an initial response request command as shown in FIG. In the present embodiment, the terminal device 10 is configured to perform anti-collision by the slot marker method, but may be configured to perform anti-collision that requires a time slot method or another slot.

図4は、初期応答要求コマンドの例を示す。図4により示されるように、初期応答要求コマンドは、「APf」、「AFI」、「PARAM」、及び「CRC_B」を有する。   FIG. 4 shows an example of the initial response request command. As shown in FIG. 4, the initial response request command has “APf”, “AFI”, “PARAM”, and “CRC_B”.

APfは、初期応答要求コマンドで使用されるパラメータである。APfは、例えば1byteのデータである。   APf is a parameter used in the initial response request command. APf is, for example, 1-byte data.

AFIは、端末装置10が応用分野を特定する為に用いられる識別子である。AFIは、例えば8bit(1byte)で表現される値である。即ち、端末装置10は、初期応答要求コマンドの先頭から9bit乃至16bit目にAFIの値を設定する。   The AFI is an identifier used by the terminal device 10 to specify an application field. AFI is a value expressed by, for example, 8 bits (1 byte). That is, the terminal device 10 sets the AFI value in the 9th to 16th bits from the beginning of the initial response request command.

PARAMは、属性情報のパラメータである。PARAMは、例えば8bit(1byte)のデータである。PARAMは、コマンドの種類、及び、スロットマーカ方式またはタイムスロット方式などのアンチコリジョンで使用されるスロットの数などを示す。   PARAM is a parameter of attribute information. PARAM is, for example, 8-bit (1 byte) data. PARAM indicates the type of command and the number of slots used in anti-collision such as a slot marker method or a time slot method.

CRC_Bは、巡回冗長検査符号である。CRC_Bは、例えば、16bit(2byte)で表現される値である。CRC_Bは、CRC_Bを含むコマンドをキャラクタとして有するフレーム内のデータビットから計算される値である。ICカード20は、受信したコマンドのCRC_Bを用いて、受信したコマンドが正常に伝送されたものであるか否かを判断する。   CRC_B is a cyclic redundancy check code. CRC_B is a value expressed by 16 bits (2 bytes), for example. CRC_B is a value calculated from data bits in a frame having a command including CRC_B as a character. The IC card 20 determines whether or not the received command is normally transmitted using the CRC_B of the received command.

さらに、図4に示すPARAMは、例えば図5により示されるような構成を備える。
図5は、PARAMの構成の例を示す。図5により示されるように、PARAMは、例えばビットb1乃至ビットb8の8ビット(1バイトにより構成される)。PARAMは、スロット数を示す情報(Number of slots)、及びREQB/WUPBを有する。
Further, the PARAM shown in FIG. 4 has a configuration as shown in FIG. 5, for example.
FIG. 5 shows an example of the configuration of the PARAM. As shown in FIG. 5, the PARAM has, for example, 8 bits (consisting of 1 byte) of bits b1 to b8. The PARAM has information (Number of slots) indicating the number of slots, and REQB / WUPB.

Number of slotsは、ビットb1乃至b3に設定されるデータである。Number of slotsは、上記したように、スロットマーカ方式またはタイムスロット方式などのアンチコリジョンで使用されるスロットの数などを示す。   Number of slots is data set in bits b1 to b3. As described above, Number of slots indicates the number of slots used in anti-collision such as the slot marker method or the time slot method.

REQB/WUPBは、ビットb4に設定されるデータである。REQB/WUPBは、当該初期応答要求コマンドが、REQBコマンド(リクエストコマンド)であるのか、WUPBコマンド(ウェークアップコマンド)であるのかを示す。   REQB / WUPB is data set in bit b4. REQB / WUPB indicates whether the initial response request command is a REQB command (request command) or a WUPB command (wake-up command).

図6は、Number of slotsの生成及び解析に用いられるテーブルの例を示す。なお、図6に示されるテーブルは、端末装置10とICカード20とが共通して備えるものである。即ち、端末装置10及びICカード20は、このテーブルに応じてコマンドの生成、及びコマンドの解析を行う。   FIG. 6 shows an example of a table used for generation and analysis of Number of slots. The table shown in FIG. 6 is provided in common for the terminal device 10 and the IC card 20. That is, the terminal device 10 and the IC card 20 perform command generation and command analysis according to this table.

図6により示されるように、テーブルは、スロット数と、スロット数に対応付けられたビットb1乃至ビットb3に対応する値とを有する。   As shown in FIG. 6, the table includes the number of slots and values corresponding to bits b1 to b3 associated with the number of slots.

例えば、端末装置10は、スロット数を1に設定する場合、初期応答要求コマンドのPARAMのビットb1乃至ビットb3に「000」をセットする。また、端末装置10は、スロット数を2に設定する場合、初期応答要求コマンドのPARAMのビットb1乃至ビットb3に「001」をセットする。また、端末装置10は、スロット数を4に設定する場合、初期応答要求コマンドのPARAMのビットb1乃至ビットb3に「010」をセットする。   For example, when the number of slots is set to 1, the terminal device 10 sets “000” in bits b1 to b3 of the PARAM of the initial response request command. Further, when the number of slots is set to 2, the terminal device 10 sets “001” to the bits b1 to b3 of the PARAM of the initial response request command. Further, when the number of slots is set to 4, the terminal device 10 sets “010” to the bits b1 to b3 of the PARAM of the initial response request command.

端末装置10は、生成した初期応答要求コマンドを共振部16により繰り返し通信可能範囲に送信する(ステップS12)。   The terminal device 10 repeatedly transmits the generated initial response request command to the communicable range by the resonance unit 16 (step S12).

さらに、端末装置10は、スロットマーカコマンドを生成する(ステップS13)。スロットマーカコマンドは、「APn」、及び「CRC_B」を備える。APnは、衝突防止用情報バイトであり、スロットの番号を示す情報を含む。CRC_Bは、上記したように、巡回冗長検査符号である。端末装置10は、設定された各スロット毎にスロットマーカコマンドを生成する。   Further, the terminal device 10 generates a slot marker command (step S13). The slot marker command includes “APn” and “CRC_B”. APn is a collision prevention information byte and includes information indicating a slot number. CRC_B is a cyclic redundancy check code as described above. The terminal device 10 generates a slot marker command for each set slot.

端末装置10は、生成したスロットマーカコマンドを共振部16によりICカード20に送信する(ステップS14)。端末装置10は、各スロットの先頭となるタイミングで各スロットマーカコマンドをICカード20に送信する。これにより、端末装置10は、各スロットの先頭をICカード20に通知することができる。   The terminal device 10 transmits the generated slot marker command to the IC card 20 by the resonance unit 16 (step S14). The terminal device 10 transmits each slot marker command to the IC card 20 at a timing that is the head of each slot. Thereby, the terminal device 10 can notify the IC card 20 of the head of each slot.

ICカード20は、端末装置10の共振部16の通信可能範囲内に進入する場合、活性化されてアイドル状態になる。ICカード20は、初期応答要求コマンドを受信する。さらに、ICカード20は、スロットマーカコマンドを受信する。   When the IC card 20 enters the communicable range of the resonance unit 16 of the terminal device 10, the IC card 20 is activated and enters an idle state. The IC card 20 receives the initial response request command. Further, the IC card 20 receives a slot marker command.

ICカード20のCPU25は、受信した初期応答要求コマンドを解析する。ICカード20は、初期応答要求コマンドの「APf」、「AFI」、「PARAM」、及び「CRC_B」のそれぞれの値を認識する。ICカード20は、スロットを選択し、選択したスロットを示すスロットマーカコマンドを受信した場合、初期応答要求コマンドに対するレスポンスを端末装置10に送信する。   The CPU 25 of the IC card 20 analyzes the received initial response request command. The IC card 20 recognizes the values of “APf”, “AFI”, “PARAM”, and “CRC_B” of the initial response request command. When the IC card 20 selects a slot and receives a slot marker command indicating the selected slot, the IC card 20 transmits a response to the initial response request command to the terminal device 10.

端末装置10は、ICカード20から送信された初期応答要求コマンドに対するレスポンスを受信する(ステップS15)。   The terminal device 10 receives a response to the initial response request command transmitted from the IC card 20 (step S15).

ICカード20から送信されるレスポンスは、「APa」、「PUPI」、「応用データ」、「プロトコル情報」及び「CRC_B」を有する。   The response transmitted from the IC card 20 includes “APa”, “PUPI”, “application data”, “protocol information”, and “CRC_B”.

APaは、初期応答要求コマンドに対するレスポンス(初期応答)で使用されるパラメータである。APaは、例えば1byteのデータである。   APa is a parameter used in a response (initial response) to the initial response request command. APa is, for example, 1-byte data.

PUPIは、擬似固有ICカード(PICC)識別子である。PUPIは、端末装置10側からICカード20を識別するために使用される。PUPIは、例えば、4byteのデータである。PUPIは、ROM26、または不揮発性メモリ28に記憶されている値であるが、乱数などが代用されてもよい。   PUPI is a pseudo unique IC card (PICC) identifier. PUPI is used to identify the IC card 20 from the terminal device 10 side. PUPI is, for example, 4-byte data. The PUPI is a value stored in the ROM 26 or the nonvolatile memory 28, but a random number or the like may be substituted.

応用データは、ICカード20にどのようなアプリケーションが書き込まれているかを端末装置10に伝える為のデータである。応用データは、例えば4byteのデータである。   The application data is data for informing the terminal device 10 what application is written in the IC card 20. The application data is, for example, 4-byte data.

プロトコル情報は、ICカード20がサポートする応用プロトコルの状態を表す。例えば、プロトコル情報は、ICカード20がサポートする通信速度を示す情報を含む。プロトコル情報は、例えば3byteのデータである。   The protocol information represents the state of an application protocol supported by the IC card 20. For example, the protocol information includes information indicating a communication speed supported by the IC card 20. The protocol information is, for example, 3 bytes of data.

CRC_Bは、上記したように巡回冗長検査符号である。   CRC_B is a cyclic redundancy check code as described above.

端末装置10は、初期応答要求コマンドに対するレスポンス(初期応答)を受信する場合、受信したレスポンスを解析する。これにより、端末装置10は、自身の通信可能範囲内にICカード20が存在することを認識する(ステップS16)。   When receiving a response (initial response) to the initial response request command, the terminal device 10 analyzes the received response. Thereby, the terminal device 10 recognizes that the IC card 20 exists within its own communicable range (step S16).

さらに、端末装置10は、ATTRIBコマンドをICカード20に送信することにより、ICカード20を選択する。これ以降、端末装置10は、ICカード20と通常の処理を行う(ステップS17)。   Further, the terminal device 10 selects the IC card 20 by transmitting an ATTRIB command to the IC card 20. Thereafter, the terminal device 10 performs normal processing with the IC card 20 (step S17).

なお、端末装置10は、ICカード20から送信されたレスポンスを受信する際にコリジョンが生じた場合、再度初期応答要求コマンドをICカード20に送信する。   Note that the terminal device 10 transmits an initial response request command to the IC card 20 again when a collision occurs when the response transmitted from the IC card 20 is received.

図7は、ICカード20の処理の例を示す。
ICカード20は、端末装置10の共振部16の通信可能範囲内に進入する場合、活性化されてアイドル状態になる。さらに、ICカード20は、初期応答要求コマンドを受信する(ステップS31)。
FIG. 7 shows an example of processing of the IC card 20.
When the IC card 20 enters the communicable range of the resonance unit 16 of the terminal device 10, the IC card 20 is activated and enters an idle state. Further, the IC card 20 receives an initial response request command (step S31).

ICカード20は、受信した初期応答要求コマンドを解析する(ステップS32)。これにより、ICカード20は、初期応答要求コマンドの「APf」、「AFI」、「PARAM」、及び「CRC_B」のそれぞれの値を認識する。さらに、ICカード20は、受信した初期応答要求コマンドに対するレスポンス(初期応答)を生成する。   The IC card 20 analyzes the received initial response request command (step S32). As a result, the IC card 20 recognizes the values of the initial response request commands “APf”, “AFI”, “PARAM”, and “CRC_B”. Furthermore, the IC card 20 generates a response (initial response) to the received initial response request command.

また、ICカード20は、「PARAM」の値に基づいて、スロットの数を認識する。ICカード20は、スロット数が1であるか否か判定する(ステップS33)。   Further, the IC card 20 recognizes the number of slots based on the value of “PARAM”. The IC card 20 determines whether the number of slots is 1 (step S33).

ステップS33で、スロット数が1ではないと判定した場合、ICカード20は、不揮発性メモリ28のメモリ28aにより記憶されているコリジョンフラグを読み出す(ステップS34)。さらに、ICカード20は、コリジョンフラグが「ON」であるか「OFF」であるか判定する(ステップS35)。   If it is determined in step S33 that the number of slots is not 1, the IC card 20 reads the collision flag stored in the memory 28a of the nonvolatile memory 28 (step S34). Further, the IC card 20 determines whether the collision flag is “ON” or “OFF” (step S35).

ステップS35でコリジョンフラグが「ON」ではない(即ち「OFF」)と判定した場合、ICカード20は、最初のスロットで初期応答を端末装置10に送信する(ステップS36)。   If it is determined in step S35 that the collision flag is not “ON” (that is, “OFF”), the IC card 20 transmits an initial response to the terminal device 10 in the first slot (step S36).

ステップS35でコリジョンフラグが「OFF」であると判定した場合、ICカード20は、予め設定されたスロットを選択する。ICカード20は、選択したスロットで初期応答を共振部24により端末装置10に送信する。即ち、ICカード20は、選択したスロットを示すスロットマーカコマンドを受信した場合、初期応答を共振部24により端末装置10に送信する。   If it is determined in step S35 that the collision flag is “OFF”, the IC card 20 selects a preset slot. The IC card 20 transmits an initial response to the terminal device 10 through the resonance unit 24 in the selected slot. That is, when the IC card 20 receives a slot marker command indicating the selected slot, the IC card 20 transmits an initial response to the terminal device 10 through the resonance unit 24.

「OFF」のコリジョンフラグは、ICカード20の前回(最後)の通信時にコリジョンが発生しなかったことを示す。即ち、どのスロットで初期応答を端末装置10に送信してもコリジョンが発生しないことが期待される。   The “OFF” collision flag indicates that no collision occurred during the previous (last) communication of the IC card 20. That is, it is expected that no collision occurs even if the initial response is transmitted to the terminal device 10 in any slot.

ICカード20は、例えば、最初のスロットで初期応答を端末装置10に送信するように予め設定される。これにより、ICカード20は、コリジョンを発生させずに、より早いタイミングで初期応答要求コマンドに対する初期応答を端末装置10に送信することが出来る。   For example, the IC card 20 is set in advance to transmit an initial response to the terminal device 10 in the first slot. Thereby, the IC card 20 can transmit an initial response to the initial response request command to the terminal device 10 at an earlier timing without causing a collision.

また、ステップS35でコリジョンフラグが「ON」であると判定した場合、ICカード20は、乱数を生成する(ステップS37)。ICカード20は、例えば、ロジック部32により乱数を生成する。   If it is determined in step S35 that the collision flag is “ON”, the IC card 20 generates a random number (step S37). For example, the IC card 20 generates a random number by the logic unit 32.

ICカード20は、生成された乱数に基づいてスロットを選択する(ステップS38)。例えば、ICカード20は、ステップS32で認識したスロット数と、生成された乱数とに基づいて、1つのスロットを選択する。ICカード20は、例えば、生成された乱数を、認識したスロット数以下の整数に変換し、変換した値に対応するスロットを選択する。   The IC card 20 selects a slot based on the generated random number (step S38). For example, the IC card 20 selects one slot based on the number of slots recognized in step S32 and the generated random number. For example, the IC card 20 converts the generated random number into an integer equal to or less than the recognized number of slots, and selects a slot corresponding to the converted value.

ICカード20は、選択したスロットで初期応答を共振部24により端末装置10に送信する(ステップS39)。即ち、ICカード20は、選択したスロットを示すスロットマーカコマンドを受信した場合、初期応答を共振部24により端末装置10に送信する。   The IC card 20 transmits an initial response to the terminal device 10 through the resonance unit 24 in the selected slot (step S39). That is, when the IC card 20 receives a slot marker command indicating the selected slot, the IC card 20 transmits an initial response to the terminal device 10 through the resonance unit 24.

また、ステップS33で、ステップ数が1であると判定した場合、ICカード20は、端末装置10によりアンチコリジョンが行われないことを認識する。この場合、ICカード20は、通常処理を行う(ステップS40)。即ち、ICカード20は、任意、または予め設定されたタイミングで初期応答を共振部24により端末装置10に送信する。   If it is determined in step S33 that the number of steps is 1, the IC card 20 recognizes that the terminal device 10 does not perform anti-collision. In this case, the IC card 20 performs normal processing (step S40). That is, the IC card 20 transmits an initial response to the terminal device 10 by the resonance unit 24 at an arbitrary or preset timing.

さらに、ICカード20は、コリジョンが発生したか否か判定する(ステップS41)。例えば、ICカード20は、起動中に複数回初期応答要求コマンドを受信した場合、コリジョンが発生したと判定する。また、ICカード20は、初期応答要求コマンドのPARAMのNumber of slotsが2以上である場合、コリジョンが発生したと判定する構成であってもよい。   Further, the IC card 20 determines whether or not a collision has occurred (step S41). For example, the IC card 20 determines that a collision has occurred when receiving an initial response request command a plurality of times during startup. Further, the IC card 20 may be configured to determine that a collision has occurred when the number of slots in the PARAM of the initial response request command is 2 or more.

またさらに、ICカード20は、他のICカードから初期応答が送信されたことを検出した場合にコリジョンが発生したと判定する構成であってもよい。ICカード20からデータが無線通信により送信される場合、ICカード20が存在する空間の磁界が変化する。即ち、ICカード20は、共振部24に生じる誘導電流の変化を検出することにより、他のICカード20からデータが送信されたか否かを検出することができる。   Furthermore, the IC card 20 may be configured to determine that a collision has occurred when it is detected that an initial response has been transmitted from another IC card. When data is transmitted from the IC card 20 by wireless communication, the magnetic field in the space where the IC card 20 exists changes. That is, the IC card 20 can detect whether data is transmitted from another IC card 20 by detecting a change in the induced current generated in the resonance unit 24.

ステップS41で、コリジョンが発生しなかったと判定した場合、ICカード20は、コリジョンフラグを「OFF」に書き換える(ステップS42)。即ち、ICカード20は、ICカード20の最後の通信時にコリジョンが発生しなかったことを示す情報を不揮発性メモリ28のメモリ28aに記憶する。   If it is determined in step S41 that no collision has occurred, the IC card 20 rewrites the collision flag to “OFF” (step S42). That is, the IC card 20 stores information indicating that no collision has occurred during the last communication of the IC card 20 in the memory 28 a of the nonvolatile memory 28.

また、ステップS41で、コリジョンが発生したと判定した場合、ICカード20は、コリジョンフラグを「ON」に書き換える(ステップS43)。即ち、ICカード20は、ICカード20の最後の通信時にコリジョンが発生したことを示す情報を不揮発性メモリ28のメモリ28aに記憶する。   If it is determined in step S41 that a collision has occurred, the IC card 20 rewrites the collision flag to “ON” (step S43). That is, the IC card 20 stores information indicating that a collision has occurred in the last communication of the IC card 20 in the memory 28 a of the nonvolatile memory 28.

さらに、ICカード20は、端末装置10から送信されるATTRIBコマンドに基づいて、端末装置10との間で通信路を確立する。これ以降、端末装置10とICカード20とは、通常のコマンドに応じた処理を行うことができる。   Furthermore, the IC card 20 establishes a communication path with the terminal device 10 based on the ATTRIB command transmitted from the terminal device 10. Thereafter, the terminal device 10 and the IC card 20 can perform processing according to a normal command.

上記したように、一実施形態に係るICカード20は、最後の通信時にコリジョンが発生したか否かを示す情報を記憶するメモリを備えている。即ち、ICカード20のメモリ28aは、アンチコリジョンにおける最初のスロットを選択するか否かを示す情報(コリジョンフラグ)を記憶する。ICカード20は、端末装置10との通信時に、コリジョンフラグを参照し、最初のスロットを選択するか否か判断する。   As described above, the IC card 20 according to an embodiment includes a memory that stores information indicating whether or not a collision has occurred during the last communication. That is, the memory 28a of the IC card 20 stores information (collision flag) indicating whether or not to select the first slot in anti-collision. The IC card 20 determines whether or not to select the first slot by referring to the collision flag when communicating with the terminal device 10.

これにより、ICカード20は、他のICカードとのコリジョンが発生しない場合に、より早く初期応答を端末装置10に送信することができる。この結果、より速く非接触通信を行う事ができるICカード、ICカードの制御方法を提供することができる。   Thereby, the IC card 20 can transmit the initial response to the terminal device 10 earlier when the collision with another IC card does not occur. As a result, it is possible to provide an IC card and an IC card control method capable of performing non-contact communication faster.

なお、上記した実施形態では、ICカード20は、コリジョンが発生したか否かに基づいてコリジョンフラグを書き換える構成として説明したが、この構成に限定されない。ICカード20は、端末装置10から送信される所定のコマンドに基づいてメモリ28aのコリジョンフラグを書き換える構成であってもよい。   In the above-described embodiment, the IC card 20 has been described as a configuration in which the collision flag is rewritten based on whether or not a collision has occurred. However, the present invention is not limited to this configuration. The IC card 20 may be configured to rewrite the collision flag in the memory 28 a based on a predetermined command transmitted from the terminal device 10.

また、メモリ28aのコリジョンフラグは、例えばICカード20の発行時などに予め書き込まれるものであってもよい。この場合、コリジョンフラグを記憶するメモリ28aは、ROM26内に含まれていても良い。   The collision flag in the memory 28a may be written in advance when the IC card 20 is issued, for example. In this case, the memory 28 a that stores the collision flag may be included in the ROM 26.

このような構成によると、ユーザの意図に応じてICカード20の制御方法を変えることができる。   According to such a configuration, the control method of the IC card 20 can be changed according to the user's intention.

また、ICカード20は、コリジョンフラグを端末装置10に通知する構成であってもよい。例えば、ICカード20は、コリジョンフラグに応じた情報を初期応答に付加する。これにより、端末装置10は、より早い段階でコリジョンが発生する可能性があるか否かを認識することができる。例えば、コリジョンが発生する可能性がないと判断した場合、端末装置10は、スロットマーカコマンドを短縮することができる。これにより、ICカード20を処理する端末装置10は、より早くICカード20との通信路を確立することができる。   Further, the IC card 20 may be configured to notify the terminal device 10 of the collision flag. For example, the IC card 20 adds information corresponding to the collision flag to the initial response. Thereby, the terminal device 10 can recognize whether or not a collision may occur at an earlier stage. For example, if it is determined that there is no possibility of collision, the terminal device 10 can shorten the slot marker command. Thereby, the terminal device 10 that processes the IC card 20 can establish a communication path with the IC card 20 earlier.

なお、上述の各実施の形態で説明した機能は、ハードウエアを用いて構成するに留まらず、ソフトウエアを用いて各機能を記載したプログラムをコンピュータに読み込ませて実現することもできる。また、各機能は、適宜ソフトウエア、ハードウエアのいずれかを選択して構成するものであっても良い。   It should be noted that the functions described in the above embodiments are not limited to being configured using hardware, but can be realized by causing a computer to read a program describing each function using software. Each function may be configured by appropriately selecting either software or hardware.

なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組み合せてもよい。   Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Further, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, you may combine suitably the component covering different embodiment.

1…ICカード処理システム、10…端末装置、12…ROM、13…RAM、14…不揮発性メモリ、14a…記憶部、15…送受信部、16…共振部、17…ロジック部、18…上位インターフェース、19…電源部、20…ICカード、21…本体、22…ICモジュール、23…ICチップ、24…共振部、25…CPU、26…ROM、27…RAM、28…不揮発性メモリ、28a…記憶部、29…送受信部、31…電源部、32…ロジック部。   DESCRIPTION OF SYMBOLS 1 ... IC card processing system, 10 ... Terminal device, 12 ... ROM, 13 ... RAM, 14 ... Nonvolatile memory, 14a ... Memory | storage part, 15 ... Transmission / reception part, 16 ... Resonance part, 17 ... Logic part, 18 ... Host interface , 19 ... Power supply unit, 20 ... IC card, 21 ... Main body, 22 ... IC module, 23 ... IC chip, 24 ... Resonance unit, 25 ... CPU, 26 ... ROM, 27 ... RAM, 28 ... Non-volatile memory, 28a ... Storage unit, 29 ... transmission / reception unit, 31 ... power supply unit, 32 ... logic unit.

Claims (6)

外部機器と非接触通信を行うICカードであって、
前記外部機器から送信された初期応答要求コマンドを受信する受信部と、
前記受信部により受信された前記初期応答要求コマンドを解析し、前記初期応答要求コマンドにより示されたアンチコリジョンのための複数のスロットを認識する解析部と、
前記初期応答要求コマンドに対するレスポンスを生成するコマンド処理部と、
前記外部機器との最後の非接触通信時にコリジョンが生じなかったことを示すフラグを記憶する不揮発性メモリと、
前記不揮発性メモリにより前記フラグが記憶されている場合、前記解析部により認識した複数のスロットのうちの最初のスロットを選択する第1のスロット選択部と、
前記不揮発性メモリにより前記フラグが記憶されていない場合、前記解析部により認識した複数のスロットのうちの1つを選択する第2のスロット選択部と、
前記第1のスロット選択部または第2のスロット選択部により選択されたスロットで前記コマンド処理部により生成された前記レスポンスを前記外部機器に送信する送信部と、
前記送信部により前記レスポンスを前記外部機器に送信する際の前記コリジョンを検出し、前記コリジョンが検出されなかった場合、前記フラグを前記不揮発性メモリに書き込み、前記コリジョンが検出された場合、前記不揮発性メモリにより記憶されている前記フラグを削除するコリジョン検出部と、
を具備し、
前記コリジョン検出部は、前記初期応答要求コマンドを複数回受信した場合、前記コリジョンを検出するICカード。
An IC card that performs non-contact communication with an external device,
A receiving unit for receiving an initial response request command transmitted from the external device;
Analyzing the initial response request command received by the receiving unit, and recognizing a plurality of slots for anti-collision indicated by the initial response request command;
A command processing unit for generating a response to the initial response request command;
A non- volatile memory that stores a flag indicating that no collision occurred during the last contactless communication with the external device ;
When the flag is stored in the nonvolatile memory, a first slot selection unit that selects a first slot among a plurality of slots recognized by the analysis unit;
A second slot selection unit that selects one of a plurality of slots recognized by the analysis unit when the flag is not stored by the nonvolatile memory;
A transmission unit for transmitting the response generated by the command processing unit in the slot selected by the first slot selection unit or the second slot selection unit to the external device;
The collision is detected when the response is transmitted to the external device by the transmission unit, and when the collision is not detected, the flag is written in the nonvolatile memory, and when the collision is detected, the nonvolatile A collision detection unit for deleting the flag stored in the memory,
Equipped with,
The collision detection unit is an IC card that detects the collision when the initial response request command is received a plurality of times .
前記コリジョン検出部は、前記解析部により認識したスロットの数が複数である場合、前記コリジョンを検出する請求項に記載のICカード。 The collision detection unit, when the number of slots recognized by the analyzing section is a plurality, IC card according to claim 1 for detecting the collision. 前記第2のスロット選択部は、乱数を生成し、生成した前記乱数に基づいて、前記解析部により認識した複数のスロットのうちの1つを選択する請求項1に記載のICカード。   2. The IC card according to claim 1, wherein the second slot selection unit generates a random number and selects one of the plurality of slots recognized by the analysis unit based on the generated random number. 前記不揮発性メモリは、前記外部機器から受信したコマンドに応じて前記フラグを書き換える請求項1に記載のICカード。 The IC card according to claim 1, wherein the nonvolatile memory rewrites the flag in accordance with a command received from the external device. 前記各部を備えるICモジュールと、
前記ICモジュールが配設される本体と、
を具備する請求項1に記載のICカード。
An IC module comprising the above-mentioned parts;
A main body on which the IC module is disposed;
The IC card according to claim 1, comprising:
不揮発性メモリを具備し、外部機器と非接触通信を行うICカードの制御方法であって、
前記外部機器から送信された初期応答要求コマンドを受信し、
前記初期応答要求コマンドを解析し、前記初期応答要求コマンドにより示されたアンチコリジョンのための複数のスロットを認識し、
前記初期応答要求コマンドに対するレスポンスを生成し、
前記外部機器との最後の非接触通信時にコリジョンが生じなかったことを示すフラグ前記不揮発性メモリにより記憶されているか否か判定し、
前記不揮発性メモリにより前記フラグが記憶されている場合、認識した複数のスロットのうちの最初のスロットを選択し、
前記不揮発性メモリにより前記フラグが記憶されていない場合、認識した複数のスロットのうちの1つを選択し、
選択されたスロットで前記レスポンスを前記外部機器に送信する、
前記初期応答要求コマンドを複数回受信した場合、前記レスポンスを前記外部機器に送信する際の前記コリジョンを検出し、
前記コリジョンが検出されなかった場合、前記フラグを前記不揮発性メモリに書き込み、前記コリジョンが検出された場合、前記不揮発性メモリにより記憶されている前記フラグを削除するICカードの制御方法。
A method for controlling an IC card having a non-volatile memory and performing non-contact communication with an external device,
Receiving an initial response request command transmitted from the external device;
Analyzing the initial response request command and recognizing a plurality of slots for anti-collision indicated by the initial response request command;
Generating a response to the initial response request command;
Determining whether or not a flag indicating that no collision occurred during the last contactless communication with the external device is stored in the nonvolatile memory ;
If the flag is stored by the non-volatile memory, select the first slot among the plurality of recognized slots,
If the flag is not stored by the non-volatile memory, select one of the recognized slots,
Sending the response to the external device in the selected slot;
When receiving the initial response request command multiple times, detecting the collision when transmitting the response to the external device,
An IC card control method for writing the flag to the nonvolatile memory when the collision is not detected, and deleting the flag stored in the nonvolatile memory when the collision is detected .
JP2011141097A 2011-06-24 2011-06-24 IC card and control method of IC card Active JP5684059B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011141097A JP5684059B2 (en) 2011-06-24 2011-06-24 IC card and control method of IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011141097A JP5684059B2 (en) 2011-06-24 2011-06-24 IC card and control method of IC card

Publications (2)

Publication Number Publication Date
JP2013008241A JP2013008241A (en) 2013-01-10
JP5684059B2 true JP5684059B2 (en) 2015-03-11

Family

ID=47675532

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011141097A Active JP5684059B2 (en) 2011-06-24 2011-06-24 IC card and control method of IC card

Country Status (1)

Country Link
JP (1) JP5684059B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11306298A (en) * 1998-04-22 1999-11-05 Nippon Steel Corp Data carrier system
JP4378643B2 (en) * 2005-08-01 2009-12-09 ソニー株式会社 COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM

Also Published As

Publication number Publication date
JP2013008241A (en) 2013-01-10

Similar Documents

Publication Publication Date Title
US20140189223A1 (en) Ic card, portable electronic device, and method of controlling ic card
JP2011022841A (en) Processing system for portable electronic apparatus, portable electronic apparatus, and processing apparatus for portable electronic apparatus
JP2012208910A (en) Portable electronic device and processing system for portable electronic device
JP6092342B2 (en) Non-contact portable electronic device and method for issuing non-contact portable electronic device
JP5684059B2 (en) IC card and control method of IC card
JP2012194698A (en) Portable electronic device, processing device for portable electronic device, and processing system of portable electronic device
JP5693824B2 (en) IC card processing device, IC card, and IC card processing system
JP5892818B2 (en) Portable electronic device and control program for portable electronic device
JP5490044B2 (en) Portable electronic device and method for controlling portable electronic device
JP5875772B2 (en) Portable electronic device, control method for portable electronic device, and processing system for portable electronic device
US11868836B2 (en) IC card and control program for IC card
JP5957577B2 (en) IC card, portable electronic device, and IC card control method
JP5726700B2 (en) IC card and IC card processing method
JP5657440B2 (en) Portable electronic device and processing system for portable electronic device
JP5943036B2 (en) Information processing apparatus, information processing method, and program
JP5784204B2 (en) Portable electronic device and processing system for portable electronic device
JP6009854B2 (en) IC card, portable electronic device, and IC card control program
JP5684051B2 (en) Portable electronic device, IC card, and control method for portable electronic device
JP2016048575A (en) Portable electronic device and method of controlling portable electronic device
JP2012198676A (en) Portable electronic device, processor for portable electronic device, and processing system for portable electronic device
JP5762941B2 (en) IC card, portable electronic device, and IC card control program
JP2014063263A (en) Ic card, portable electronic device, and ic card reader/writer
JP5787692B2 (en) IC card, portable electronic device, and IC card control method
JP5677195B2 (en) Portable electronic device and method for controlling portable electronic device
JP6046068B2 (en) Portable electronic device and method for controlling portable electronic device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131205

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131212

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131219

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131226

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140109

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140307

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140930

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141201

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20141216

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150114

R151 Written notification of patent or utility model registration

Ref document number: 5684059

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151