JP2522442B2 - IC card reader / writer - Google Patents

IC card reader / writer

Info

Publication number
JP2522442B2
JP2522442B2 JP2149596A JP14959690A JP2522442B2 JP 2522442 B2 JP2522442 B2 JP 2522442B2 JP 2149596 A JP2149596 A JP 2149596A JP 14959690 A JP14959690 A JP 14959690A JP 2522442 B2 JP2522442 B2 JP 2522442B2
Authority
JP
Japan
Prior art keywords
card
protocol
writer
reader
communication
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.)
Expired - Lifetime
Application number
JP2149596A
Other languages
Japanese (ja)
Other versions
JPH0442383A (en
Inventor
誠治 平野
義一 寄本
正志 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toppan Inc
Original Assignee
Toppan Printing Co Ltd
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 Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP2149596A priority Critical patent/JP2522442B2/en
Publication of JPH0442383A publication Critical patent/JPH0442383A/en
Application granted granted Critical
Publication of JP2522442B2 publication Critical patent/JP2522442B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 <産業上の利用分野> 本発明はICカードシステムにおけるリーダライタ、詳
しくは所定の通信プロトコルに基づいてICカードとの間
でデータの授受を行うICカード用リーダライタの改良に
関する。
DETAILED DESCRIPTION OF THE INVENTION <Industrial field of application> The present invention relates to a reader / writer in an IC card system, and more specifically, to an IC card reader / writer for exchanging data with an IC card based on a predetermined communication protocol. Regarding improvement.

<従来の技術> ICカードシステムにおいては、ホストコンピュータと
ICカードとの間の通信において、リーダライタはその通
信の仲介となるものである。そして、リーダライタとIC
カードとは、共通の通信プロトコルにしたがって、すな
わち特定のフォーマットのブロック毎に、コマンド、デ
ータの授受を行なっている。
<Prior art> In an IC card system, a host computer and
In communication with the IC card, the reader / writer acts as an intermediary for that communication. And reader / writer and IC
Commands and data are exchanged with the card according to a common communication protocol, that is, for each block of a specific format.

このリーダライタは、従来、一種類のプロトコルに対
してしか対応する(通信する)ことができなかった。
Conventionally, this reader / writer was able to support (communicate) only one type of protocol.

すなわち、リーダライタのCPUと同一の周波数、同一
の通信速度で動作するCPUを有するICカードであって
も、リーダライタの保有するプロトコルと、そのICカー
ドの保有するプロトコルとが異なれば、リーダライタは
そのICカードとの間で通信を行うことは不可能であっ
た。
That is, even if the IC card has a CPU that operates at the same frequency and communication speed as the CPU of the reader / writer, if the protocol of the reader / writer and the protocol of the IC card are different, the reader / writer Was unable to communicate with the IC card.

換言すると、従来のリーダライタは単一のプロトコル
を保有しており、このプロトコルに基づいてしかICカー
ドとの間で通信を行うことはできなかったのである。
In other words, the conventional reader / writer has a single protocol and can communicate with the IC card only based on this protocol.

更に、最近では、ICカードにあってもその保有するプ
ロトコルが多様化し、上述のように一種類のプロトコル
しか持たないリーダライタでは、このように様々なプロ
トコルを有するICカードに対しては対応(データ通信)
しきれなくなってきた。
Further, recently, even IC cards have various diversified protocols, and the reader / writer that has only one type of protocol as described above is compatible with IC cards having such various protocols ( data communication)
I can't handle it.

<発明が解決しようとする課題> 以上のように、従来のICカード用リーダライタにあっ
ては、単一のプロトコルにのみ基づいてICカードと通信
を行うものであったため、それとは異なるプロトコルに
基づいて動作するICカードとの間では通信を行う(デー
タの授受を行う)ことができないという課題があった。
<Problems to be Solved by the Invention> As described above, since the conventional IC card reader / writer communicates with the IC card based on only a single protocol, a protocol different from that is used. There is a problem that communication (data transfer) cannot be performed with an IC card that operates based on the above.

したがって、複数の種類のICカード、すなわちそれぞ
れが異なるプロトコルで動作する複数のICカードを含む
ICカードシステムを構築しようとした場合にも、リーダ
ライタそのものをこの複数のプロトコルに対応可能なよ
うに複数種類配置する必要がある等、システム全体とし
ての構成が複雑なものとなっていた。
Therefore, it includes multiple types of IC cards, that is, multiple IC cards, each operating under a different protocol.
Even when trying to build an IC card system, it was necessary to arrange multiple types of reader / writers themselves so as to support these multiple protocols, and the overall system configuration was complicated.

また、このような従来のリーダライタでは、例えば1
台でプロトコルの異なる複数のICカードに対応させよう
とすると、上位レイヤ(アプリケーションプログラム
等)での管理が必要になるという課題があった。
Further, in such a conventional reader / writer, for example,
There was a problem that management of higher layers (application programs, etc.) would be required when trying to support multiple IC cards with different protocols on each platform.

<発明の目的> そこで、本発明の目的は、以下の通りである。<Objects of the Invention> Therefore, the objects of the present invention are as follows.

リーダライタ自身、または、ホストコンピュータから
の信号によりプロトコルを選択し、1台のリーダライタ
で、それぞれ異なるプロトコルを保有する複数のICカー
ドまたは1枚のICカードであって複数のプロトコルを保
有するものに対してアクセスが可能なリーダライタを提
供することである。
A reader / writer itself or a protocol selected by a signal from a host computer, and one reader / writer has a plurality of IC cards each having a different protocol or one IC card having a plurality of protocols. It is to provide a reader / writer which can be accessed.

ICカードとのセッション中にそのプロトコルを切り換
えることができ、例えばバイトトランスミッションタイ
プのプロトコルからブロックトランスミッションタイプ
のプロトコルに切り換えることにより、データの伝送効
率を高めることができるリーダライタを提供することで
ある。
It is an object of the present invention to provide a reader / writer capable of switching its protocol during a session with an IC card, for example, by switching from a byte transmission type protocol to a block transmission type protocol, thereby improving the data transmission efficiency.

例えばバイトトランスミッションとブロックトランス
ミッションとの2種類のプロトコルを有するICカードを
使用した場合、ハードリセット後のシーケンスは、バイ
トトランスミッションで行い、セッション中にプロトコ
ルをブロックトランスミッションに切り換えることによ
り、データ伝送効率が上昇するものである。
For example, if an IC card with two types of protocols, byte transmission and block transmission, is used, the sequence after the hard reset is performed by byte transmission, and the protocol is switched to block transmission during the session to increase the data transmission efficiency. To do.

<課題を解決するための手段> 本発明は、第1図に示すように、互いに異なる複数の
プロトコルに基づいて、ICカード100との間で通信を可
能とする通信制御手段210を有するICカード用リーダラ
イタ200にあって、上記ICカード100との通信に用いられ
ているプロトコルを他のプロトコルに切り換えるように
上記通信制御手段210を制御するプロトコル切り換え手
段220を有し、このプロトコル切り換え手段220は、ICカ
ード100から送信されるプロトコルタイプを有する情報
に基づき、および/または、当該ICカード用リーダライ
タ200に接続されるホストコンピュータからの切り換え
命令に基づき、ICカード100に対応するプロトコルに切
り換えるICカード用リーダライタである。
<Means for Solving the Problem> As shown in FIG. 1, the present invention is an IC card having a communication control means 210 that enables communication with the IC card 100 based on a plurality of different protocols. The reader / writer 200 for use has a protocol switching means 220 for controlling the communication control means 210 so as to switch the protocol used for communication with the IC card 100 to another protocol. Switches to the protocol corresponding to the IC card 100 based on the information having the protocol type transmitted from the IC card 100 and / or based on the switching command from the host computer connected to the IC card reader / writer 200. IC card reader / writer.

<作用> 本発明に係るICカード用リーダライタにあっては、通
信制御手段210が共通に保有するプロトコルに基づいてI
Cカード100との間で通信を行う。このとき、通信制御手
段210は、それぞれが異なる複数のプロトコルにより、I
Cカードとの間で通信が可能である。
<Operation> In the IC card reader / writer according to the present invention, the I / O based on the protocol commonly held by the communication control means 210
Communicates with the C card 100. At this time, the communication control means 210 uses I
Communication is possible with the C card.

そして、プロトコル切換手段220は、この通信制御手
段210を制御することにより、ICカード100との間で用い
られているプロトコルを他のプロトコルに切り換える。
例えばホストコンピュータからの指令により、または、
リーダライタでの選択により、プロトコルを切り換える
ものである。
Then, the protocol switching unit 220 controls the communication control unit 210 to switch the protocol used with the IC card 100 to another protocol.
For example, by a command from the host computer, or
The protocol is switched according to the selection made by the reader / writer.

この結果、それぞれ異なるプロトコルに基づいて通信
可能な複数のICカードとの間でも、このリーダライタは
通信を行うことができる。また、異なる複数のプロトコ
ルによって通信可能な1枚のICカードとの間では、その
通信中にプロトコルを別のプロトコルに切り換えること
もできる。
As a result, the reader / writer can communicate with a plurality of IC cards that can communicate based on different protocols. In addition, the protocol can be switched to another protocol during the communication with one IC card that can communicate with a plurality of different protocols.

<実施例> 以下、本発明の実施例を図面を参照して説明する。<Example> Hereinafter, an example of the present invention will be described with reference to the drawings.

第2図〜第10図は本発明の一実施例を説明するための
図である。
2 to 10 are views for explaining one embodiment of the present invention.

第2図において、11はリーダライタであって、このリ
ーダライタ11はICカード12との間で所定の通信プロトコ
ルにしたがってデータの授受を行うとともに、ホストコ
ンピュータとの間で通信を行うものである。
In FIG. 2, 11 is a reader / writer, and this reader / writer 11 exchanges data with the IC card 12 in accordance with a predetermined communication protocol and also communicates with a host computer. .

同図に示すように、リーダライタ11は、CPU13を有し
ており、このCPU13はROM14、RAM15とバスを介して接続
されている。ROM14は例えば通信制御のプログラムを格
納するものである。
As shown in the figure, the reader / writer 11 has a CPU 13, which is connected to the ROM 14 and the RAM 15 via a bus. The ROM 14 stores, for example, a communication control program.

16はICカード12が装着されるカード装着機構であっ
て、このカード装着機構16は機構コントロール回路17に
より制御される。機構コントロール回路17はCPU13によ
って制御されている。
Reference numeral 16 denotes a card mounting mechanism to which the IC card 12 is mounted, and the card mounting mechanism 16 is controlled by the mechanism control circuit 17. The mechanism control circuit 17 is controlled by the CPU 13.

また、18はこのICカード12との電気的接続を行うため
のICカードコンタクトであって、ICカードインタフェー
ス19を介してICカード12とのデータの授受をCPU13は行
うものである。
Reference numeral 18 denotes an IC card contact for electrically connecting with the IC card 12, and the CPU 13 exchanges data with the IC card 12 via the IC card interface 19.

20はホストコンピュータとCPU13とを接続するための
ホストインタフェースを示している。
Reference numeral 20 denotes a host interface for connecting the host computer and the CPU 13.

2はキーボード(キーパッド)22との接続のためのキ
ーパッドインタフェースである。
Reference numeral 2 is a keypad interface for connecting to a keyboard (keypad) 22.

更に、23はリーダライタ11の電源である。 Further, 23 is a power source of the reader / writer 11.

なお、ICカードコンタクト18を介してリーダライタ11
からICカード12に対しては電源VCC,クロック信号Clk,
接地レベルGND、リセット信号RSTが供給されている。
In addition, the reader / writer 11 via the IC card contact 18
From the IC card 12 to the power supply VCC, clock signal Clk,
The ground level GND and reset signal RST are supplied.

ICカード12は、データ授受等の制御、演算を行うMP
U、このMPUにバスによって接続されたメモリ等を有して
いる。そして、ICカード12は所定のプロトコルに基づい
て上記リーダライタ11との間での通信を行うものであ
る。
The IC card 12 is an MP that controls and calculates data, etc.
U, and a memory connected to this MPU by a bus. Then, the IC card 12 communicates with the reader / writer 11 based on a predetermined protocol.

この場合、プロトコルの種類に基づく通信フォーマッ
トとしては、例えば第3図(A),(B)に示すような
ものが知られている。
In this case, as a communication format based on the type of protocol, for example, those shown in FIGS. 3 (A) and 3 (B) are known.

第3図(A)においては、第1のタイプのプロトコル
の通信ブロックのキャラクタ構成を示している。
FIG. 3 (A) shows the character configuration of the communication block of the first type protocol.

この第1のタイプのプロトコルの通信ブロックは、最
初にスタートフラグを示す1バイトのキャラクタSRA
を、次に通信ブロック長を示す1バイトのキャラクタLE
Nを、その後に通信ブロック(1〜255バイト)を、更に
チェックコードを示す1バイトのキャラクタEDCを、有
している。なお、EDCはLENから通信ブロックまでのEXOR
である。
The communication block of this first type protocol is a 1-byte character SRA that indicates the start flag first.
, And then the 1-byte character LE indicating the communication block length
It has N, followed by a communication block (1-255 bytes), and also a 1-byte character EDC indicating the check code. EDC is EXOR from LEN to communication block.
Is.

第3図(B)は、第2のタイプのプロトコルにおける
通信ブロックのキャラクタ構成を示している。
FIG. 3B shows the character configuration of the communication block in the second type protocol.

スタートフラグを示す1バイトの「:」と、通信ブロ
ック長を示す2バイトのl,lと、通信ブロック(1〜655
バイト)と、チェックコードを示す1バイトのccと、か
ら構成されている。チェックコードは、1から通信ブロ
ックの最後までを16進数で加算し、その値の2の補数で
ある。
1 byte “:” indicating the start flag, 2 bytes l, l indicating the communication block length, and the communication block (1 to 655
Byte) and 1 byte cc indicating the check code. The check code is a two's complement of the value obtained by adding hexadecimal numbers from 1 to the end of the communication block.

そして、ICカード12がいずれのタイプのプロトコルに
基づいて通信が可能であるかは、ICカード12からのATR
(Answer To Reset)情報のプロトコルタイプを示す
キャラクタにより判断することができる。
The ATR from the IC card 12 determines which type of protocol the IC card 12 can communicate with.
(Answer To Reset) It can be determined by the character indicating the protocol type of the information.

第4図はこのリーダライタ11と複数のICカード12との
関係を示している。すなわち、タイプの異なるプロトコ
ル(T1,T2)に基づいて該ICカード12と通信を可能なリ
ーダライタ11は、例えばタイプ1のプロトコル(T1)を
有するICカード12a、タイプ2のプロトコル(T2)を有
するICカード12B、両タイプのプロトコル(T1,T2)を有
するICカード12C、のそれぞれに対して通信を行うこと
ができる。
FIG. 4 shows the relationship between the reader / writer 11 and a plurality of IC cards 12. That is, the reader / writer 11 capable of communicating with the IC card 12 based on different types of protocols (T1, T2) includes, for example, an IC card 12a having a type 1 protocol (T1) and a type 2 protocol (T2). It is possible to perform communication with each of the IC card 12B included therein and the IC card 12C including both types of protocols (T1, T2).

このリーダライタ11は、例えばICカード12Aとはタイ
プ1のプロトコルT1で、ICカード12Bとはタイプ2のプ
ロトコルT2にしたがって、ICカード12Cとは両タイプの
プロトコルT1およびT2に基づいて、それぞれ通信を行う
ことができるものである。
For example, the reader / writer 11 communicates with the IC card 12A according to the type 1 protocol T1, according to the IC card 12B according to the type 2 protocol T2, and with the IC card 12C according to both types of protocols T1 and T2. Is what you can do.

このリーダライタ11にあっては、上記ICカード12のハ
ードリセット時に送られてきたATR情報に基づいてそのI
Cカード12がどのタイプのプロトコルを有しているかを
判断する。そして、そのプロトコルに対応してリーダラ
イタ11は通信のためのプロトコルを切り換えるものであ
る。また、ホストコンピュータからの命令によりそのプ
ロトコルを切り換えることもできる。また、ホスト機能
を有するスタンドアローン型のリーダライタでは、それ
自身の切換命令により、プロトコルを切り換えることも
できる。
This reader / writer 11 uses the ATR information sent when the IC card 12 is hard reset
Determine what type of protocol the C card 12 has. Then, the reader / writer 11 switches the protocol for communication according to the protocol. Also, the protocol can be switched by an instruction from the host computer. Further, in a stand-alone type reader / writer having a host function, the protocol can be switched by its own switching command.

以下、第5図〜第10図のフローチャートに基づいてリ
ーダライタ11とICカード12との通信について説明する。
Communication between the reader / writer 11 and the IC card 12 will be described below with reference to the flowcharts of FIGS.

リーダライタ11は電源がONになると、ホストコンピュ
ータからの受信ルーチン(第5図)を実行する。
The reader / writer 11 executes a receiving routine from the host computer (FIG. 5) when the power is turned on.

まず、ホスト側から送信要求があったかをチェックし
(ステップS501)、送信要求があるとホスト側からのデ
ータを受信する(S502)。
First, it is checked whether there is a transmission request from the host side (step S501), and if there is a transmission request, data from the host side is received (S502).

このデータがリーダライタ制御コマンドであるか判断
し(S503)、そうであればリーダライタの制御のサブル
ーチン(第6図)を実行する。
It is determined whether this data is a reader / writer control command (S503), and if so, a reader / writer control subroutine (FIG. 6) is executed.

リーダライタの制御コマンドでなければICカード側に
そのデータを送信する(S505)。この送信サブルーチン
は第9図に示している。そして、ICカード側からのデー
タを受信する(S506)。この受信サブルーチンは第10図
に示している。
If it is not the control command of the reader / writer, the data is transmitted to the IC card side (S505). This transmission subroutine is shown in FIG. Then, the data from the IC card side is received (S506). This reception subroutine is shown in FIG.

そして、リーダライタ11はデータをホストコンピュー
タ側に送信する(S507)。
Then, the reader / writer 11 transmits the data to the host computer side (S507).

ホストコンピュータからのデータがリーダライタの制
御コマンドであった場合には、第6図に示すように、ま
ず、ハードリセット命令かを判断する(S601)。
If the data from the host computer is a control command for the reader / writer, first, as shown in FIG. 6, it is determined whether the command is a hard reset command (S601).

ハードリセット命令であるときは、ICカード12に対し
て電源、クロック等を供給し、リセットする(S602)。
そして、ICカード12からのATR情報を受信するまで待つ
(S603)。このATR情報からICカード12の保有するプロ
トコルのタイプを選択し、ICカード12とのプロトコルを
決定する(S604)。このプロトコル選択サブルーチンは
第7図に示す。
If the command is a hard reset command, the IC card 12 is supplied with power, a clock, and the like to be reset (S602).
Then, it waits until it receives the ATR information from the IC card 12 (S603). The type of protocol held by the IC card 12 is selected from this ATR information, and the protocol with the IC card 12 is determined (S604). This protocol selection subroutine is shown in FIG.

ハードリセット命令でない場合には、プロトコル切換
命令か否かを判定する(S605)。
If it is not a hard reset command, it is determined whether it is a protocol switching command (S605).

切換命令であれば、プロトコルのタイプを現行のもの
から別のタイプに切り換える(S606)。このサブルーチ
ンは第8図に示す。
If it is a switching command, the protocol type is switched from the current type to another type (S606). This subroutine is shown in FIG.

そして、ホストへの出力バッファにメッセージ(プロ
トコルタイプT1またはT2)をセットする(S607)。
Then, the message (protocol type T1 or T2) is set in the output buffer to the host (S607).

上記ステップS605にてプロトコル切換命令でもない場
合には、ICカード12排出命令かどうかを判断する(S60
8)。排出命令ならばICカード12のパワーをOFFとしてカ
ードを排出する(S609)。そして、プロトコルフラグに
「1」をセットする(S610)。更に、出力バッファにカ
ードアウトとのメッセージをセットする(S611)。
If it is not the protocol switching command in step S605, it is determined whether it is the IC card 12 discharge command (S60
8). If it is a discharge command, the power of the IC card 12 is turned off and the card is discharged (S609). Then, the protocol flag is set to "1" (S610). Further, a card-out message is set in the output buffer (S611).

カード排出命令でもない場合には(S608でNO)、コマ
ンドエラーであると判断してエラーメッセージをバッフ
ァにセットする(S612)。
If it is not a card ejection command (NO in S608), it is determined that a command error has occurred and an error message is set in the buffer (S612).

このようにしてこのリセットライタの制御のためのプ
ログラムは終了する。
In this way, the program for controlling the reset writer ends.

プロトコル選択サブルーチン(第7図)は、まず、IC
カード12からのATR情報によりプロトコルタイプ1(第
3図(A))であるかをチェックする(S701)。
The protocol selection subroutine (Fig. 7) starts with IC
It is checked from the ATR information from the card 12 whether the protocol type is 1 (FIG. 3 (A)) (S701).

ICカード12の保有するプロトコルタイプが1であれ
ば、プロトコルフラグに「1」をセットする(S702)。
そして、ホストコンピュータへの出力バッファにATR情
報(プロトコルフラグを含む)をセットする(S703)。
If the protocol type held by the IC card 12 is 1, the protocol flag is set to "1" (S702).
Then, the ATR information (including the protocol flag) is set in the output buffer to the host computer (S703).

プロトコルタイプ1でない場合は、プロトコルタイプ
2かを判定する(S704)。プロトコルタイプが第3図
(B)に示すように2であれば、プロトコルフラグに
「2」をセットして(S705)次のステップS703に進む。
If it is not protocol type 1, it is determined whether it is protocol type 2 (S704). If the protocol type is 2, as shown in FIG. 3 (B), "2" is set in the protocol flag (S705) and the process proceeds to the next step S703.

プロトコルタイプが2でもなければ、プロトコルエラ
ーと判定してエラーメッセージをホストへの出力バッフ
ァにセットする(S706)。そして、プロトコルフラグに
ディフォルト値「1」をセットする。そして、メインル
ーチンに戻る(S707)。
If the protocol type is not 2, it is determined to be a protocol error and an error message is set in the output buffer to the host (S706). Then, the default value "1" is set in the protocol flag. Then, the process returns to the main routine (S707).

プロトコル切換サブルーチンは、第8図に示すよう
に、まず、コマンドパラメータが「1」かどうかを判断
する(S801)。「1」であれば、プロトコルフラグに
「1」をセットし(S802)、ホストコンピュータへのレ
スポンスにプロトコルタイプは1であるとのメッセージ
をセットする(S803)。
As shown in FIG. 8, the protocol switching subroutine first determines whether the command parameter is "1" (S801). If it is "1", "1" is set in the protocol flag (S802), and a message that the protocol type is 1 is set in the response to the host computer (S803).

コマンドパラメータが「1」でない場合は、「2」で
あるか判定する(S804)。「2」であれば、プロトコル
フラグに「2」をセットし(S805)、メッセージもプロ
トコルタイプ「2」であるとセットする(S806)。
If the command parameter is not "1", it is determined whether it is "2" (S804). If it is "2", the protocol flag is set to "2" (S805), and the message is also set to the protocol type "2" (S806).

コマンドパラメータが「2」でもない場合はコマンド
パラメータエラーであるとのエラーメッセージをホスト
へのレスポンスにセットする(S807)。
If the command parameter is not "2", an error message indicating a command parameter error is set in the response to the host (S807).

上記ホストコンピュータ側からの受信データがリーダ
ライタ11の制御コマンドでない場合には、第9図に示す
ICカード12へのデータ送信サブルーチンを実行する(S5
05)。そして、その後、ICカード12からのデータ受信サ
ブルーチン(第10図)を実行する(S506)。
If the received data from the host computer side is not the control command of the reader / writer 11, it is shown in FIG.
Execute the data transmission subroutine to the IC card 12 (S5
05). Then, after that, a data reception subroutine (FIG. 10) from the IC card 12 is executed (S506).

第9図に示すように、まず、プロトコルフラグは
「1」かどうかを判断する(S901)。「1」である場合
は、通信ブロックとして第3図(A)に示すフレームに
よって送信する。キャラクタSRAに「3A」Hをセットし
(S902)、LENにデータ長をセットする(S903)。さら
に、送信レングスを示すカウンタL(2バイト)に「0
0」Hを付加してデータ長をセットする(S904)。
As shown in FIG. 9, first, it is determined whether the protocol flag is "1" (S901). If the value is "1", it is transmitted by the frame shown in FIG. 3 (A) as a communication block. "3A" H is set to the character SRA (S902), and the data length is set to LEN (S903). Furthermore, the counter L (2 bytes) indicating the transmission length is set to "0.
"0" H is added to set the data length (S904).

プロトコルフラグが「1」でない場合は、スタートフ
ラグを「:」にセットし(S905)、llにデータ長をセッ
トする(S906)。第3図(B)の場合である。そして、
ステップS904に進む。
If the protocol flag is not "1", the start flag is set to ":" (S905) and the data length is set to ll (S906). This is the case of FIG. And
It proceeds to step S904.

このステップ(S904)につづいて、ステップS907では
1バイトのデータを送信する。そして、カウンタLをデ
クリメントし(S908)、カウンタLが0になるまでこの
送信を繰り返す(S909〜S907〜S908〜S909)。
Following this step (S904), 1-byte data is transmitted in step S907. Then, the counter L is decremented (S908), and this transmission is repeated until the counter L becomes 0 (S909 to S907 to S908 to S909).

送るべきデータがなくなると(L=0)、チェックコ
ード(EDCまたはCC)を送信する(S910)ことにより送
信は終了する。
When there is no more data to send (L = 0), a check code (EDC or CC) is sent (S910), and the sending ends.

一方、データの受信は、まず、ICカード12からのデー
タを1バイト受信する(S1001)。
On the other hand, for data reception, first, 1 byte of data from the IC card 12 is received (S1001).

この1バイトデータが「3A」かをチェックし(S100
2)、そうであるならばプロトコルタイプは1(第3図
A))であるので、1バイトデータを受信する(S100
3)。
Check if this 1-byte data is "3A" (S100
2), and if so, the protocol type is 1 (FIG. 3A)), so 1-byte data is received (S100
3).

そして、レングスを2バイトにしてカウンタLにセッ
トする(S1004)。
Then, the length is set to 2 bytes and set in the counter L (S1004).

また、「3A」でない場合には(S1002でNO)、その1
バイトデータが「:」であるか否かをさらに判断する
(S1011)。
If it is not "3A" (NO in S1002), 1
It is further determined whether or not the byte data is ":" (S1011).

「:」の場合にはプロトコルタイプは2(第3図
(B))であるので、次の2バイトデータを受信し(S1
012)、その値をカウンタLにセットする(S1013)。
In the case of ":", the protocol type is 2 (Fig. 3 (B)), so the next 2-byte data is received (S1
Then, the value is set in the counter L (S1013).

なお、「:」でもない場合はプロトコルエラーのメッ
セージをホストへの出力バッファにセットしてこのフロ
ーチャートを終了することとなる(S1014)。
If it is not ":", a protocol error message is set in the output buffer to the host, and this flow chart ends (S1014).

このようにして2バイトのカウンタLに所定のデータ
数がセットされると(S1004またはS1013)、次のデータ
を1バイトずつ受信し(S1005)、カウンタをデクリメ
ントし(S1006)、カウンタが0になるまでデータを受
信する(S1007)。ステップS1005〜S1007をループする
ものである。
When a predetermined number of data is set in the 2-byte counter L (S1004 or S1013) in this way, the next data is received byte by byte (S1005), the counter is decremented (S1006), and the counter is reset to 0. Data is received until (S1007). This is a loop of steps S1005 to S1007.

そして、データの受信が終了するとチェックコードを
受信し(S1008)、チェックコードエラーをチェックす
る(S1009)。
When the data reception is completed, the check code is received (S1008) and the check code error is checked (S1009).

チェックコードエラーでない場合はホストへの出力バ
ッファに受信データをセットし(S1010)、チェックコ
ードエラーの場合はトランスミッションエラーとしてエ
ラーメッセージをセットする(S1015)。
If it is not a check code error, the received data is set in the output buffer to the host (S1010), and if it is a check code error, an error message is set as a transmission error (S1015).

以上のようにしてICカード12からのデータ受信は終了
する。
The data reception from the IC card 12 is completed as described above.

<効果> 以上説明してきたように、本発明のICカード用リーダ
ライタにあっては、それぞれ異なるプロトコルで動作す
る複数のICカードに対してアクセス可能である。
<Effect> As described above, the IC card reader / writer according to the present invention can access a plurality of IC cards that operate under different protocols.

したがって、複数のプロトコルタイプのICカードを使
用するICカードシステムにおいて、次の効果がある。
Therefore, the following effects can be obtained in an IC card system using IC cards of a plurality of protocol types.

そのシステム構築が簡略化される。The system construction is simplified.

1つのリーダライタ装置によって対応することができ
る。
This can be handled by one reader / writer device.

リーダライタ装置でプロトコルをコントロールするた
め、上位レイヤでの管理が不必要となる。
Since the reader / writer device controls the protocol, management in the upper layer becomes unnecessary.

また、複数の異なるプロトコルを有する1枚のICカー
ドに対しても通信中にそのプロトコルを切り換えること
ができ、伝送効率を高めることができる。
Further, even for one IC card having a plurality of different protocols, the protocol can be switched during communication, and the transmission efficiency can be improved.

【図面の簡単な説明】[Brief description of drawings]

第1図は本発明に係るICカード用リーダライタの構成を
示すブロック図、第2図は本発明の一実施例のICカード
用リーダライタの概略構成を示すブロック図、第3図
(A),(B)は一実施例に係るブロックフォーマット
を示す図、第4図は一実施例に係るリーダライタとICカ
ードとの関係を示す概念図、第5図〜第10図は一実施例
に係るICカードとリーダライタとの間の通信手順を示す
フローチャートである。 100……ICカード、 200……リーダライタ、 210……通信制御手段、 220……プロトコル切換手段。
FIG. 1 is a block diagram showing a configuration of an IC card reader / writer according to the present invention, FIG. 2 is a block diagram showing a schematic configuration of an IC card reader / writer according to an embodiment of the present invention, and FIG. 3 (A). , (B) are diagrams showing a block format according to one embodiment, FIG. 4 is a conceptual diagram showing a relationship between a reader / writer and an IC card according to one embodiment, and FIGS. 5 to 10 are one embodiment. 7 is a flowchart showing a communication procedure between the IC card and the reader / writer. 100: IC card, 200: reader / writer, 210: communication control means, 220: protocol switching means.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭63−250726(JP,A) 特開 昭62−17866(JP,A) 「ICカードの規格化経緯と概論」第 8−11頁、第44−50頁(昭和60年7月10 日社団法人日本事務機械工業会発行) ─────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-63-250726 (JP, A) JP-A-62-17866 (JP, A) “Process and standard outline of IC card”, pages 8-11, Pages 44-50 (Published by Japan Business Machine Manufacturers Association on July 10, 1985)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】互いに異なる複数のプロトコルに基づい
て、ICカードとの間で通信を可能とする通信制御手段を
有するICカード用リーダライタにあって、 上記ICカードとの通信に用いられているプロトコルを他
のプロトコルに切り換えるように上記通信制御手段を制
御するプロトコル切り換え手段を有し、 このプロトコル切り換え手段は、ICカードから送信され
るプロトコルタイプを有する情報に基づき、および/ま
たは、当該ICカード用リーダライタに接続されるホスト
コンピュータからの切り換え命令に基づき、ICカードに
対応するプロトコルに切り換えることを特徴とするICカ
ード用リーダライタ。
1. An IC card reader / writer having communication control means for enabling communication with an IC card based on a plurality of different protocols, which is used for communication with the IC card. There is a protocol switching means for controlling the communication control means so as to switch the protocol to another protocol, and the protocol switching means is based on information having a protocol type transmitted from the IC card, and / or the IC card. An IC card reader / writer characterized by switching to a protocol corresponding to an IC card based on a switching command from a host computer connected to the reader / writer.
JP2149596A 1990-06-07 1990-06-07 IC card reader / writer Expired - Lifetime JP2522442B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2149596A JP2522442B2 (en) 1990-06-07 1990-06-07 IC card reader / writer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2149596A JP2522442B2 (en) 1990-06-07 1990-06-07 IC card reader / writer

Publications (2)

Publication Number Publication Date
JPH0442383A JPH0442383A (en) 1992-02-12
JP2522442B2 true JP2522442B2 (en) 1996-08-07

Family

ID=15478666

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2149596A Expired - Lifetime JP2522442B2 (en) 1990-06-07 1990-06-07 IC card reader / writer

Country Status (1)

Country Link
JP (1) JP2522442B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3568970B2 (en) * 1993-04-12 2004-09-22 株式会社東芝 IC card issuing device
US6678753B1 (en) 1995-12-20 2004-01-13 Fujitsu Limited IC card reading/writing apparatus and method for allowing use of multiple vendors
US6182162B1 (en) * 1998-03-02 2001-01-30 Lexar Media, Inc. Externally coupled compact flash memory card that configures itself one of a plurality of appropriate operating protocol modes of a host computer
KR100603612B1 (en) * 2004-12-20 2006-07-24 한국전자통신연구원 Apparatus and Method of RFID Reader Interface and Event Management for Heterogeneous Readers with Multi-Protocol
JP4681314B2 (en) * 2005-02-10 2011-05-11 フェリカネットワークス株式会社 Wireless communication system, reader / writer device, key management method, and computer program
EP1826709A3 (en) * 2006-02-24 2012-04-25 LG Electronics Inc. Method and apparatus for contactless interface on ICC supporting high speed interface
JP5564197B2 (en) * 2009-04-23 2014-07-30 株式会社メガチップス MEMORY CONTROL DEVICE, SEMICONDUCTOR MEMORY DEVICE, MEMORY SYSTEM, AND MEMORY CONTROL METHOD
JP5719954B2 (en) * 2014-04-23 2015-05-20 株式会社メガチップス MEMORY CONTROL DEVICE, SEMICONDUCTOR MEMORY DEVICE, MEMORY SYSTEM, AND MEMORY CONTROL METHOD

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58164354A (en) * 1982-03-25 1983-09-29 Nippon Telegr & Teleph Corp <Ntt> Speed matching communication system
JP2564480B2 (en) * 1985-07-16 1996-12-18 カシオ計算機株式会社 IC card system
JPH0736572B2 (en) * 1986-06-27 1995-04-19 株式会社東芝 Data transmission method
JPS63250726A (en) * 1987-04-07 1988-10-18 Hitachi Maxell Ltd Reader/writer
JP2652869B2 (en) * 1988-04-06 1997-09-10 日立マクセル株式会社 IC card control method
JPH02130670A (en) * 1988-11-10 1990-05-18 Fuji Electric Co Ltd Controller for card reader
JP2943989B2 (en) * 1988-11-22 1999-08-30 株式会社アマダ IC card reader / writer
JPH02140821A (en) * 1988-11-22 1990-05-30 Amada Co Ltd Reader/writer for ic card

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
「ICカードの規格化経緯と概論」第8−11頁、第44−50頁(昭和60年7月10日社団法人日本事務機械工業会発行)

Also Published As

Publication number Publication date
JPH0442383A (en) 1992-02-12

Similar Documents

Publication Publication Date Title
US4787028A (en) Multicommunication protocol controller
TWI293216B (en) Interface integrated circuit device for a usb connection
JP3522882B2 (en) Protocol switching method
JPH0644181A (en) Scsi bus system
JP2522442B2 (en) IC card reader / writer
JP4242572B2 (en) Image forming apparatus
JPH0567028A (en) Information processor
EP1146421B1 (en) Removable electronic device to enhance the functionality of a main processor and control method therefor
EP1617594A2 (en) A provisional log-in unit
JPH087779B2 (en) IC card
JP2995420B2 (en) Network disconnection method
JPS637057A (en) Signal transmission system
JPS6229364A (en) Facsimile system
JP3004440B2 (en) Printing method and apparatus
JPS6112423B2 (en)
JP2920555B2 (en) How to set addresses in the network
JP2001117742A (en) External character printing control system
JP2885951B2 (en) Print control device and control program selection method
JPH05150914A (en) Printer device
JPH0318952A (en) Data processor
JPH053608B2 (en)
JPS593542A (en) Data transferring system
JPS6038744B2 (en) speech synthesizer
JPH08106433A (en) Serial transfer circuit device
JPH0451308A (en) Keyboard