JP5684059B2 - IC card and control method of IC card - Google Patents
IC card and control method of IC card Download PDFInfo
- 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
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.
しかし、処理装置の通信可能範囲内に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 .
以下、図面を参照しながら、一実施形態に係る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
図1は、一実施形態に係るICカード処理システム1の構成例を示す。
ICカード処理システム1は、ICカード20を処理する端末装置10と、ICカード20と、を備える。端末装置10とICカード20とは、上記したように非接触通信により互いに種々のデータを送受信する。
FIG. 1 shows a configuration example of an IC
The IC
端末装置10は、CPU11、ROM12、RAM13、不揮発性メモリ14、送受信部15、共振部16、ロジック部17、上位インターフェース18、及び電源部19を備える。CPU11、ROM12、RAM13、不揮発性メモリ14、送受信部15、共振部16、ロジック部17、及び上位インターフェース18は、それぞれバスを介して互いに接続されている。
The
CPU11は、端末装置10全体の制御を司る制御部として機能する。CPU11は、ROM12又は不揮発性メモリ14に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。例えば、CPU11は、送受信部15及び共振部16を介してICカード20とコマンド及びレスポンスの送受信を行う。
The
ROM12は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。RAM13は、ワーキングメモリとして機能する揮発性のメモリである。RAM13は、CPU11の処理中のデータなどを一時的に格納する。例えば、RAM13は、送受信部15及び共振部16を介して外部の機器と送受信するデータを一時的に格納する。また、RAM13は、CPU11が実行するプログラムを一時的に格納する。
The
不揮発性メモリ14は、例えばEEPROM、FRAMなどを備える。不揮発性メモリ14は、例えば、制御用のプログラム、制御データ、アプリケーション、及びアプリケーションに用いられるデータなどを記憶する。
The
送受信部15及び共振部16は、ICカード20と通信を行うためのインターフェース装置である。
The transmission /
送受信部15は、共振部16により送受信するデータに対して信号処理を施す。例えば、送受信部15は、符号化、復号、変調、及び復調を行なう。送受信部15は、符号化及び変調を施したデータを共振部16に供給する。
The transmission /
共振部16は、例えば所定の共振周波数を有するアンテナを有する。共振部16は、送受信部15から供給されるデータに応じて磁界を発生させる。これにより、端末装置10は、通信可能範囲に存在するICカード20に対してデータを非接触で送信することができる。
The
また、共振部16は、磁界を検知し、検知した磁界に応じてデータを生成する。これにより、共振部16は、データを非接触で受信することができる。共振部16は、受信したデータを送受信部15に供給する。送受信部15は、共振部16により受信したデータに対して復調及び復号を行う。これにより、端末装置10は、ICカード20から送信された元のデータを取得することができる。
The
ロジック部17は、所定の演算処理を行う。例えば、ロジック部17は、CPU11の制御に基づいて、データの暗号化、復号、及び乱数生成などの演算処理を行う。
The
上位インターフェース18は、上位端末と通信するためのインターフェースである。上位端末は、例えば操作部及び表示部などを備える。操作部は、例えば操作キーなどを備え、操作者により入力される操作に基づいて、操作信号を生成する。表示部は、種々の情報を表示する。上位インターフェース18は、上位端末からデータを受け取り、CPU11に伝送する。また、上位インターフェース18は、送受信部15及び共振部16によりICカード20から取得したデータを上位端末に伝送する構成であってもよい。
The
電源部19は、端末装置10の各部に電力を供給する。
The
図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
As shown in FIG. 2, the
なお、本体21は、少なくとも共振部24が配設されるICモジュール22を設置可能な形状であれば、矩形状に限らず如何なる形状であっても良い。
The
ICチップ23は、CPU25、ROM26、RAM27、不揮発性メモリ28、送受信部29、電源部31、及びロジック部32などを備える。CPU25、ROM26、RAM27、不揮発性メモリ28、送受信部29、電源部31、及びロジック部32は、バスを介して互いに接続されている。
The
共振部24は、端末装置(外部機器)10の共振部16と通信を行うためのインターフェースである。共振部24は、例えば、ICモジュール22内に所定の形状で配設される金属線により構成されるアンテナコイルを備える。
The
ICカード20は、端末装置10に送信するデータに応じてアンテナコイルにより磁界を発生させる。これにより、ICカード20は、端末装置10に対してデータを送信することができる。また、ICカード20は、電磁誘導によりアンテナコイルに発生する誘導電流に基づいて端末装置10から送信されるデータを認識する。
The
CPU25は、ICカード20全体の制御を司る制御部として機能する。CPU25は、ROM26あるいは不揮発性メモリ28に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。例えば、端末装置10から受信したコマンドに応じて種々の処理を行い、処理結果としてのレスポンスなどのデータの生成を行なう。
The
ROM26は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。ROM26は、製造段階で制御プログラム及び制御データなどを記憶した状態でICカード20内に組み込まれる。即ち、ROM26に記憶される制御プログラム及び制御データは、予めICカード20の仕様に応じて組み込まれる。
The
RAM27は、ワーキングメモリとして機能する揮発性のメモリである。RAM27は、CPU25の処理中のデータなどを一時的に格納する。例えば、RAM27は、共振部24を介して端末装置10から受信したデータを一時的に格納する。またRAM27は、共振部24を介して端末装置10に送信するデータを一時的に格納する。またさらに、RAM27は、CPU25が実行するプログラムを一時的に格納する。
The
不揮発性メモリ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
たとえば、不揮発性メモリ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
送受信部29は、端末装置10に送信するデータに対して符号化、負荷変調などの信号処理を行う。例えば、送受信部29は、端末装置10に送信するデータの変調(増幅)を行う。送受信部29は、信号処理を施したデータを共振部24に送信する。
The transmission /
また、送受信部29は、共振部24により受信する信号に対して復調、及び復号を行う。例えば、送受信部29は、共振部24により受信する信号の解析を行う。これにより、送受信部29は、2値の論理データを取得する。送受信部29は、解析したデータをバスを介してCPU25に送信する。
The transmission /
電源部31は、共振部24により受け取られた電波(例えばキャリア波)に基づいて電力を生成する。さらに、電源部31は、動作クロックを生成する。電源部31は、生成した電力及び動作クロックをICカード20の各部に供給する。ICカード20の各部は、電力の供給を受けた場合、動作可能な状態になる。
The
ロジック部32は、演算処理をハードウエアにより行う演算部である。例えば、ロジック部32は、端末装置10からのコマンドに基づいて、暗号化、復号、及び乱数の生成などの処理を行う。例えば、端末装置10から相互認証コマンドを受信する場合、ロジック部32は、乱数を生成し、生成した乱数をCPU25に伝送する。
The
また、不揮発性メモリ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カード20は、アンチコリジョン処理をコリジョンフラグの「ON/OFF」に基づいて切り替える。即ち、ICカード20は、コリジョンフラグが「ON」である場合、乱数を生成し、生成した乱数に基づいてアンチコリジョンのスロットを選択する。また、ICカード20は、コリジョンフラグが「OFF」である場合、予め設定されたスロットを選択する。
Furthermore, the
図3は、端末装置10の動作の例について示す。
端末装置10は、ICカード20の検知を行なう為に、共振部16により送信する初期応答要求コマンドを生成する(ステップS11)。端末装置10は、図4に示すような初期応答要求コマンドを生成する。なお、本実施形態では、端末装置10は、スロットマーカ方式によりアンチコリジョンを行う構成であるが、タイムスロット方式、または他のスロットを要するアンチコリジョンを行う構成であってもよい。
FIG. 3 shows an example of the operation of the
The
図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
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
さらに、図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
図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
端末装置10は、生成した初期応答要求コマンドを共振部16により繰り返し通信可能範囲に送信する(ステップS12)。
The
さらに、端末装置10は、スロットマーカコマンドを生成する(ステップS13)。スロットマーカコマンドは、「APn」、及び「CRC_B」を備える。APnは、衝突防止用情報バイトであり、スロットの番号を示す情報を含む。CRC_Bは、上記したように、巡回冗長検査符号である。端末装置10は、設定された各スロット毎にスロットマーカコマンドを生成する。
Further, the
端末装置10は、生成したスロットマーカコマンドを共振部16によりICカード20に送信する(ステップS14)。端末装置10は、各スロットの先頭となるタイミングで各スロットマーカコマンドをICカード20に送信する。これにより、端末装置10は、各スロットの先頭をICカード20に通知することができる。
The
ICカード20は、端末装置10の共振部16の通信可能範囲内に進入する場合、活性化されてアイドル状態になる。ICカード20は、初期応答要求コマンドを受信する。さらに、ICカード20は、スロットマーカコマンドを受信する。
When the
ICカード20のCPU25は、受信した初期応答要求コマンドを解析する。ICカード20は、初期応答要求コマンドの「APf」、「AFI」、「PARAM」、及び「CRC_B」のそれぞれの値を認識する。ICカード20は、スロットを選択し、選択したスロットを示すスロットマーカコマンドを受信した場合、初期応答要求コマンドに対するレスポンスを端末装置10に送信する。
The
端末装置10は、ICカード20から送信された初期応答要求コマンドに対するレスポンスを受信する(ステップS15)。
The
ICカード20から送信されるレスポンスは、「APa」、「PUPI」、「応用データ」、「プロトコル情報」及び「CRC_B」を有する。
The response transmitted from the
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カード20にどのようなアプリケーションが書き込まれているかを端末装置10に伝える為のデータである。応用データは、例えば4byteのデータである。
The application data is data for informing the
プロトコル情報は、ICカード20がサポートする応用プロトコルの状態を表す。例えば、プロトコル情報は、ICカード20がサポートする通信速度を示す情報を含む。プロトコル情報は、例えば3byteのデータである。
The protocol information represents the state of an application protocol supported by the
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
さらに、端末装置10は、ATTRIBコマンドをICカード20に送信することにより、ICカード20を選択する。これ以降、端末装置10は、ICカード20と通常の処理を行う(ステップS17)。
Further, the
なお、端末装置10は、ICカード20から送信されたレスポンスを受信する際にコリジョンが生じた場合、再度初期応答要求コマンドをICカード20に送信する。
Note that the
図7は、ICカード20の処理の例を示す。
ICカード20は、端末装置10の共振部16の通信可能範囲内に進入する場合、活性化されてアイドル状態になる。さらに、ICカード20は、初期応答要求コマンドを受信する(ステップS31)。
FIG. 7 shows an example of processing of the
When the
ICカード20は、受信した初期応答要求コマンドを解析する(ステップS32)。これにより、ICカード20は、初期応答要求コマンドの「APf」、「AFI」、「PARAM」、及び「CRC_B」のそれぞれの値を認識する。さらに、ICカード20は、受信した初期応答要求コマンドに対するレスポンス(初期応答)を生成する。
The
また、ICカード20は、「PARAM」の値に基づいて、スロットの数を認識する。ICカード20は、スロット数が1であるか否か判定する(ステップS33)。
Further, the
ステップ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
ステップ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
ステップ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
「OFF」のコリジョンフラグは、ICカード20の前回(最後)の通信時にコリジョンが発生しなかったことを示す。即ち、どのスロットで初期応答を端末装置10に送信してもコリジョンが発生しないことが期待される。
The “OFF” collision flag indicates that no collision occurred during the previous (last) communication of the
ICカード20は、例えば、最初のスロットで初期応答を端末装置10に送信するように予め設定される。これにより、ICカード20は、コリジョンを発生させずに、より早いタイミングで初期応答要求コマンドに対する初期応答を端末装置10に送信することが出来る。
For example, the
また、ステップS35でコリジョンフラグが「ON」であると判定した場合、ICカード20は、乱数を生成する(ステップS37)。ICカード20は、例えば、ロジック部32により乱数を生成する。
If it is determined in step S35 that the collision flag is “ON”, the
ICカード20は、生成された乱数に基づいてスロットを選択する(ステップS38)。例えば、ICカード20は、ステップS32で認識したスロット数と、生成された乱数とに基づいて、1つのスロットを選択する。ICカード20は、例えば、生成された乱数を、認識したスロット数以下の整数に変換し、変換した値に対応するスロットを選択する。
The
ICカード20は、選択したスロットで初期応答を共振部24により端末装置10に送信する(ステップS39)。即ち、ICカード20は、選択したスロットを示すスロットマーカコマンドを受信した場合、初期応答を共振部24により端末装置10に送信する。
The
また、ステップ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カード20は、コリジョンが発生したか否か判定する(ステップS41)。例えば、ICカード20は、起動中に複数回初期応答要求コマンドを受信した場合、コリジョンが発生したと判定する。また、ICカード20は、初期応答要求コマンドのPARAMのNumber of slotsが2以上である場合、コリジョンが発生したと判定する構成であってもよい。
Further, the
またさらに、ICカード20は、他のICカードから初期応答が送信されたことを検出した場合にコリジョンが発生したと判定する構成であってもよい。ICカード20からデータが無線通信により送信される場合、ICカード20が存在する空間の磁界が変化する。即ち、ICカード20は、共振部24に生じる誘導電流の変化を検出することにより、他のICカード20からデータが送信されたか否かを検出することができる。
Furthermore, the
ステップS41で、コリジョンが発生しなかったと判定した場合、ICカード20は、コリジョンフラグを「OFF」に書き換える(ステップS42)。即ち、ICカード20は、ICカード20の最後の通信時にコリジョンが発生しなかったことを示す情報を不揮発性メモリ28のメモリ28aに記憶する。
If it is determined in step S41 that no collision has occurred, the
また、ステップ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カード20は、端末装置10から送信されるATTRIBコマンドに基づいて、端末装置10との間で通信路を確立する。これ以降、端末装置10とICカード20とは、通常のコマンドに応じた処理を行うことができる。
Furthermore, the
上記したように、一実施形態に係るICカード20は、最後の通信時にコリジョンが発生したか否かを示す情報を記憶するメモリを備えている。即ち、ICカード20のメモリ28aは、アンチコリジョンにおける最初のスロットを選択するか否かを示す情報(コリジョンフラグ)を記憶する。ICカード20は、端末装置10との通信時に、コリジョンフラグを参照し、最初のスロットを選択するか否か判断する。
As described above, the
これにより、ICカード20は、他のICカードとのコリジョンが発生しない場合に、より早く初期応答を端末装置10に送信することができる。この結果、より速く非接触通信を行う事ができるICカード、ICカードの制御方法を提供することができる。
Thereby, the
なお、上記した実施形態では、ICカード20は、コリジョンが発生したか否かに基づいてコリジョンフラグを書き換える構成として説明したが、この構成に限定されない。ICカード20は、端末装置10から送信される所定のコマンドに基づいてメモリ28aのコリジョンフラグを書き換える構成であってもよい。
In the above-described embodiment, the
また、メモリ28aのコリジョンフラグは、例えばICカード20の発行時などに予め書き込まれるものであってもよい。この場合、コリジョンフラグを記憶するメモリ28aは、ROM26内に含まれていても良い。
The collision flag in the
このような構成によると、ユーザの意図に応じてICカード20の制御方法を変えることができる。
According to such a configuration, the control method of the
また、ICカード20は、コリジョンフラグを端末装置10に通知する構成であってもよい。例えば、ICカード20は、コリジョンフラグに応じた情報を初期応答に付加する。これにより、端末装置10は、より早い段階でコリジョンが発生する可能性があるか否かを認識することができる。例えば、コリジョンが発生する可能性がないと判断した場合、端末装置10は、スロットマーカコマンドを短縮することができる。これにより、ICカード20を処理する端末装置10は、より早くICカード20との通信路を確立することができる。
Further, the
なお、上述の各実施の形態で説明した機能は、ハードウエアを用いて構成するに留まらず、ソフトウエアを用いて各機能を記載したプログラムをコンピュータに読み込ませて実現することもできる。また、各機能は、適宜ソフトウエア、ハードウエアのいずれかを選択して構成するものであっても良い。 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
Claims (6)
前記外部機器から送信された初期応答要求コマンドを受信する受信部と、
前記受信部により受信された前記初期応答要求コマンドを解析し、前記初期応答要求コマンドにより示されたアンチコリジョンのための複数のスロットを認識する解析部と、
前記初期応答要求コマンドに対するレスポンスを生成するコマンド処理部と、
前記外部機器との最後の非接触通信時にコリジョンが生じなかったことを示すフラグを記憶する不揮発性メモリと、
前記不揮発性メモリにより前記フラグが記憶されている場合、前記解析部により認識した複数のスロットのうちの最初のスロットを選択する第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モジュールが配設される本体と、
を具備する請求項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:
前記外部機器から送信された初期応答要求コマンドを受信し、
前記初期応答要求コマンドを解析し、前記初期応答要求コマンドにより示されたアンチコリジョンのための複数のスロットを認識し、
前記初期応答要求コマンドに対するレスポンスを生成し、
前記外部機器との最後の非接触通信時にコリジョンが生じなかったことを示すフラグが前記不揮発性メモリにより記憶されているか否か判定し、
前記不揮発性メモリにより前記フラグが記憶されている場合、認識した複数のスロットのうちの最初のスロットを選択し、
前記不揮発性メモリにより前記フラグが記憶されていない場合、認識した複数のスロットのうちの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 .
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)
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 |
-
2011
- 2011-06-24 JP JP2011141097A patent/JP5684059B2/en active Active
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 |