JP2012194904A - Portable electronic device, ic card, and communication method applied to portable electronic device - Google Patents

Portable electronic device, ic card, and communication method applied to portable electronic device Download PDF

Info

Publication number
JP2012194904A
JP2012194904A JP2011059718A JP2011059718A JP2012194904A JP 2012194904 A JP2012194904 A JP 2012194904A JP 2011059718 A JP2011059718 A JP 2011059718A JP 2011059718 A JP2011059718 A JP 2011059718A JP 2012194904 A JP2012194904 A JP 2012194904A
Authority
JP
Japan
Prior art keywords
data
time
electronic device
portable electronic
card
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.)
Granted
Application number
JP2011059718A
Other languages
Japanese (ja)
Other versions
JP5602075B2 (en
Inventor
Yoshihisa Hanada
好久 花田
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 JP2011059718A priority Critical patent/JP5602075B2/en
Publication of JP2012194904A publication Critical patent/JP2012194904A/en
Application granted granted Critical
Publication of JP5602075B2 publication Critical patent/JP5602075B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a portable electronic device and a communication method applied to the portable electronic device which can efficiently perform communication.SOLUTION: A portable electronic device comprises: communication means; setting means; response means; and adjustment means. The communication means transmits/receives data composed of pieces of data in frame units. The setting means sets the maximum frame number which can be received and an initial value of the response start time for starting to respond to received data. At the moment when the response start time for data received by the communication means has passed, the response means transmits reception confirmation of the data. The adjustment means adjusts the response start time according to a latency time from when data is completely received by the communication means until the response start time for the data.

Description

この発明の実施形態は、ICカードなどの携帯可能電子装置、および携帯可能電子装置に用いられる通信方法に関する。   Embodiments described herein relate generally to a portable electronic device such as an IC card and a communication method used for the portable electronic device.

ICカードなどの携帯可能電子装置は、端末装置とデータ通信を行うことにより様々な処理を実行する。携帯可能電子装置と端末装置との通信方式には、フレーム単位に分けたデータを送受信するものがある。フレーム単位のデータを送受信する通信方式では、1回に送受信可能な最大フレーム数を最初に設定しておき、最大フレーム数以内のフレームでデータを送受信する。しかしながら、1回に送受信可能な最大フレーム数が固定である場合、実際に送受信するデータのサイズに応じた効率的な通信が難しいことがある。   A portable electronic device such as an IC card performs various processes by performing data communication with a terminal device. Some communication methods between portable electronic devices and terminal devices transmit and receive data divided into frame units. In a communication method for transmitting and receiving data in frame units, the maximum number of frames that can be transmitted and received at a time is set first, and data is transmitted and received in frames within the maximum number of frames. However, when the maximum number of frames that can be transmitted and received at a time is fixed, efficient communication according to the size of data that is actually transmitted and received may be difficult.

ETSI TS102613ETSI TS102613

この発明の一形態は、効率的に通信を行うことができる携帯可能電子装置、ICカードおよび携帯可能電子装置に用いられる通信方法を提供することを目的とする。   An object of one embodiment of the present invention is to provide a portable electronic device, an IC card, and a communication method used for the portable electronic device that can efficiently communicate.

この実施の形態によれば、携帯可能電子装置は、通信手段と、設定手段と、応答手段と、調整手段とを有する。通信手段は、フレーム単位のデータで構成されるデータを送受信する。設定手段は、受信可能な最大フレーム数と受信データに対する応答を開始する応答開始時間の初期値とを設定する。応答手段は、通信手段により受信するデータに対する応答開始時間が経過した時に当該データの受信確認を送信する。調整手段は、通信手段によるデータの受信完了から当該データに対する応答開始時間までの待ち時間に応じて応答開始時間を補正する。   According to this embodiment, the portable electronic device includes communication means, setting means, response means, and adjustment means. The communication means transmits and receives data composed of data in frame units. The setting means sets the maximum number of frames that can be received and an initial value of a response start time for starting a response to the received data. The response means transmits a reception confirmation of the data when the response start time for the data received by the communication means has elapsed. The adjustment unit corrects the response start time according to the waiting time from the completion of data reception by the communication unit to the response start time for the data.

図1は、ICカードおよびICカードシステムの構成例を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration example of an IC card and an IC card system. 図2は、端末装置の一例としての携帯電話機の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a mobile phone as an example of a terminal device. 図3は、タイムアウト時間の固定モードでICカードと端末装置とが送受信するフレームの例を示す図である。FIG. 3 is a diagram illustrating an example of a frame transmitted and received between the IC card and the terminal device in the fixed timeout time mode. 図4は、タイムアウト時間の調整モードでICカードと端末装置とが送受信するフレームの例を示す図である。FIG. 4 is a diagram illustrating an example of a frame transmitted and received between the IC card and the terminal device in the timeout time adjustment mode. 図5は、調整モードにおけるICカードと端末装置とによる通信手順の例を示すシーケンス図である。FIG. 5 is a sequence diagram illustrating an example of a communication procedure between the IC card and the terminal device in the adjustment mode. 図6は、ICカードにおける通信処理の流れを説明するためのフローチャートである。FIG. 6 is a flowchart for explaining the flow of communication processing in the IC card.

以下、実施の形態について図面を参照して詳細に説明する。
図1は、携帯可能電子装置としてのICカード1と端末装置2とを有するICカードシステムの構成例を示すブロック図である。
図1に示すICカードシステムは、ICカード1と端末装置2とが双方向にデータの送受信を行う通信システムである。たとえば、ICカードシステムは、ICカード1が端末装置2としての携帯電話機に装着される運用形態が想定される。このような運用形態では、端末装置2にICカード1が装着された状態でICカード1と端末装置2とがデータ通信を行う。また、ICカード1と端末装置2との通信方式は、たとえば、SWP通信などの全2重通信である。
Hereinafter, embodiments will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing a configuration example of an IC card system having an IC card 1 as a portable electronic device and a terminal device 2.
The IC card system shown in FIG. 1 is a communication system in which an IC card 1 and a terminal device 2 transmit and receive data bidirectionally. For example, the IC card system is assumed to have an operation mode in which the IC card 1 is mounted on a mobile phone as the terminal device 2. In such an operation mode, the IC card 1 and the terminal device 2 perform data communication in a state where the IC card 1 is attached to the terminal device 2. The communication method between the IC card 1 and the terminal device 2 is full duplex communication such as SWP communication.

ICカード1は、端末装置2からの電源供給により動作する。たとえば、上記ICカード1は、上記端末装置2と物理的、電気的に接触して通信を行う接触式の携帯可能電子装置(接触式ICカード)である。ただし、上記ICカード1は、アンテナあるいは無線通信部等により上記端末装置2と非接触の状態で無線通信を行う非接触式の携帯可能電子装置(非接触式ICカード)であっても良い。さらには、上記ICカード1は、非接触式ICカードとしての通信機能と接触式ICカードとしての通信機能とを有する複合型のICカード(デュアルインターフェースICカード)であっても良い。   The IC card 1 operates by supplying power from the terminal device 2. For example, the IC card 1 is a contact-type portable electronic device (contact IC card) that communicates with the terminal device 2 in physical and electrical contact. However, the IC card 1 may be a non-contact portable electronic device (non-contact IC card) that performs wireless communication in a non-contact state with the terminal device 2 using an antenna or a wireless communication unit. Furthermore, the IC card 1 may be a composite IC card (dual interface IC card) having a communication function as a non-contact IC card and a communication function as a contact IC card.

図1に示すように、上記ICカード1は、制御部(CPU)11、プログラムメモリ12、ワーキングメモリ13、データメモリ14、通信制御部15、電源部16、および、インターフェース17などを有する。
上記ICカード1は、カード状の本体Cにより構成される。上記ICカード1を形成するカード状の本体Cには、1つ(あるいは複数)のICチップ1aとインターフェース17とが埋設される。上記ICチップ1aは、制御部(CPU)11、プログラムメモリ12、ワーキングメモリ13、データメモリ14、通信制御部15および電源部16などを有している。上記ICチップ1aは、上記インターフェース17に接続された状態でモジュール化され、当該ICカード1を形成するカード状の本体C内に埋設される。
As shown in FIG. 1, the IC card 1 includes a control unit (CPU) 11, a program memory 12, a working memory 13, a data memory 14, a communication control unit 15, a power supply unit 16, an interface 17, and the like.
The IC card 1 is composed of a card-shaped main body C. One (or a plurality) of IC chips 1 a and an interface 17 are embedded in the card-like main body C forming the IC card 1. The IC chip 1a includes a control unit (CPU) 11, a program memory 12, a working memory 13, a data memory 14, a communication control unit 15, a power supply unit 16, and the like. The IC chip 1a is modularized while being connected to the interface 17, and is embedded in a card-like main body C that forms the IC card 1.

上記制御部11は、ICカード1全体の制御を司る。上記制御部11は、CPUなどのプロセッサを有する。上記制御部11は、上記プログラムメモリ12あるいはデータメモリ14に記憶されている制御プログラムおよび制御データなどに基づいて動作する。たとえば、上記制御部11は、上記プログラムメモリ12に記憶されている動作を司る制御プログラムを実行することにより、端末装置2から与えられるコマンドに応じた処理を実行する。上記制御部11は、時間を計時するタイマ11aを有する。タイマ11aは、たとえば、応答データの送信タイミングを計る。   The control unit 11 controls the entire IC card 1. The control unit 11 includes a processor such as a CPU. The control unit 11 operates based on a control program and control data stored in the program memory 12 or the data memory 14. For example, the control unit 11 executes a process according to a command given from the terminal device 2 by executing a control program that controls the operation stored in the program memory 12. The control unit 11 includes a timer 11a that measures time. For example, the timer 11a measures the transmission timing of response data.

上記プログラムメモリ12は、読み出し専用のメモリ(ROM:リードオンリーメモリ)により構成される。上記プログラムメモリ12は、当該ICカード1の仕様に応じた動作を司る制御プログラムおよび制御データなどを記憶する。   The program memory 12 is constituted by a read-only memory (ROM: read-only memory). The program memory 12 stores a control program, control data, and the like that control operations according to the specifications of the IC card 1.

上記ワーキングメモリ13は、揮発性のメモリ(RAM;ランダムアクセスメモリ)により構成される。上記ワーキングメモリ13は、データを一時保管するバッファメモリとして機能する。例えば、上記ワーキングメモリ13には、端末装置2との通信処理において、送受信されるデータを一時的に保管する通信バッファとして利用可能である。また、上記ワーキングメモリ13は、種々の書込みデータなどを一時的に保持するメモリとしても利用される。   The working memory 13 is composed of a volatile memory (RAM; random access memory). The working memory 13 functions as a buffer memory for temporarily storing data. For example, the working memory 13 can be used as a communication buffer that temporarily stores data to be transmitted and received in communication processing with the terminal device 2. The working memory 13 is also used as a memory for temporarily holding various write data.

上記データメモリ(不揮発性メモリ)14は、データの書き込みが可能な不揮発性のメモリである。上記データメモリ14は、例えば、EEPROMあるいはフラッシュメモリなどにより構成される。上記データメモリ14には、当該ICカード1の使用目的に応じた種々の情報(アプリケーションプログラムおよび運用データなど)が書込まれる。当該ICカード1が複数の使用目的に使用される場合、上記データメモリ14には、各使用目的に応じた複数のアプリケーションが記憶される。   The data memory (nonvolatile memory) 14 is a nonvolatile memory capable of writing data. The data memory 14 is composed of, for example, an EEPROM or a flash memory. In the data memory 14, various information (application program, operation data, etc.) according to the purpose of use of the IC card 1 is written. When the IC card 1 is used for a plurality of usage purposes, the data memory 14 stores a plurality of applications corresponding to the usage purposes.

上記通信制御部15は、上記インターフェース17を介して端末装置2とのデータ通信を制御するものである。当該ICカード1が接触式ICカードである場合、通信制御部15は、端末装置2と物理的・電気的に接触するコンタクト部としてのインターフェース17を介してデータを送受信する。なお、非接触型のICカードであれば、上記通信制御部15は、インターフェース17としてのアンテナにより送受信するデータを変調あるいは復調する。   The communication control unit 15 controls data communication with the terminal device 2 via the interface 17. When the IC card 1 is a contact IC card, the communication control unit 15 transmits and receives data via the interface 17 as a contact unit that physically and electrically contacts the terminal device 2. In the case of a non-contact type IC card, the communication control unit 15 modulates or demodulates data to be transmitted / received by an antenna as the interface 17.

上記電源部16は、当該ICカード1の各部を動作させるための電力およびクロックパルスを供給する。たとえば、当該ICカード1が接触型のICカードである場合、上記電源部16は、インターフェース17を介して外部装置から直接的に供給される電力およびクロックパルスを各部へ供給する。なお、当該ICカードが非接触型のICカードである場合、上記電源部16は、上記インターフェース17としてのアンテナにより受信した電波から電力およびクロックパルスを生成し、当該ICカード内の各部に供給する。   The power supply unit 16 supplies power and clock pulses for operating each unit of the IC card 1. For example, when the IC card 1 is a contact type IC card, the power supply unit 16 supplies power and clock pulses directly supplied from an external device via the interface 17 to each unit. When the IC card is a non-contact type IC card, the power supply unit 16 generates power and clock pulses from the radio wave received by the antenna as the interface 17 and supplies the power and clock pulses to each unit in the IC card. .

また、ワーキングメモリ13は、通信確立処理において設定される通信設定などの設定データを記憶する。たとえば、ワーキングメモリ13は、後述する連続伝送フレームの最大数(以下、最大フレーム数(Sliding Window size)とも称する)の設定値を記憶する。また、ワーキングメモリ13は、フレームを受信してから受信確認を送信するまでの時間(タイムアウト時間)の設定値、および、初期値を記憶する。ワーキングメモリ13は、通信確立処理において設定されるタイムアウト時間の初期値を当該通信処理が終了するまで記憶する。ただし、ワーキングメモリ13が記憶するタイムアウト時間の設定値は、現在設定されているタイムアウト時間を示すものであり、適宜更新される。   The working memory 13 stores setting data such as communication settings set in the communication establishment process. For example, the working memory 13 stores a set value of a maximum number of continuous transmission frames (hereinafter also referred to as a maximum frame number (Sliding Window size)). In addition, the working memory 13 stores a set value and an initial value of a time (timeout time) from when a frame is received until reception confirmation is transmitted. The working memory 13 stores the initial value of the timeout time set in the communication establishment process until the communication process ends. However, the set value of the timeout time stored in the working memory 13 indicates the currently set timeout time and is updated as appropriate.

次に、端末装置2の構成について説明する。
上記端末装置2は、ICカード1を動作させるための電源を供給するとともに、当該ICカード1とのデータ通信を行う。ここでは、端末装置2が携帯電話機である場合を想定する。端末装置2としての携帯電話機は、各ユーザが所持するICカード1を装着した状態で携帯電話機としての通信が利用可能となる運用形態が想定される。また、ICカード1は、端末装置2としての携帯電話機に設けられたICカード用のソケットに装着される。携帯電話機のICカード用のソケットに装着された状態で、携帯電話機のインターフェースとしてのコンタクト部とICカード1のインターフェースとが接触してデータ通信が可能となる。また、上記携帯電話機2は、ICカード1に物理的に接触しているコンタクト部を介して当該ICカード1に動作用の電力およびクロックパルスを供給する。
Next, the configuration of the terminal device 2 will be described.
The terminal device 2 supplies power for operating the IC card 1 and performs data communication with the IC card 1. Here, it is assumed that the terminal device 2 is a mobile phone. The mobile phone as the terminal device 2 is assumed to have an operation mode in which communication as a mobile phone can be used with the IC card 1 possessed by each user attached. The IC card 1 is mounted in an IC card socket provided in a mobile phone as the terminal device 2. In a state where the IC card socket of the mobile phone is mounted, the contact portion as an interface of the mobile phone and the interface of the IC card 1 come into contact with each other, thereby enabling data communication. The cellular phone 2 supplies power and clock pulses for operation to the IC card 1 through a contact portion that is in physical contact with the IC card 1.

図2は、端末装置2の一例としての携帯電話機の構成例を示すブロック図である。
図2に示す構成例では、携帯電話機2は、制御部31、RAM32、ROM33、不揮発性メモリ34、ICカード用のインターフェース(第1インターフェース)35、メモリカード用のインターフェース(第2インターフェース)36、アンテナ37、通信部38、音声部39、振動部40、表示部41、操作部42および電源部43などを有する。
FIG. 2 is a block diagram illustrating a configuration example of a mobile phone as an example of the terminal device 2.
In the configuration example shown in FIG. 2, the mobile phone 2 includes a control unit 31, a RAM 32, a ROM 33, a nonvolatile memory 34, an IC card interface (first interface) 35, a memory card interface (second interface) 36, An antenna 37, a communication unit 38, an audio unit 39, a vibration unit 40, a display unit 41, an operation unit 42, a power supply unit 43, and the like are included.

上記制御部31は、携帯電話機2全体の制御を司るものである。上記制御部31は、CPU、内部メモリ、各種のインターフェースなどを有する。また、上記制御部31は、その基本機能として、上記表示部41の表示を制御する表示制御機能、PLL(Phase Locked Loop)回路、データストリーム経路切換え、DMA(Direct Memory Access)コントローラ、割り込みコントローラ、タイマ、UART(Universal Asynchronous Receiver Transmitter)、秘匿、HDLC(High-level Data Link Control procedure)フレーミング、ディバイスコントローラなどの機能を有している。   The control unit 31 controls the entire mobile phone 2. The control unit 31 includes a CPU, an internal memory, various interfaces, and the like. The control unit 31 has, as its basic functions, a display control function for controlling the display of the display unit 41, a PLL (Phase Locked Loop) circuit, a data stream path switching, a DMA (Direct Memory Access) controller, an interrupt controller, It has functions such as timer, UART (Universal Asynchronous Receiver Transmitter), secrecy, HDLC (High-level Data Link Control procedure) framing, device controller, and the like.

上記RAM32は、作業用のデータを記憶するための揮発性メモリである。RAM32は、ICカード1との通信設定情報として、通信確立処理において設定する設定データを記憶する。たとえば、RAM32は、後述する連続伝送フレームの最大数(以下、最大フレーム数(Sliding Window size)とも称する)の設定値を記憶する。また、RAM32は、フレームを受信してから受信確認を送信するまでの時間(タイムアウト時間)の設定値、および、初期値を記憶する。RAM32は、通信確立処理において設定されるタイムアウト時間の初期値を当該通信処理が終了するまで記憶する。ただし、RAM32が記憶するタイムアウト時間の設定値は、現在設定されているタイムアウト時間を示すものであり、適宜更新される。   The RAM 32 is a volatile memory for storing work data. The RAM 32 stores setting data set in the communication establishment process as communication setting information with the IC card 1. For example, the RAM 32 stores a set value of a maximum number of continuous transmission frames (hereinafter also referred to as a maximum number of frames (Sliding Window size)). Further, the RAM 32 stores a set value and an initial value of a time (timeout time) from when a frame is received until reception confirmation is transmitted. The RAM 32 stores the initial value of the timeout time set in the communication establishment process until the communication process ends. However, the set value of the timeout time stored in the RAM 32 indicates the currently set timeout time and is updated as appropriate.

上記ROM33は、制御プログラムや制御データなどが記憶されている不揮発性メモリである。上記ROM33は、不揮発性メモリである。たとえば、上記ROM33には、当該携帯電話機2の基本的な制御を行うための制御プログラムおよび制御データが予め記憶されている。上記制御部31は、上記ROM33に記憶されている制御プログラムを実行することにより、当該携帯電話機2の基本的な制御を実現している。   The ROM 33 is a non-volatile memory that stores control programs, control data, and the like. The ROM 33 is a nonvolatile memory. For example, the ROM 33 stores a control program and control data for performing basic control of the mobile phone 2 in advance. The control unit 31 realizes basic control of the mobile phone 2 by executing a control program stored in the ROM 33.

上記不揮発性メモリ34は、種々のデータが記憶される書き換え可能な不揮発性メモリである。上記不揮発性メモリ34には、種々のアプリケーションプログラム(アプリケーション)、制御データ、および、ユーザデータなどが記憶される。上記制御部31は、上記不揮発性メモリ34に記憶されているアプリケーションプログラムを実行することにより、種々の機能を実現する。   The nonvolatile memory 34 is a rewritable nonvolatile memory that stores various data. The nonvolatile memory 34 stores various application programs (applications), control data, user data, and the like. The control unit 31 implements various functions by executing application programs stored in the nonvolatile memory 34.

上記第1インターフェース35は、ICカード1が装着されるインターフェースである。上記第1インターフェース35は、上記制御部31に接続されている。これにより、上記制御部31は、上記第1インターフェース35を介して上記ICカード1とのデータ通信が可能となっている。上記第2インターフェース36は、上記メモリカードMが着脱可能なインターフェースである。上記第2インターフェース36は、上記制御部31に接続されている。上記制御部31は、上記第2インターフェース36に装着されたメモリカードMへのアクセス(データの書込みあるいは読出し)が可能となっている。   The first interface 35 is an interface to which the IC card 1 is attached. The first interface 35 is connected to the control unit 31. Thus, the control unit 31 can perform data communication with the IC card 1 via the first interface 35. The second interface 36 is an interface to which the memory card M can be attached and detached. The second interface 36 is connected to the control unit 31. The control unit 31 can access (write or read data) the memory card M attached to the second interface 36.

上記通信部38は、通信用のアンテナ37を介して通話データあるいはデータ通信用のデータを電波で送受信する。上記音声部39は、アナログフロントエンド部及びオーディオ部を有し、音声の入出力を行う。上記振動部40は、当該携帯電話機2全体を振動させる振動機構により構成される。上記表示部41は、上記制御部31により表示のオンオフや表示内容などが制御される。上記操作部42は、キーボードなどにより構成され、ユーザによる操作指示が入力される。上記電源部43は、バッテリーなどにより構成され、当該携帯電話機2内の各部に電源を供給するようになっている。また、上記電源部43は、上記第1インターフェース35を介して接続されたICカード1および上記第2インターフェース36を介して接続されたメモリカードMにも電源を供給する機能も有している。   The communication unit 38 transmits and receives telephone call data or data communication data via radio waves via the communication antenna 37. The audio unit 39 has an analog front end unit and an audio unit, and inputs and outputs audio. The vibration unit 40 is configured by a vibration mechanism that vibrates the entire mobile phone 2. The display unit 41 is controlled by the control unit 31 to turn on / off the display and display contents. The operation unit 42 is configured by a keyboard or the like, and an operation instruction from the user is input. The power supply unit 43 is configured by a battery or the like, and supplies power to each unit in the mobile phone 2. The power supply unit 43 also has a function of supplying power to the IC card 1 connected via the first interface 35 and the memory card M connected via the second interface 36.

次に、ICカード1と端末装置2との通信について説明する。
本実施例のICカードシステムでは、ICカード1と端末装置2とは、たとえば、SWP通信などの全2重通信を行う。本システムでは、伝送するデータの形式が予め決められる。ICカード1と端末装置2とは、データをフレーム単位で伝送する。1フレーム当りの伝送データ量は、規定のサイズであり、送受信すべきデータがフレーム単位に分割して送受信される。
Next, communication between the IC card 1 and the terminal device 2 will be described.
In the IC card system of the present embodiment, the IC card 1 and the terminal device 2 perform full duplex communication such as SWP communication. In this system, the format of data to be transmitted is determined in advance. The IC card 1 and the terminal device 2 transmit data in units of frames. The amount of transmission data per frame is a prescribed size, and data to be transmitted / received is transmitted / received divided into frame units.

まず、端末装置2とICカード1とは、通信確立処理により通信設定の初期値を設定する。通信確立処理において、端末装置2はICカード1へリセット要求を送信し、ICカード1は端末装置2へ設定データを返す。リセット要求において、端末装置2は、ICカード1に対して、連続して伝送できるフレームの最大数(以下、Sliding Window size(WS)と称する)、および、受信確認の応答となるレスポンスのタイムアウト時間(Acknowledge time)などをパラメータで設定する。タイムアウト時間の初期値は、WS値に応じた長さの時間が設定される。   First, the terminal device 2 and the IC card 1 set initial values for communication settings by communication establishment processing. In the communication establishment process, the terminal device 2 transmits a reset request to the IC card 1, and the IC card 1 returns setting data to the terminal device 2. In the reset request, the terminal device 2 sends a maximum number of frames that can be continuously transmitted to the IC card 1 (hereinafter referred to as “Sliding Window size (WS)”), and a response timeout time as a response to the reception confirmation. Set (Acknowledge time) etc. with parameters. The initial value of the timeout time is set to a length corresponding to the WS value.

Sliding Window sizeの値(WS値)は、たとえば、「2」、「3」および「4」の何れかが設定されるものとする。タイムアウト時間の初期値は、WS値に応じて決定される時間であるものとする。タイムアウト時間の初期値は、WS値が小さくなるほど、短い時間に設定される。また、タイムアウト時間は、端末装置2とICカード1との通信速度、および、各フレームの大きさなどに応じた値に設定する。たとえば、WS値が「4」である場合のタイムアウト時間の初期値を5ms程度とする。この場合、WS値が「4」である場合のタイムアウト時間の初期値「5ms」を基準として、WS値が「3」であれば、タイムアウト時間の初期値は4.5〜3.0ms程度(例えば3.75ms)とし、WS値が「2」であれば、タイムアウト時間の初期値は3.5〜2.0ms程度(たとえば、2.5ms)とするようにしても良い。   As the value of the sliding window size (WS value), for example, any one of “2”, “3”, and “4” is set. It is assumed that the initial value of the timeout time is a time determined according to the WS value. The initial value of the timeout time is set to a shorter time as the WS value becomes smaller. The timeout time is set to a value according to the communication speed between the terminal device 2 and the IC card 1 and the size of each frame. For example, the initial value of the timeout time when the WS value is “4” is about 5 ms. In this case, when the WS value is “3” with reference to the initial value “5 ms” of the timeout time when the WS value is “4”, the initial value of the timeout time is about 4.5 to 3.0 ms ( For example, if the WS value is “2”, the initial value of the timeout time may be about 3.5 to 2.0 ms (for example, 2.5 ms).

上述のように、タイムアウト時間の初期値は、WS値に応じて決定され、WS値が大きければ大きいほど大きい値となる。従って、タイムアウト時間を初期値に固定すると、受信確認などの応答を出力するタイミングは、実際に伝送するフレーム数が設定されているWS値よりも少ない場合であっても、WS値に応じて設定された時間となる。この結果として、実際に伝送するフレーム数が設定されているWS値よりも少ない場合、余計な待ち時間が発生する。   As described above, the initial value of the timeout time is determined according to the WS value, and the larger the WS value, the larger the value. Therefore, when the timeout time is fixed to the initial value, the timing for outputting a response such as reception confirmation is set according to the WS value even when the actual number of frames to be transmitted is smaller than the set WS value. Time. As a result, when the number of frames to be actually transmitted is smaller than the set WS value, an extra waiting time occurs.

本実施形態のICカードシステムでは、ICカードは、通信確立処理(つまり、リセット時)において、タイムアウト時間を初期値に固定する固定モードか自動調整する調整モードかを選択する。たとえば、図3は、タイムアウト時間を初期値に固定する固定モードにおける通信例を示す図である。   In the IC card system of the present embodiment, the IC card selects a fixed mode for fixing the timeout time to an initial value or an adjustment mode for automatic adjustment in the communication establishment process (that is, at the time of reset). For example, FIG. 3 is a diagram illustrating a communication example in a fixed mode in which the timeout time is fixed to an initial value.

まず、タイムアウト時間を初期値に固定する固定モードでの処理例について説明する。
図3に示す例では、WS(Sliding Window size)=4の場合を想定している。図3に示すように、Sliding Window sizeは、端末装置2とICカード1との通信確立処理において設定される。端末装置2は、ICカード1に、WS=4でのリセット(RSET)を要求するフレーム(U-Frame)を送信する。ICカード1は、WS値を4に設定し、初期設定完了を示すフレーム(U-Frame)を端末装置2へ返す。以降の通信において、端末装置2は、WS値を「4」としてICカード1とのフレーム交換を行う。
First, an example of processing in a fixed mode in which the timeout time is fixed to an initial value will be described.
In the example shown in FIG. 3, it is assumed that WS (Sliding Window size) = 4. As shown in FIG. 3, the sliding window size is set in the communication establishment process between the terminal device 2 and the IC card 1. The terminal device 2 transmits to the IC card 1 a frame (U-Frame) requesting reset (RSET) with WS = 4. The IC card 1 sets the WS value to 4, and returns a frame (U-Frame) indicating completion of the initial setting to the terminal device 2. In the subsequent communication, the terminal device 2 performs frame exchange with the IC card 1 with the WS value set to “4”.

タイムアウト時間(Acknowledge time)の初期値は、たとえば、WS(Sliding Window Size)に対して、以下のような式により算出される。
タイムアウト時間=(デフォルトの固定値)×WS/(WSに設定可能な最大値)
ここでは、WS値が2、3、4の何れかに設定され、WS値として設定可能な最大値が「4」であるものとする。また、デフォルトの固定値を5msとすると、タイムアウト時間(Acknowledge time)は、以下の式により算出されることとなる。
タイムアウト時間(Acknowledge time)=5ms×WS/4
上記の式によれば、WS値が「4」である場合、タイムアウト時間の初期値は5ms×4/4=5msとなり、WS値が「3」である場合、タイムアウト時間の初期値は5ms×3/4=3.75msとなり、WS値が「2」である場合、タイムアウト時間の初期値は5ms×2/4=2.5msとなる。
The initial value of the timeout time (Acknowledge time) is calculated by, for example, the following formula for WS (Sliding Window Size).
Timeout time = (default fixed value) × WS / (maximum value that can be set in WS)
Here, it is assumed that the WS value is set to any one of 2, 3, and 4, and the maximum value that can be set as the WS value is “4”. If the default fixed value is 5 ms, the timeout time (Acknowledge time) is calculated by the following equation.
Timeout time (Acknowledge time) = 5 ms x WS / 4
According to the above formula, when the WS value is “4”, the initial value of the timeout time is 5 ms × 4/4 = 5 ms, and when the WS value is “3”, the initial value of the timeout time is 5 ms × When 3/4 = 3.75 ms and the WS value is “2”, the initial value of the timeout time is 5 ms × 2/4 = 2.5 ms.

上記のようなタイムアウト時間の初期値の設定を含む通信確立処理が完了すると、端末装置2とICカード1とは、フレーム交換を開始する。端末装置2は、設定したWSの値を最大値とする複数フレームごとのデータとして、送信メッセージをICカード1へ送信する。たとえば、最大数のフレームで収まらない大きなデータを送信する場合、端末装置2は、送信データをWS値を最大値とする複数フレームからなるデータに分割してICカード1へ送信する。   When the communication establishment process including the setting of the initial value of the timeout time as described above is completed, the terminal device 2 and the IC card 1 start frame exchange. The terminal device 2 transmits a transmission message to the IC card 1 as data for each of a plurality of frames whose maximum value is the set WS value. For example, when transmitting large data that does not fit in the maximum number of frames, the terminal device 2 divides the transmission data into data composed of a plurality of frames having a WS value as a maximum value and transmits the data to the IC card 1.

すなわち、タイムアウト時間が固定モードである場合、WS=4が設定されれば、送信メッセージ(I-Frame)にフレーム数によらず、4フレームで送られる送信メッセージに対応するタイムアウト時間が固定値として設定される。このため、4フレームで送られる送信メッセージ(I-Frame)に対しては、対応するタイムアウト時間で応答ができる。ただし、送信メッセージ(I-Frame)のフレーム数が最大値(「4」)よりも3フレーム以下であれば、当該送信メッセージの受信を完了した後、フレーム数が最大値(「4」)よりも少ないフレーム数分の待ち時間が発生する。   That is, when WS = 4 is set when the timeout time is fixed mode, the timeout time corresponding to the transmission message transmitted in 4 frames is set as a fixed value regardless of the number of frames in the transmission message (I-Frame). Is set. For this reason, it is possible to respond to a transmission message (I-Frame) sent in 4 frames with a corresponding timeout time. However, if the number of frames of the transmission message (I-Frame) is 3 frames or less than the maximum value (“4”), the reception of the transmission message is completed, and then the number of frames exceeds the maximum value (“4”). A waiting time corresponding to a small number of frames occurs.

たとえば、図3に示す例において、端末装置2から4フレームからなる送信メッセージ(I-Frame)を受信した場合、ICカード1は、受信した最初のフレームの終わりからWS値に応じて設定されたタイムアウト時間が経過した時点で受信確認の通知を送信する。また、端末装置2から3フレームからなる送信メッセージ(I-Frame)を受信した場合、ICカード1は、3フレーム分のデータを受信した後、1(4−3=1)フレーム分のデータが受信可能な待ち時間を待ってから受信確認の通知を送信する。また、端末装置2から2フレームからなる送信メッセージ(I-Frame)を受信した場合、ICカード1は、2フレーム分のデータを受信した後、2(4−2=2)フレーム分のデータが受信可能な待ち時間を待ってから受信確認の通知を送信する。   For example, in the example shown in FIG. 3, when a transmission message (I-Frame) consisting of 4 frames is received from the terminal device 2, the IC card 1 is set according to the WS value from the end of the received first frame. A notification of reception confirmation is sent when the timeout time elapses. Further, when a transmission message (I-Frame) consisting of 3 frames is received from the terminal device 2, the IC card 1 receives data for 3 frames, and then data for 1 (4-3 = 1) frames is received. Wait for a receivable waiting time before sending a reception confirmation notification. When receiving a transmission message (I-Frame) consisting of two frames from the terminal device 2, the IC card 1 receives data for two frames, and then receives data for two (4-2 = 2) frames. Wait for a receivable waiting time before sending a reception confirmation notification.

上述したように、タイムアウト時間を初期値に固定する固定モードでは、設定されたWS値よりも少ないフレーム数の送信メッセージを受信した場合、ICカード1は、受信完了から応答を送信するまでの間に待ち時間が発生する。WS値に対してフレーム数が少なければ少ないほど、ICカード1は、受信完了から応答送信までの間における待ち時間が拡大する。   As described above, in the fixed mode in which the timeout time is fixed to the initial value, when the transmission message having the number of frames smaller than the set WS value is received, the IC card 1 is from the completion of reception until the response is transmitted. Waiting time occurs. The smaller the number of frames with respect to the WS value, the longer the waiting time of the IC card 1 from the completion of reception to the response transmission.

次に、タイムアウト時間を自動的に調整する調整モードでの通信について説明する。
図4は、タイムアウト時間を自動的に調整する調整モードにおいて送受信されるフレームの例を示す図である。また、図5は、タイムアウト時間が調整モードである場合における端末装置2とICカート1との通信シーケンスの例を示す図である。
通信確立処理において、ICカード1は、WSを設定する。図4および図5に示す例では、WS=4とする。通信確立処理において、ICカード1は、設定されたWSの値に対応するタイムアウト時間(Acknowledge time)の初期値AT0を設定される。WS値に対応するタイムアウト時間の初期値AT0は、例えば、上述した式により算出される。
Next, communication in an adjustment mode that automatically adjusts the timeout time will be described.
FIG. 4 is a diagram illustrating an example of frames transmitted and received in the adjustment mode in which the timeout time is automatically adjusted. FIG. 5 is a diagram illustrating an example of a communication sequence between the terminal device 2 and the IC cart 1 when the timeout time is in the adjustment mode.
In the communication establishment process, the IC card 1 sets WS. In the example shown in FIGS. 4 and 5, WS = 4. In the communication establishment process, the IC card 1 is set with an initial value AT0 of a timeout time (Acknowledge time) corresponding to the set WS value. The initial value AT0 of the timeout time corresponding to the WS value is calculated by the above-described formula, for example.

また、通信確立処理において、端末装置2は、ICカード1へのリセット要求とともに、タイムアウト時間(Acknowledge time)を固定モードとするか調整モードとするかを指定するようにしても良い。たとえば、端末装置2は、通信確立処理においてICカード1へ送信するリセット要求を含むUAフレームにおいて、タイムアウト時間を固定モードとするか調整モードとするかを指定するパラメータを付与する。ICカード1は、リセット要求を含むUAフレームのパラメータによりタイムアウト時間を固定モードとするか調整モードとするかを選択する。   In the communication establishment process, the terminal device 2 may specify whether the timeout time (Acknowledge time) is set to the fixed mode or the adjustment mode together with the reset request to the IC card 1. For example, the terminal device 2 gives a parameter for specifying whether the timeout time is set to the fixed mode or the adjustment mode in the UA frame including the reset request transmitted to the IC card 1 in the communication establishment process. The IC card 1 selects whether to set the timeout time to the fixed mode or the adjustment mode according to the parameters of the UA frame including the reset request.

タイムアウト時間を自動調整する調整モードである場合、ICカード1は、実際に端末装置2からの送信メッセージ(I-Frame)の受信完了から、タイムアウト時間が経過するまでの時間に応じて、現在設定されているタイムアウト時間を調整(補正)するか否かを判断する。たとえば、送信メッセージの受信完了からのタイムアウト時間までの経過時間Tが第1基準値A以上かつ第2基準値A+α以下である場合、ICカード1は、タイムアウト時間の変更を行わずに、現在のタイムアウト時間の設定値を維持する。   In the adjustment mode in which the timeout time is automatically adjusted, the IC card 1 is currently set according to the time from when the transmission message (I-Frame) is actually received from the terminal device 2 until the timeout time elapses. It is determined whether or not to adjust (correct) the timeout time. For example, when the elapsed time T from the completion of reception of the transmission message to the timeout time is not less than the first reference value A and not more than the second reference value A + α, the IC card 1 does not change the timeout time and changes the current time Maintain the timeout value setting.

また、送信メッセージの受信完了からのタイムアウト時間までの経過時間Tが第1基準値A未満である場合、ICカード1は、タイムアウト時間の設定値をWS値に応じたタイムアウト時間の初期値に補正する調整を行う。また、送信メッセージの受信完了からのタイムアウト時間までの経過時間Tが第2基準値A+αより長い場合、ICカード1は、タイムアウト時間の設定値を短くする調整を行う。たとえば、ICカード1は、現在のタイムアウト時間をB(0<B<1)倍することにより、タイムアウト時間を短い時間に調整する。Bの値は、たとえば、0.5から0.75程度が想定される。ただし、タイムアウト時間を短い値に調整する方法は、B倍する方法に限定されるものでない。たとえば、タイムアウト時間は、現在の設定値から所定時間を減算した値に調整するようにしても良い。   Further, when the elapsed time T from the completion of reception of the transmission message to the timeout time is less than the first reference value A, the IC card 1 corrects the set value of the timeout time to the initial value of the timeout time according to the WS value. Make adjustments. When the elapsed time T from the completion of reception of the transmission message to the timeout time is longer than the second reference value A + α, the IC card 1 performs adjustment to shorten the set value of the timeout time. For example, the IC card 1 adjusts the timeout time to a short time by multiplying the current timeout time by B (0 <B <1). The value of B is assumed to be about 0.5 to 0.75, for example. However, the method of adjusting the timeout time to a short value is not limited to the method of multiplying by B. For example, the timeout time may be adjusted to a value obtained by subtracting a predetermined time from the current set value.

すなわち、端末装置2から送信メッセージ(I-Frame)を受信した場合、ICカード1は、受信した最初のフレームの終わりからタイムアウト時間が経過した時点で受信確認の通知を送信する。受信確認を通知するICカード1は、送信メッセージの受信を完了した時点と設定中のタイムアウト時間に従って受信確信を送信した時点との時間差tにより、現在設定されているタイムアウト時間AT0を変更(調整)するか否かを判断する。   That is, when a transmission message (I-Frame) is received from the terminal device 2, the IC card 1 transmits a reception confirmation notification when a timeout time elapses from the end of the received first frame. The IC card 1 notifying the reception confirmation changes (adjusts) the currently set timeout time AT0 by the time difference t between the time when the reception of the transmission message is completed and the time when the reception belief is transmitted according to the set timeout time. Judge whether to do.

たとえば、図4に示す例では、WSを「4」に設定した通信確立処理の直後に端末装置2から4フレームの送信メッセージ(I-Frame)を受信した場合、時間差tがA≦t≦A+αであるため、ICカード1は、タイムアウト時間の調整を実行しない。
また、図4に示す例では、4フレームの送信メッセージを受信した次に3フレームの送信メッセージを受信した場合、時間差tがt≧A+αであるため、ICカード1は、タイムアウト時間の設定値ATをタイムアウト時間AT0をよりも短い時間AT1に調整(更新)する。
For example, in the example illustrated in FIG. 4, when a 4-frame transmission message (I-Frame) is received from the terminal device 2 immediately after the communication establishment process in which WS is set to “4”, the time difference t is A ≦ t ≦ A + α. Therefore, the IC card 1 does not adjust the timeout time.
In the example shown in FIG. 4, when the 4-frame transmission message is received and then the 3-frame transmission message is received, the time difference t is t ≧ A + α. The timeout time AT0 is adjusted (updated) to a shorter time AT1.

また、図4に示す例では、3フレームの送信メッセージを受信した次に3フレームの送信メッセージを受信した場合、A≦t≦A+αであるため、ICカード1は、タイムアウト時間の調整を実行しない。
また、図4に示す例では、3フレームの送信メッセージの受信に応じてタイムアウト時間をAT1に調整した後に4フレームの送信メッセージを受信した場合、時間差tがt≦Aとなるため、ICカード1は、タイムアウト時間の設定値ATをタイムアウト時間の初期値AT0に変更する。
In the example shown in FIG. 4, when a 3-frame transmission message is received after a 3-frame transmission message is received, A ≦ t ≦ A + α, so the IC card 1 does not adjust the timeout time. .
In the example shown in FIG. 4, when a 4-frame transmission message is received after adjusting the timeout time to AT1 in response to the reception of a 3-frame transmission message, the time difference t becomes t ≦ A. Changes the set value AT of the timeout time to the initial value AT0 of the timeout time.

なお、ICカード1であh、タイムアウト時間を短くすることによって全フレームの送信メッセージを受信しきれないうちに受信確認を送信することがあっても良い。たとえば、図4に示す例では、タイムアウト時間AT1の場合には4フレームからなる送信メッセージを受信しきれないようになっている。この場合、ICカード1は、調整された短いタイムアウト時間で受信確認を送信した際、タイムアウト時間を初期設定に戻すとともに、受信確認が未通知のフレームについては未通知のフレームを受信してからタイムアウト時間が経過した時点で受信確認を送信する。   Note that the IC card 1 may transmit a reception confirmation before the transmission message of all frames can be received by shortening the timeout time. For example, in the example shown in FIG. 4, in the case of the timeout time AT1, a transmission message composed of 4 frames cannot be received. In this case, when the IC card 1 transmits the reception confirmation with the adjusted short timeout time, the time-out time is returned to the initial setting, and for the frame for which the reception confirmation is not notified, the timeout is performed after receiving the unreported frame. An acknowledgment is sent when the time has elapsed.

つまり、図4に示す例において、ICカード1は、4フレームからなる送信メッセージに対してタイムアウト時間AT1で受信確認を送信する際、タイムアウト時間を初期値AT0に変更するとともに、受信確認を送信する際に受信中であった残りフレームの受信開始からタイムアウト時間AT0が経過した時点で、残りフレームの受信確認を端末装置2へ送信する。   In other words, in the example shown in FIG. 4, when the IC card 1 transmits a reception confirmation with a timeout time AT1 to a transmission message consisting of four frames, the IC card 1 changes the timeout time to the initial value AT0 and transmits the reception confirmation. When the timeout time AT0 has elapsed from the start of reception of the remaining frame that was being received, the reception confirmation of the remaining frame is transmitted to the terminal device 2.

次に、ICカード1における調整モードでの処理例について説明する。
図6は、ICカード1における調整モードでの処理の流れを説明するためのフローチャートである。
まず、ICカード1は、端末装置2からのリセット要求に応じて通信確立処理を行う(ステップS11)。端末装置2は、ICカード1に対してリセット要求とともに、WSの設定値を指定する。ICカード1のCPU11は、端末装置2に指定されたWS値を設定する。CPU11は、端末装置2から指定されたWS値をワーキングメモリ13に保存することにより、WS値を設定する。WS値を設定した場合、CPU11は、WS値に応じたタイムアウト時間ATの初期値AT0を算出する。算出したタイムアウト時間の初期値AT0を算出すると、CPU11は、算出した初期値をタイムアウト時間ATとしてワーキングメモリ13に保存する。
Next, a processing example in the adjustment mode in the IC card 1 will be described.
FIG. 6 is a flowchart for explaining the flow of processing in the adjustment mode in the IC card 1.
First, the IC card 1 performs communication establishment processing in response to a reset request from the terminal device 2 (step S11). The terminal device 2 designates the WS setting value together with the reset request to the IC card 1. The CPU 11 of the IC card 1 sets the WS value specified for the terminal device 2. The CPU 11 sets the WS value by storing the WS value designated by the terminal device 2 in the working memory 13. When the WS value is set, the CPU 11 calculates an initial value AT0 of the timeout time AT according to the WS value. When calculating the initial value AT0 of the calculated timeout time, the CPU 11 stores the calculated initial value in the working memory 13 as the timeout time AT.

通信確立処理が完了すると、ICカード1のCPU11は、端末装置2からの送信メッセージ(フレーム)の受信待ち状態となる。端末装置2から送信メッセージを受信した場合(ステップS12、YES)、ICカード1のCPU11は、端末装置2から受信する送信メッセージにおける最初のフレームの受信完了からの経過時間をタイマ11aにより計時する。CPU11は、タイマ11aが計時する経過時間がワーキングメモリ13に記憶している現在の設定されているタイムアウト時間になったか否かを監視する(ステップS13)。   When the communication establishment process is completed, the CPU 11 of the IC card 1 enters a state of waiting for a transmission message (frame) from the terminal device 2. When the transmission message is received from the terminal device 2 (step S12, YES), the CPU 11 of the IC card 1 measures the elapsed time from the completion of reception of the first frame in the transmission message received from the terminal device 2 by the timer 11a. The CPU 11 monitors whether or not the elapsed time counted by the timer 11a has reached the currently set timeout time stored in the working memory 13 (step S13).

また、送信メッセージを受信する場合、CPU11は、送信メッセージの受信完了を監視する(ステップS14)。タイマ11aにより計時する経過時間がタイムアウト時間になる前に送信メッセージの受信が完了した場合(ステップS14、YES)、CPU11は、送信メッセージの受信完了時点から、タイマ11aにより計時する経過時間がタイムアウト時間になるまでの時間(時間差)tを計時する(ステップS15)。   When receiving a transmission message, the CPU 11 monitors the completion of reception of the transmission message (step S14). When the reception of the transmission message is completed before the elapsed time measured by the timer 11a reaches the timeout time (step S14, YES), the CPU 11 determines that the elapsed time measured by the timer 11a from the time when the reception of the transmission message is completed is the timeout time. The time (time difference) t until it becomes is measured (step S15).

タイマ11aにより計時する経過時間がタイムアウト時間になった場合(ステップS13、YES)、CPU11は、受信したフレームに対する受信確認のレスポンスを端末装置2へ送信する(ステップS16)。受信確認を送信する場合、CPU11は、端末装置2との通信におけるタイムアウト時間の動作モードが調整モードであるか否かを判断する(ステップS17)。調整モードである場合(ステップS17、YES)、CPU11は、端末装置2からの送信メッセージの全フレームを受信済みであるか否かを確認する(ステップS18)。送信メッセージの全フレームが受信済みでない場合(ステップS18、NO)、CPU11は、タイムアウト時間ATを初期値AT0に戻す(ステップS19)。この場合、CPU11は、ステップS13へ戻り、受信確認を送信していない残りフレームの受信処理を実行する。   When the elapsed time measured by the timer 11a becomes the timeout time (step S13, YES), the CPU 11 transmits a reception confirmation response to the received frame to the terminal device 2 (step S16). When transmitting the reception confirmation, the CPU 11 determines whether or not the operation mode of the timeout time in the communication with the terminal device 2 is the adjustment mode (step S17). When the adjustment mode is set (step S17, YES), the CPU 11 confirms whether or not all frames of the transmission message from the terminal device 2 have been received (step S18). When all the frames of the transmission message have not been received (step S18, NO), the CPU 11 returns the timeout time AT to the initial value AT0 (step S19). In this case, the CPU 11 returns to step S <b> 13 and executes reception processing for the remaining frames for which reception confirmation has not been transmitted.

送信メッセージの全フレームが受信済みであることを確認した場合(ステップS18、YES)、CPU11は、受信完了からタイムアウト時間になるまでの時間差tが第1基準値A以上であるか否かを判断する(ステップS20)。時間差tが第1基準値A未満であると判断した場合(ステップS20、NO)、CPU11は、タイムアウト時間ATを初期値AT0に更新する(ステップS21)。この場合、CPU11は、ステップS12へ戻り、次のフレームの受信待ち状態となる。また、第1基準値Aは、通信速度に応じて設定する時間である。たとえば、第1基準値Aは、1フレーム分の受信時間よりも短く、フレームの受信完了から確実に受信確認の送信を開始できるまでの時間よりも長い時間であることが考えられる。   When it is confirmed that all the frames of the transmission message have been received (step S18, YES), the CPU 11 determines whether or not the time difference t from the completion of reception until the timeout time is equal to or greater than the first reference value A. (Step S20). When determining that the time difference t is less than the first reference value A (step S20, NO), the CPU 11 updates the timeout time AT to the initial value AT0 (step S21). In this case, the CPU 11 returns to step S12 and waits for reception of the next frame. The first reference value A is a time set according to the communication speed. For example, it is conceivable that the first reference value A is shorter than the reception time for one frame and longer than the time from the completion of frame reception until the transmission of the reception confirmation can be surely started.

なお、全フレームの受信完了から受信確認を送信するまでの時間差tが第1基準値A未満となった場合、ICカード1は、直ちに、タイムアウト時間を初期値に戻すのではなく、徐々にタイムアウト時間を長くするような調整を行うようにしても良い。たとえば、CPU11は、時間差tが第1基準値A未満となった場合、1よりも大きい倍率Cをタイムアウト時間ATに乗算することにより、タイムアウト時間ATをより長い時間に調整しても良い。   When the time difference t from completion of reception of all frames to transmission of reception confirmation is less than the first reference value A, the IC card 1 does not immediately return the timeout time to the initial value, but gradually times out. You may make it adjust so that time may be lengthened. For example, when the time difference t becomes less than the first reference value A, the CPU 11 may adjust the timeout time AT to a longer time by multiplying the timeout time AT by a magnification C larger than 1.

また、時間差tが第1の基準値A以上であると判断した場合(ステップS20、YES)、CPU11は、さらに、時間差tが第2基準値(A+α)以下であるか否かを判断する(ステップS22)。時間差tが第2基準値(A+α)以下であると判断した場合(ステップS20、YES)、CPU11は、ワーキングメモリ13に記憶している現在のタイムアウト時間ATを更新することなく、現在のタイムアウト時間の設定値を継続する。この場合、CPU11は、ステップS12へ戻り、次のフレームの受信待ち状態となる。また、第2基準値A+αも、通信速度に応じて設定する時間である。たとえば、第2基準値A+αにおけるαは、タイムアウト時間の設定値の継続を許容する範囲となる時間である。   If it is determined that the time difference t is equal to or greater than the first reference value A (step S20, YES), the CPU 11 further determines whether or not the time difference t is equal to or less than the second reference value (A + α) ( Step S22). When it is determined that the time difference t is equal to or smaller than the second reference value (A + α) (step S20, YES), the CPU 11 does not update the current timeout time AT stored in the working memory 13 and updates the current timeout time AT. Continue setting value of. In this case, the CPU 11 returns to step S12 and waits for reception of the next frame. The second reference value A + α is also a time set according to the communication speed. For example, α in the second reference value A + α is a time within a range in which the set value of the timeout time is allowed to continue.

時間差tが第2の基準値(A+α)よりも大きいと判断した場合(ステップS20、NO)、CPU11は、ワーキングメモリ13に記憶している現在のタイムアウト時間ATを調整する(ステップS23)。たとえば、CPU11は、ワーキングメモリ13に記憶している現在のタイムアウト時間ATに倍率Bを乗算することにより、タイムアウト時間ATを更新する。CPU11は、倍率Bを0<B<1とすることによりタイムアウト時間ATを短い値に設定できる。たとえば、倍率Bは、0.5〜0.75とすることによりタイムアウト時間を1/2〜3/4短縮できる。   When it is determined that the time difference t is larger than the second reference value (A + α) (step S20, NO), the CPU 11 adjusts the current timeout time AT stored in the working memory 13 (step S23). For example, the CPU 11 updates the timeout time AT by multiplying the current timeout time AT stored in the working memory 13 by the magnification B. The CPU 11 can set the timeout time AT to a short value by setting the magnification B to 0 <B <1. For example, by setting the magnification B to 0.5 to 0.75, the timeout time can be shortened by 1/2 to 3/4.

上記のように、実施の形態のICカードは、全フレームの受信完了から受信確認を送信する時間差が所定の基準時間よりも長い場合、第1フレームの受信完了から受信確認を送信するまでのタイムアウト時間を短い値に調整する。これにより、ICカードが受信確認を送信するまでの待ち時間が長くなることを抑制できる。   As described above, the IC card according to the embodiment has a time-out from completion of reception of the first frame to transmission of reception confirmation when the time difference between transmission of reception confirmation from completion of reception of all frames is longer than a predetermined reference time. Adjust the time to a shorter value. Thereby, it can suppress that waiting time until an IC card transmits reception confirmation becomes long.

また、ICカードは、全フレームの受信完了から受信確認を送信する時間差が基準時間よりも長ければ、その都度タイムアウト時間を短くする。これにより、設定された最大連続フレーム(WS)よりも少ないフレーム数の受信が連続するような場合には、徐々にタイムアウト時間を短くして実際に受信しているフレーム数に適したタイムアウト時間に調整することができる。この結果、端末装置とICカードとの通信処理全体における時間も短縮することができる。   Further, the IC card shortens the time-out time each time if the time difference between the reception completion of the reception of all frames and the transmission of the reception confirmation is longer than the reference time. As a result, when reception of a frame number smaller than the set maximum continuous frame (WS) continues, the time-out time is gradually shortened to a time-out time suitable for the number of frames actually received. Can be adjusted. As a result, the time required for the entire communication process between the terminal device and the IC card can be shortened.

上記のように、本実施形態のICカードは、外部装置からの指示を解釈及び実行し、その結果を応答する。ICカードと外部装置とは、データ交換用に最大データ長が規定された可変長のデータ形式(フレーム)を使用し、一方からの受信確認または次フレーム送信要求無しに対して、他方からフレームを連続送信することができる。また、フレームの連続送信数の最大値が設定された場合、最大数のフレームを送信した後に受信確認または次フレーム送信要求を待つ通信方式において、ICカード又は端末装置は、受信確認を送信するまでの時間の初期値が活性化時に設定される。ICカード又は端末装置は、初期値を設定した以降のフレーム交換において、実際の受信完了時と受信確認の送信時との時間差に応じて、受信確認送信までの時間を自動的に調整する。   As described above, the IC card according to the present embodiment interprets and executes an instruction from an external device, and responds with the result. The IC card and external device use a variable-length data format (frame) that specifies the maximum data length for data exchange. When there is no reception confirmation from one side or next frame transmission request, a frame is sent from the other side. Continuous transmission is possible. In addition, when the maximum value of the continuous transmission number of frames is set, in the communication system in which the reception confirmation or the next frame transmission request is waited after transmitting the maximum number of frames, the IC card or the terminal device until the reception confirmation is transmitted. The initial value of the time is set at the time of activation. In the frame exchange after setting the initial value, the IC card or the terminal device automatically adjusts the time until the reception confirmation transmission according to the time difference between the actual reception completion and the reception confirmation transmission.

以上、本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   As mentioned above, although several embodiment of this invention was described, these embodiment is shown as an example and is not intending limiting the range of invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

1…ICカード、C…本体、1a…ICチップ、2…端末装置(携帯電話機、外部装置)、11…CPU、11a…タイマ、12…プログラムメモリ、13…ワーキングメモリ、14…データメモリ、15…通信制御部、16…電源部、17…インターフェース、31…制御部、32…RAM、34…不揮発性メモリ、35…インターフェース。   DESCRIPTION OF SYMBOLS 1 ... IC card, C ... Main body, 1a ... IC chip, 2 ... Terminal device (mobile phone, external device), 11 ... CPU, 11a ... Timer, 12 ... Program memory, 13 ... Working memory, 14 ... Data memory, 15 ... Communication control unit, 16 ... Power supply unit, 17 ... Interface, 31 ... Control unit, 32 ... RAM, 34 ... Non-volatile memory, 35 ... Interface.

Claims (8)

携帯可能電子装置であって、
フレーム単位のデータで構成されるデータを送受信する通信手段と、
受信可能な最大フレーム数と受信データに対する応答を開始する応答開始時間の初期値とを設定する設定手段と、
前記通信手段により受信するデータに対する応答開始時間が経過した時に当該データの受信確認を送信する応答手段と、
前記通信手段によるデータの受信完了から当該データに対する応答開始時間までの待ち時間に応じて応答開始時間を補正する調整手段と、
を有することを特徴とする携帯可能電子装置。
A portable electronic device,
A communication means for transmitting and receiving data composed of data in frame units;
A setting means for setting a maximum number of frames that can be received and an initial value of a response start time for starting a response to received data;
A response means for transmitting a reception confirmation of the data when a response start time for the data received by the communication means has elapsed;
Adjusting means for correcting the response start time according to the waiting time from the completion of reception of data by the communication means to the response start time for the data;
A portable electronic device comprising:
前記調整手段は、前記待ち時間が第1の時間よりも長い場合、前記応答開始時間を短くする、
ことを特徴とする前記請求項1に記載の携帯可能電子装置。
The adjusting means shortens the response start time when the waiting time is longer than the first time.
The portable electronic device according to claim 1, wherein the portable electronic device is a portable electronic device.
前記調整手段は、前記待ち時間が第1の時間よりも短く、かつ、第2の時間よりも長い場合、前記応答開始時間を維持する、
ことを特徴とする前記請求項1又は2の何れかに記載の携帯可能電子装置。
The adjusting means maintains the response start time when the waiting time is shorter than the first time and longer than the second time.
The portable electronic device according to claim 1, wherein the portable electronic device is a portable electronic device.
前記調整手段は、前記待ち時間が第2の時間よりも短い場合、前記応答開始時間を初期値に戻す、
ことを特徴とする前記請求項1乃至3の何れか1項に記載の携帯可能電子装置。
The adjusting means returns the response start time to an initial value when the waiting time is shorter than a second time.
The portable electronic device according to any one of claims 1 to 3, wherein the portable electronic device is any one of the above.
前記調整手段は、前記待ち時間が第2の時間よりも短い場合、前記応答開始時間を長くする、
ことを特徴とする前記請求項1乃至3の何れか1項に記載の携帯可能電子装置。
The adjusting means increases the response start time when the waiting time is shorter than a second time.
The portable electronic device according to any one of claims 1 to 3, wherein the portable electronic device is any one of the above.
さらに、外部装置から受信した設定データに従って前記調整手段により応答開始時間の調整する調整モードか応答開始時間を初期値に固定する固定モードかの何れかを設定するモード設定手段を有する、
ことを特徴とする前記請求項1乃至5の何れか1項に記載の携帯可能電子装置。
Furthermore, it has mode setting means for setting either an adjustment mode for adjusting the response start time by the adjustment means according to setting data received from an external device or a fixed mode for fixing the response start time to an initial value.
The portable electronic device according to claim 1, wherein the portable electronic device is a portable electronic device.
ICカードであって、
フレーム単位のデータで構成されるデータを送受信する通信手段と、受信可能な最大フレーム数と受信データに対する応答を開始する応答開始時間の初期値とを設定する設定手段と、前記通信手段により受信するデータに対する応答開始時間が経過した時に当該データの受信確認を送信する応答手段と、前記通信手段によるデータの受信完了から当該データに対する応答開始時間までの待ち時間に応じて応答開始時間を補正する調整手段とを有するモジュールと、
前記モジュールを有する本体と、
を有することを特徴とするICカード。
An IC card,
Communication means for transmitting / receiving data composed of data in frame units, setting means for setting a maximum number of receivable frames and an initial value of a response start time for starting a response to the received data, and reception by the communication means A response unit that transmits a reception confirmation of the data when a response start time for the data has elapsed, and an adjustment that corrects the response start time according to the waiting time from the completion of reception of the data by the communication unit to the response start time for the data A module having means,
A body having the module;
An IC card characterized by comprising:
携帯可能電子装置に用いられる通信方法であって、
受信可能な最大フレーム数と受信データに対する応答を開始する応答開始時間の初期値とを設定し、
フレーム単位のデータで構成されるデータを受信し、
前記受信するデータに対する応答開始時間が経過した時に当該データの受信確認を送信し、
前記データの受信完了から当該データに対する応答開始時間までの待ち時間に応じて応答開始時間を補正する、
ことを特徴とする携帯可能電子装置に用いられる通信方法。
A communication method used in a portable electronic device comprising:
Set the maximum number of frames that can be received and the initial value of the response start time for starting the response to the received data.
Receives data consisting of frame data,
When the response start time for the received data has passed, send a receipt confirmation of the data,
Correcting the response start time according to the waiting time from the completion of reception of the data to the response start time for the data,
A communication method used for a portable electronic device.
JP2011059718A 2011-03-17 2011-03-17 PORTABLE ELECTRONIC DEVICE, COMMUNICATION METHOD USED FOR IC CARD AND PORTABLE ELECTRONIC DEVICE Expired - Fee Related JP5602075B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011059718A JP5602075B2 (en) 2011-03-17 2011-03-17 PORTABLE ELECTRONIC DEVICE, COMMUNICATION METHOD USED FOR IC CARD AND PORTABLE ELECTRONIC DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011059718A JP5602075B2 (en) 2011-03-17 2011-03-17 PORTABLE ELECTRONIC DEVICE, COMMUNICATION METHOD USED FOR IC CARD AND PORTABLE ELECTRONIC DEVICE

Publications (2)

Publication Number Publication Date
JP2012194904A true JP2012194904A (en) 2012-10-11
JP5602075B2 JP5602075B2 (en) 2014-10-08

Family

ID=47086704

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011059718A Expired - Fee Related JP5602075B2 (en) 2011-03-17 2011-03-17 PORTABLE ELECTRONIC DEVICE, COMMUNICATION METHOD USED FOR IC CARD AND PORTABLE ELECTRONIC DEVICE

Country Status (1)

Country Link
JP (1) JP5602075B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014170423A (en) * 2013-03-04 2014-09-18 Dainippon Printing Co Ltd Proximity-type ic card system, reader/writer and proximity-type ic card
JP2019192143A (en) * 2018-04-27 2019-10-31 凸版印刷株式会社 Mobile terminal device, mobile terminal device control program, and mobile terminal device control method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005222194A (en) * 2004-02-04 2005-08-18 Sharp Corp Ic card with coprocessor for auxiliary operation built-in and its control method
JP2005301938A (en) * 2004-04-16 2005-10-27 Dainippon Printing Co Ltd Portable information storage medium and program therefor
JP2010226360A (en) * 2009-03-23 2010-10-07 Toshiba Corp Data transmission protocol control method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005222194A (en) * 2004-02-04 2005-08-18 Sharp Corp Ic card with coprocessor for auxiliary operation built-in and its control method
JP2005301938A (en) * 2004-04-16 2005-10-27 Dainippon Printing Co Ltd Portable information storage medium and program therefor
JP2010226360A (en) * 2009-03-23 2010-10-07 Toshiba Corp Data transmission protocol control method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014170423A (en) * 2013-03-04 2014-09-18 Dainippon Printing Co Ltd Proximity-type ic card system, reader/writer and proximity-type ic card
JP2019192143A (en) * 2018-04-27 2019-10-31 凸版印刷株式会社 Mobile terminal device, mobile terminal device control program, and mobile terminal device control method
JP7192240B2 (en) 2018-04-27 2022-12-20 凸版印刷株式会社 MOBILE TERMINAL DEVICE, MOBILE TERMINAL CONTROL PROGRAM, AND MOBILE TERMINAL CONTROL METHOD

Also Published As

Publication number Publication date
JP5602075B2 (en) 2014-10-08

Similar Documents

Publication Publication Date Title
ES2949237T3 (en) Electronic device and communication procedure thereof
EP2454912B1 (en) Updating method and apparatus of sleep mode operation
US8994840B2 (en) Apparatus, method, and computer-readable storage medium for communicating between devices of an image capturing system
US8730859B2 (en) Method and apparatus of sleep mode operation
US10051448B2 (en) Wireless communication device and processor for changing connection interval between devices in short range wireless communication
KR20110000479A (en) Apparatus and method for operating sleep mode
US10135710B2 (en) Information processing apparatus
JP2014155281A (en) Power feeding device, image forming apparatus, power feeding method, and program
JP5602075B2 (en) PORTABLE ELECTRONIC DEVICE, COMMUNICATION METHOD USED FOR IC CARD AND PORTABLE ELECTRONIC DEVICE
WO2010102836A1 (en) Process of audio data exchanges of information between a central unit and a bluetooth controller
CN105992133B (en) Wireless communication device and method, and electronic timepiece
JP5534969B2 (en) IC card, communication system, and communication method used for IC card
JP2007067818A (en) Communication terminal device, communication system and communication method
JP5481355B2 (en) Wireless transmission device and reception device
JP2013003676A (en) Portable electronic device, ic card, communication system, and control method of portable electronic device
WO2014024175A2 (en) Managing timers
JP2021193765A (en) Electronic device and control method of electronic device
JP2020512769A (en) System information transmitting method and device, system information receiving method, device and program
JP2008131467A (en) Communication equipment
CN111385801B (en) Wireless communication system and wireless communication method
JP6215816B2 (en) Communication terminal
US20220174785A1 (en) Data processing and communication methods, memory, communication terminal, apparatus, and device
JP2013069062A (en) Ic card, portable electronic device, and self-diagnosis method of ic card
JP2011010060A (en) Communication system
JP2018074459A (en) Radio communication apparatus and radio communication system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130529

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

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131227

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

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140121

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140320

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: 20140722

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140819

R151 Written notification of patent or utility model registration

Ref document number: 5602075

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees