JP2004252499A - Reader/writer and communication system - Google Patents

Reader/writer and communication system Download PDF

Info

Publication number
JP2004252499A
JP2004252499A JP2003038904A JP2003038904A JP2004252499A JP 2004252499 A JP2004252499 A JP 2004252499A JP 2003038904 A JP2003038904 A JP 2003038904A JP 2003038904 A JP2003038904 A JP 2003038904A JP 2004252499 A JP2004252499 A JP 2004252499A
Authority
JP
Japan
Prior art keywords
communication
card
data
communication protocol
type
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.)
Withdrawn
Application number
JP2003038904A
Other languages
Japanese (ja)
Inventor
Yoshihiro Muto
義弘 武藤
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003038904A priority Critical patent/JP2004252499A/en
Publication of JP2004252499A publication Critical patent/JP2004252499A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a reader/writer which can be converted into both protocols of block transmission and character transmission. <P>SOLUTION: The reader/writer performing relay communication between a high-order terminal and an IC card is provided with a decision means deciding whether the installed IC card is a first type IC card performing communication based on a first protocol of character transmission or a second type IC card performing communication based on a second protocol of block transmission, a first conversion communication means converting data to the respective protocols and performing relay communication between the high-order terminal performing communication based on a third protocol of block transmission, which differs from the second protocol, and the first type IC card, a second conversion communication means converting data to the respective communication rules and performing relay communication between the high-order terminal and the second type IC card and a switching means making the first conversion communication means or the second conversion communication means perform communication based on a decision result of the decision means. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、パーソナルコンピュータ等の上位端末がICカードと通信するためのICカードリーダライタ装置に関する。
【0002】
【従来の技術】
ICカードリーダライタは、ICカードとコンピュータとの間の通信を仲介するものである。ICカードリーダライタとICカードとは、共通のプロトコルに従ってデータの授受を行う。
従来、ICカードリーダライタは、一種類のプロトコルに基づいてICカードと通信を行うものであり、それとは異なるプロトコルに基づいて通信するICカードとは通信できなかった。
【0003】
そのため、異なるプロトコルに従って通信する複数のICカードとコンピュータとが通信を行う場合、それぞれのICカードのプロトコルと共通のプロトコルに従って動作するICカードリーダライタを用意する必要があった。つまり、複数のICカードがそれぞれ異なるプロトコルに基づいて通信を行う場合、それぞれに対応可能なICカードリーダライタを用意する必要があった。
【0004】
そこで、特許文献1では、互いに異なる複数のプロトコルに基づいてICカードとの間で通信を可能とする通信制御手段を有するICカードリーダライタにあって、上記ICカードとの通信に用いられているプロトコルを他のプロトコルに切り換えるように上記通信制御手段を制御するプロトコル切り換え手段を有するICカードリーダライタに関する技術が公開されている。
【0005】
この技術によって、(1)ICカードリーダライタ自身、又はホストコンピュータからの信号により、プロトコルを選択し、1台のリーダライタで、それぞれ異なるプロトコルを保有する複数のICカード、又は1枚のICカードであって、複数のプロトコルを保有するものに対してアクセスが可能であり、また、(2)ICカードとのセッション中にそのプロトコルを切り換えることが出来、例えばバイトトランスミッションタイプのプロトコルからブロックトランスミッションタイプのプロトコルに切り換えることにより、データの伝送効率を高めることが出来る。
【0006】
【特許文献1】特開平4−42383号公報
【0007】
【発明が解決しようとする課題】
しかしながら、ICカードの通信規約は、国際標準ISO7816パート3記載の通信規約でT=1と呼ばれるブロック伝送とT=0と呼ばれるキャラクタ伝送とがあり、上記技術でICカードリーダライタは、ブロック伝送の通信規約では異なるプロトコルへ切り換えることが可能だが、キャラクタ伝送の通信規約へは切り換えることが出来ない。
【0008】
なぜなら、ブロック伝送と、キャラクタ伝送とは、通信データの構成だけでなく、データを送信する際の処理や、誤り検出などの処理が大きく異なり、ブロック伝送に基づいて通信を行うICカードと通信を行う際にICカードリーダライタに使われているICを、キャラクタ伝送に基づいて通信を行うICカードとの通信では使えないからである。
【0009】
本発明は、T=1と呼ばれるブロック伝送及びT=0と呼ばれるキャラクタ伝送の両規約に変換可能なICカードリーダライタを提供することを目的とする。
【0010】
【課題を解決するための手段】
上記目的を解決するために、上位端末が接続され、ICカードが装着され、前記ICカードと上位端末との間において情報の中継通信を行うリーダライタ装置であって、装着されたICカードが、キャラクタ伝送の通信手順を定めた第1通信規約に基づいて通信を行う第1種ICカードであるか、又はブロック伝送の通信手順を定めた第2通信規約に基づいて通信を行う第2種ICカードであるか判断する判断手段と、前記第2通信規約とは異なるブロック伝送の通信手順を定めた第3通信規約に基づいて通信を行う前記上位端末と、前記第1通信規約に基づいて通信を行う前記第1種ICカードとの間で、それぞれの通信規約に合わせてデータを変換して通信を中継する第1変換通信手段と、前記第3通信規約に基づいて通信を行う前記上位端末と、前記第2通信規約に基づいて通信を行う前記第2種ICカードとの間で、それぞれの通信規約に合わせてデータを変換して通信を中継する第2変換通信手段と、前記判断手段の判断結果に基づいて、前記第1変換通信手段と前記第2変換通信手段との何れかに通信を行わせる切換手段とを備える。
【0011】
これにより、ブロック伝送とキャラクタ伝送との両方に変換可能である。
【0012】
【発明の実施の形態】
以下、本発明の実施の形態である通信システム600について説明する。
1.通信システム600の構成
通信システム600は、図1に示すように、PC100(パーソナルコンピュータ)、リーダライタ200及びICカード300,400,500から構成される。
【0013】
PC100は、通信規約Cに基づいて通信を行う。通信規約Cは、国際標準ISO7816パート3に記載のT=1と呼ばれるブロック伝送の通信規約である。通信規約Cのデータの構成については、1.2.6(6)で説明する。
ICカード300〜500は、リーダライタ200に着脱可能であり、ICカード300〜500の何れかがリーダライタ200に接続される。ICカード300は、通信規約Aに基づいて通信を行う。通信規約Aは、通信規約Cとは異なるブロック伝送の通信規約である。同様に、ICカード400は、通信規約Bに、ICカード500は、通信規約Cに基づいて通信を行う。通信規約Bは、国際標準ISO7816パート3に記載のT=0と呼ばれるキャラクタ伝送の通信規約である。通信規約Bのデータの構成については、1.2.6(9)で説明する。
【0014】
リーダライタ200は、PC100と電気的に接続されている。リーダライタ200は、PC100からICカード300〜500の何れかにデータを伝送する際、それぞれのICカードの通信規約に合わせてデータを変換し、それぞれのICカードからの応答データをPC100の通信規約に合わせて逆変換する。
以下、リーダライタ200の構成について説明する。
1.1 リーダライタ200
リーダライタ200は、PC100と通信規約Cに基づいて通信し、リーダライタ200は、接続されたICカードと通信規約A,B又はCに基づいて通信する。
【0015】
リーダライタ200は、第1記憶部210、通信規約制御部220、中央演算処理部230、カード検出部240、第1入出力部250及び第2入出力部260から構成される。
以下、各構成について説明する。
1.1.1 第1入出力部250
第1入出力部250は、PC100と物理的に接続される。第1入出力部250は、通信規約Cに基づいて、PC100との間で情報の入出力を行う。
【0016】
1.1.2 第2入出力部260
第2入出力部260は、ICカードと物理的に接続される。第2入出力部260は、ICカード300が接続されたとき、通信規約Aに基づいてICカード300との間で情報の入出力を行う。また、ICカード400又は500が接続されたとき、それぞれ通信規約Bに基づいてICカード400と、又は通信規約Cに基づいてICカード500と情報の入出力を行う。
【0017】
1.1.3 カード検出部240
カード検出部240は、リーダライタ200にICカード300〜500の何れかが物理的に接続され、通信可能な状態であるか否かを検出する。ICカード300〜500の何れかを検出したか否かを示す検出信号を出力する。
1.1.4 第1記憶部210
第1記憶部210は、リーダライタ200内で処理される情報が格納される。
【0018】
1.1.5 中央演算処理部230
中央演算処理部230は、PC100から第1通信部222が受け取ったデータが、リーダライタ200内で処理する命令であった場合、命令に従って第2記憶部211が記憶しているプログラムを実行する。
1.1.6 通信規約制御部220
通信規約制御部220は、第2記憶部211、周辺制御部221、第1通信部222、初期応答解析部223、第1通信規約変換部224、第2通信部225、第2通信規約変換部226、第3通信部227、通信路制御部228及びタイプ記憶部229から構成される。
以下に各構成について説明する。
(1)第2記憶部211
第2記憶部211は、リーダライタ200内で行う処理を記述したプログラムを記憶している。
(2)タイプ記憶部229
タイプ記憶部229は、初期応答解析部223から受け取る通信規約の種別を記憶する。種別は、「A」、「B」又は「C」の何れかの値をとる。「A」は通信規約Aを示す。同様に「B」は通信規約Bを、「C」は通信規約Cを示す。
カードが接続されていないときは、種別を記憶しない。
(4)周辺制御部221
周辺制御部221は、PC100から第1入出力部250を介してデータを受信したか否かを判断する。
【0019】
(a1)データを受信していない場合、カード検出部240が出力する検出信号を受け取る。受け取った検出信号から、ICカード300〜500の何れかを検出したか否かを判断する。
(b1)検出信号がICカードを検出したことを示す場合、タイプ記憶部229に通信規約の種別が記憶されているか否かを判断する。タイプ記憶部229に種別が記憶されていない場合、初期応答解析部223に種別を判断させる。
【0020】
(b2)検出信号がICカードを検出していないことを示す場合、又はICカードを検出したことを示す場合であって、タイプ記憶部229に種別が記憶されている場合は、再び、上記の動作を繰り返す。
(a2)PC100からデータを受信した場合、第1通信手段に制御を移す。
(5)初期応答解析部223
リーダライタ200にICカード300が接続されている場合、初期応答解析部223は、ICカード300に対して、国際標準ISO記載の方法(ISO7816パート2)により、ICカード300を活性化する。
【0021】
活性化したICカード300から第2入出力部260を介して、ATR(Answer To Reset)を受け取る。ATRは、ICカード300の電気的・伝送プロトコル情報に関する属性情報である。属性情報は、ICカード300の通信規約の種別を含む。初期応答解析部223は、受け取ったATRを解析して、通信規約の種別を判断する。
【0022】
初期応答解析部223は、判断した通信規約の種別が通信規約Aであれば「A」の値をタイプ記憶部229に書き込む。
ICカード400又はICカード500が接続されている場合も同様にATRを解析し、種別が通信規約Bの場合は「B」の値を、通信規約Cの場合は「C」の値をタイプ記憶部229に書き込む。
(6)第1通信部222
第1通信部222は、通信規約Cに従ってPC100との通信を行う。
【0023】
ここで、ブロック伝送の通信規約である通信規約Cの送信データの構成を、図2(a)を用いて説明する。通信規約Cにより定められた送信データは、ヘッダ情報であるNAD、PCB及びLENと、通信ブロックであるCLS、COD、P1、P2、P3及びデータ部と、EDCとから構成される。
NADは、データの発信者及び受信者のアドレスを格納する。PCBは、通信ブロックの再送処理や一連の情報として次のブロックが存在するか否かの情報を格納する。LENは、通信ブロックの長さ情報を格納する。
【0024】
CLSは、通信ブロックの種別を示す情報を格納する。CODは、上位端末が意図する命令を格納する。P1、P2及びP3は、命令に付随する付加情報を格納する。データ部は、命令対象となる実際のデータを格納する。
EDCは、ヘッダ情報と通信ブロックの完全性を確認するためのチェックコードを格納する。
【0025】
以上のように、ブロック伝送は、これら全ての情報を一つのブロックとして送受信する通信規約である。
第1通信部222は、周辺制御部221からの起動により、PC100から送られるデータを、第1入出力部250を介して受信する。
受信するデータに次のブロックがあるか否かを判断し、ある場合は、次のブロックを受信する。
【0026】
データの受信が完了すると、通信異常があるか否かを判断する。通信異常が有る場合、PC100に再送要求を送信する。通信異常が無い場合、受信データのヘッダ情報を解析し、受信データの送信先を確認する。受信データの送信先がリーダライタ200である場合、リーダライタ200内で処理を行い、処理結果をPC100へ送信する。
【0027】
受信データの送信先がICカード300〜500の何れかである場合、カード検出部240が出力する検出信号を受け取る。検出信号がICカード300〜500の何れも検出していないことを示す場合、処理異常としての応答を作成し、第1入出力部250を介してPC100に送る。検出信号がICカード300〜500の何れか検出したことを示す場合、タイプ記憶部229に記憶している通信規約の種別を読み出す。読み出した種別が「A」であれば、第2通信規約変換部226に処理を移す。同様に、読み出した種別が「B」であれば、第1通信規約変換部224に、読み出した種別が「C」であれば、通信路制御部228に、処理を移す。
【0028】
第1通信部222は、第1通信規約変換部224又は第2通信規約変換部226が出力するICカード300又は400の応答データを、PC100へ送信する。
(7)第3通信部227
第3通信部227は、図2(a)に示す通信規約Aに従って、ICカード300と通信を行う。
【0029】
通信規約Aは、通信規約Cと異なるブロック伝送の通信規約である。通信規約Aのデータの構成は、通信規約Cのデータの構成と同様である。通信規約CとAとは、PCBの構成が異なる。
第3通信部227は、第2通信規約変換部226から受け取るデータをICカード300に送信する。また、再度第2通信規約変換部226からデータを受け取ると、データを再度送信する。
【0030】
第3通信部227は、ICカード300から受信する応答データを第2通信規約変換部226へ出力する。
(8)第2通信規約変換部226
第2通信規約変換部226は、通信規約Cに基づくデータを通信規約Aに基づくデータへ変換する。また、通信規約Aに基づくデータを通信規約Cに基づくデータへ逆変換する。
【0031】
通信規約AとCとはPCBのみ異なるため、第2通信規約変換部226は、PCBを変換又は逆変換するための変換表を備える。
第2通信規約変換部226は、PC100から受信する受信データを第1通信部222から受け取ると、通信規約Cに基づく受信データのPCBを、変換表に従って通信規約Aに基づくPCBに変換する。PCBを通信規約Aに基づくデータに変換された受信データを、第3通信部227に出力する。また、ICカード300からの通信異常の有無を確認する。通信異常がある場合、受信データを再度第3通信部に出力する。通信異常が無い場合、第3通信部227から受け取る、ICカード300からの応答データのPCBを、変換表に従って通信規約Cに基づくPCBに逆変換する。PCBを通信規約Cに基づくデータに逆変換された応答データを、第1通信部222に出力する。
(9)第2通信部225
第2通信部225は、通信規約Bに従って、ICカード400と通信を行う。
【0032】
ここで、キャラクタ伝送の通信規約である通信規約Bのデータの構成を、図2(b)を用いて説明する。
通信規約Bのデータは、CLS、COD、P1、P2及びP3から成るパラメータ部とデータ部とから成る通信ブロックで構成され、ヘッダ情報及びEDCは存在しない。
【0033】
以上のように、キャラクタ伝送は、これらの情報を1バイト単位で送受信する通信規約である。
第2通信部225は、PC100から受信する受信データのパラメータ部のデータを、第1通信規約変換部224から受け取り、受け取ったデータを1バイト単位でICカード400に送信する。また、第1通信規約変換部224から再度パラメータ部のデータを受け取ると、受け取ったデータを再度ICカード400へ送信する。
【0034】
第2通信部225は、第1通信規約変換部224から受信データのデータ部のデータを受け取り、受け取ったデータを1バイト単位でICカード400へ送信する。また、第1通信規約変換部224から再度データ部のデータを受け取ると、受け取ったデータを再度ICカード400へ送信する。
第2通信部225は、ICカード400からの応答データを受信する。受信した応答データは第1通信規約変換部224へ出力する。
(10)第1通信規約変換部224
第1通信規約変換部224は、通信規約Cに基づくデータを通信規約Bに基づくデータに変換する。また、通信規約Bに基づくデータを通信規約Cに基づくデータに逆変換する。
【0035】
第1通信規約変換部224は、PC100から受け取ったデータを、CLS、COD、P1、P2及びP3のコマンドのパラメータ部と、以降のデータ部とに分割する。第1通信規約変換部224は、分割したパラメータ部のデータを、第2通信部225に出力する。通信異常の有無を確認し、通信異常が有る場合は、データを再度第2通信部225へ出力する。
【0036】
第1通信規約変換部224は、第2通信部225から、ICカード400の応答データを受け取る。応答データが受け入れ可能を示すACK(ACKnowledgement)であるか否かを判断する。応答データが、ACK以外であれば、第2通信部225にパラメータ部のデータを再度出力する。
第1通信規約変換部224は、ICカード300からの応答データがACKであり、PC100から受信したデータにデータ部がある場合、データ部のデータを第2通信部225に出力する。
【0037】
第1通信規約変換部224は、通信異常の有無を確認する。通信異常がある場合は、第2通信部225にデータを再度出力する。
第1通信規約変換部224は、通信異常が無い場合、ICカード400からの応答データを反映させて、通信規約Cに基づくPCBを生成する。生成したPCBを含む応答データを第1通信部222に出力する。
(11)通信路制御部228
通信路制御部228は、ICカード500の通信規約が、通信規約Cである場合、PC100から送信されるデータをリーダライタ200の内部処理を通さずに、直接ICカード500に送る。また、ICカード500から送信される応答データを、PC100に送る。
2.通信システム600の動作
PC100は、通信規約Cに従って、データをリーダライタ200に送信する。リーダライタ200は、受信データを送信先のICカードの通信規約に合わせて変換し、送信する。
【0038】
以下にリーダライタ200の動作について説明する。
2.1 リーダライタ200の動作
(1) 周辺制御部221の動作
周辺制御部221の動作について、図3を用いて説明する。
周辺制御部221は、第1入出力部250を介してPC100から、データを受信したか否かを判断する(ステップS10)。データを受信していない場合(ステップS10でNO)、カード検出部240から検出信号を受け取る(ステップS11)。受け取った検出信号から、ICカード300〜500の何れかを検出したか否かを判断する(ステップS12)。検出信号が検出したことを示す場合(ステップS12でYES)、タイプ記憶部229に種別が記憶されているか否かを判断する(ステップS13)。種別が記憶されていない場合(ステップS13でNO)、初期応答解析部223に種別を判断させる(ステップS14)。検出信号が検出していないことを示す場合、(ステップS12でNO)、及び種別が記憶されている場合(ステップS13でYES)は、再び、PC100からデータを受信したか否かを判断する(ステップS10)。
【0039】
PC100からデータを受信した場合(ステップS10でYES)、制御を第1通信部222に移す(ステップS14)。
(2) 初期応答解析部223の動作
図3のステップS13での初期応答解析部223の動作について、図4を用いて説明する。
【0040】
初期応答解析部223は、接続されているICカードを活性化する(ステップS20)。活性化されたICカードから第2入出力部260を介してATRを受け取ると、受け取ったATRから接続されているICカードの通信規約の種別を判断する(ステップS21)。種別が通信規約Aである場合、タイプ記憶部229に「A」を書き込む(ステップS22)。同様に、種別が通信規約Bである場合、タイプ記憶部229に「B」を書き込み(ステップS23)、種別が通信規約Cである場合、タイプ記憶部229に「C」を書き込む(ステップS24)。
(3) 第1通信部222の動作
図3のステップS14での第1通信部222の動作について、図5、6を用いて説明する。
【0041】
第1通信部222は、周辺制御部221によって起動されると、PC100から送られてくるデータを、第1入出力部250を介して受信する(ステップS30)。次のブロックがあるか否かを判断し(ステップS31)、ある場合(ステップS31でYES)は、次のブロックを受信する(ステップS30)。次のブロックがない場合(ステップS31でNO)は、通信異常があるか否か判断する(ステップS32)。通信異常がある場合(ステップS32でYES)は、PC100に再送要求を送信する(ステップS33)。通信異常が無い場合(ステップS32でNO)は、受信データのヘッダ情報を解析し、データの送信先を確認する(ステップS34)。データの送信先がリーダライタ200である場合は、リーダライタ200内で処理を行い(ステップS35)、結果をPC100へ送信する(ステップS44)。データの送信先がICカード300〜500である場合、カード検出部240から検出信号を受け取る(ステップS36)。受け取った検出信号がICカード300〜500の何れかを検出したことを示すか否かを判断する(ステップS37)。検出信号が検出していないことを示す場合(ステップS37でNO)、異常処理応答を作成し(ステップS38)、作成した異常処理応答をPC100へ送信する(ステップS44)。検出信号が検出したことを示す場合(ステップS37でYES)、タイプ記憶部229に記憶している通信規約の種別を読み出し(ステップS39)、何れの通信規約か判断する(ステップS40)。通信規約Bである場合、第1通信規約変換部224に制御を移す(ステップS41)。同様に、通信規約Aである場合、第2通信規約変換部226に処理を移し(ステップS42)、通信規約Cである場合、通信路制御部228に処理を移す(ステップS43)。
【0042】
第1通信規約変換部224又は第2通信規約変換部226が出力する応答データを、PC100へ送信する(ステップS44)。
(4) 第1通信規約変換部224の動作
図6のステップS41での第1通信規約変換部224の動作を、図7を用いて説明する。
【0043】
第1通信規約変換部224は、PC100から受信したデータを第1通信部222から受け取ると、CLS、COD、P1、P2及びP3のコマンドのパラメータ部と、データ部に分割する(ステップS50)。分割されたパラメータ部のデータは、1バイト単位でICカード400へ送信するために、第2通信部225に出力する(ステップS51)。
【0044】
ICカード400からの通信異常の有無を確認し(ステップS52)、通信異常がある場合(ステップS52でYES)、再度送信するため第2通信部225にパラメータ部のデータを出力する(ステップS51)。
通信異常が無い場合(ステップS52でNO)、第2通信部225から受け取るICカード400の応答データが、ACKであるか否か判断する(ステップS53)。応答データがACKでない場合(ステップS53でNO)、再度送信するようパラメータ部のデータを第2通信部225に出力する(ステップS51)。応答データがACKである場合(ステップS53でYES)、PC100から受信したデータにデータ部が存在するか否か判断する(ステップS54)。データ部が存在しない場合(ステップS54でNO)、PC100へ返信する為のPCBを生成する(ステップS57)。
【0045】
PC100から受信したデータにデータ部が存在する場合(ステップS54でYES)、データ部のデータを1バイト単位でICカード400へ送信するため第2通信部225に出力する(ステップS55)。
送信したデータ部に対する通信異常の有無を確認し(ステップS56)、通信異常が有る場合(ステップS56でYES)、再度送信するよう第2通信部225にデータ部のデータを出力する(ステップS55)。通信異常が無い場合(ステップS56でNO)、ICカード400から受け取る応答データを反映させて、PC100へ返信する為のPCBを生成する(ステップS57)。生成したPCBを含む応答データを、PC100へ送信するために、第1通信部222に出力する。(ステップS58)
(5) 第2通信規約変換部226の動作
図6のステップS42での第2通信規約変換部226の動作を、図8を用いて説明する。
【0046】
第2通信規約変換部226は、PC100から受信したデータを第1通信部222から受け取ると、受信データのPCBを、変換表に従って通信規約Aに基づくPCBに変換する(ステップS60)。PCBを通信規約Aに基づくデータに変換された受信データを、ICカード300へ送信するために第3通信部227に出力する(ステップS61)。
【0047】
ICカード300からの通信異常の有無を確認し(ステップS62)、通信異常があれば(ステップS62でYES)、第3通信部227に再送信するよう受信データを出力する(ステップS61)。
通信異常が無ければ(ステップS62でNO)、ICカード300からの応答データのPCBを、変換表に基づいて通信規約CのPCBに逆変換する(ステップS63)。逆変換したPCBを含む応答データを、第1通信部222に出力する(ステップS64)。
【0048】
【発明の効果】
以上説明したように、本発明は、上位端末が接続され、ICカードが装着され、前記ICカードと上位端末との間において情報の中継通信を行うリーダライタ装置であって、装着されたICカードが、キャラクタ伝送の通信手順を定めた第1通信規約に基づいて通信を行う第1種ICカードであるか、又はブロック伝送の通信手順を定めた第2通信規約に基づいて通信を行う第2種ICカードであるか判断する判断手段と、前記第2通信規約とは異なるブロック伝送の通信手順を定めた第3通信規約に基づいて通信を行う前記上位端末と、前記第1通信規約に基づいて通信を行う前記第1種ICカードとの間で、それぞれの通信規約に合わせてデータを変換して通信を中継する第1変換通信手段と、前記第3通信規約に基づいて通信を行う前記上位端末と、前記第2通信規約に基づいて通信を行う前記第2種ICカードとの間で、それぞれの通信規約に合わせてデータを変換して通信を中継する第2変換通信手段と、前記判断手段の判断結果に基づいて、前記第1変換通信手段と前記第2変換通信手段との何れかに通信を行わせる切換手段とを備えることを特徴とするリーダライタ装置である。
【0049】
この構成によると、端末に搭載されているマイコンの一つのポートを利用し、ソフトウェアで対応しているので、リーダライタ装置は、ブロック伝送の通信規約とキャラクタ伝送の通信規約との両方に切り換え可能であり、上位端末において通信規約を意識して制御する必要が無く、上位端末での処理を簡素化出来るという効果がある。また、ブロック伝送とキャラクタ伝送とをソフトウェアでコントロールできることにより、端末内の処理が柔軟に行えるようになった。
【0050】
ここで、前記リーダライタ装置は、前記第3通信規約に基づいて通信を行う第3種ICカードと前記上位端末との間で通信を中継する場合、前記上位端末から受信するデータを、当該リーダライタ装置内で変換せずに前記第3種ICカードに送信し、前記第3種ICカードから受信するデータを、当該リーダライタ装置内で変換せずに前記上位端末に送信する通信路切換手段を含み、前記判断手段は、装着されたICカードが、前記第1種ICカードであるか、前記第2種ICカードであるか、前記第3種ICカードであるか判断し、前記切換手段は、前記判断結果が前記第3種ICカードである場合、前記通信路切換手段に通信を行わせるようにしても良い。
【0051】
この構成によると、ICカードの通信規約が上位端末の通信規約と同じ場合、リーダライタ装置内で処理せずに通信するため、通信時間を短縮することが出来ると共に、第3ICカードにも対応することが出来る。
【図面の簡単な説明】
【図1】ICカードリーダライタの構成を示すブロック図である。
【図2】ブロック伝送及びキャラクタ伝送のデータの構成を示す。
【図3】周辺制御部221の動作を示すフローチャートである。
【図4】初期応答解析部223の動作を示すフローチャートである。
【図5】第1通信部222の動作を示すフローチャートである。図6に続く。
【図6】第1通信部222の動作を示すフローチャートである。図5の続き。
【図7】第1通信規約変換部224の動作を示すフローチャートである。
【図8】第2通信規約変換部226の動作を示すフローチャートである。
【符号の説明】
100 PC
200 リーダライタ
210 記憶部
211 記憶部
220 通信規約制御部
221 周辺制御部
222 通信部
223 初期応答解析部
224 通信規約変換部
225 通信部
226 通信規約変換部
227 通信部
228 通信路制御部
229 タイプ記憶部
230 中央演算処理部
240 カード検出部
250 入出力部
260 入出力部
300,400,500 ICカード
600 通信システム
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an IC card reader / writer device for an upper terminal such as a personal computer to communicate with an IC card.
[0002]
[Prior art]
The IC card reader / writer mediates communication between the IC card and the computer. The IC card reader / writer and the IC card exchange data according to a common protocol.
Conventionally, an IC card reader / writer communicates with an IC card based on one type of protocol, and cannot communicate with an IC card that communicates based on a different protocol.
[0003]
Therefore, when a computer communicates with a plurality of IC cards that communicate according to different protocols, it is necessary to prepare an IC card reader / writer that operates according to a common protocol as the protocol of each IC card. That is, when a plurality of IC cards communicate based on different protocols, it is necessary to prepare an IC card reader / writer capable of handling each of them.
[0004]
Therefore, in Patent Document 1, there is an IC card reader / writer having communication control means for enabling communication with an IC card based on a plurality of different protocols, and is used for communication with the IC card. A technique relating to an IC card reader / writer having a protocol switching means for controlling the communication control means so as to switch a protocol to another protocol is disclosed.
[0005]
According to this technology, (1) a protocol is selected according to a signal from the IC card reader / writer itself or a host computer, and a plurality of IC cards each having a different protocol or one IC card is used by one reader / writer. It is possible to access a device having a plurality of protocols, and (2) to switch the protocol during a session with an IC card, for example, from a byte transmission type protocol to a block transmission type. By switching to this protocol, data transmission efficiency can be improved.
[0006]
[Patent Document 1] Japanese Patent Application Laid-Open No. 4-42383
[0007]
[Problems to be solved by the invention]
However, the communication protocol of the IC card includes a block transmission called T = 1 and a character transmission called T = 0 in the communication protocol described in the international standard ISO7816 part 3, and the IC card reader / writer uses the above technology to perform the block transmission. Although it is possible to switch to a different protocol according to the communication protocol, it is not possible to switch to a communication protocol for character transmission.
[0008]
This is because block transmission and character transmission differ not only in the configuration of communication data but also in data transmission processing and error detection processing. Communication with an IC card that performs communication based on block transmission is different from block transmission and character transmission. This is because an IC used in an IC card reader / writer cannot be used for communication with an IC card that performs communication based on character transmission.
[0009]
SUMMARY OF THE INVENTION An object of the present invention is to provide an IC card reader / writer which can be converted into both a block transmission called T = 1 and a character transmission called T = 0.
[0010]
[Means for Solving the Problems]
In order to solve the above object, a reader / writer device to which an upper terminal is connected, an IC card is mounted, and relays information between the IC card and the upper terminal is performed, wherein the mounted IC card is A first type IC card that performs communication based on a first communication protocol that defines a communication procedure for character transmission, or a second type IC that performs communication based on a second communication protocol that defines a communication procedure for block transmission A determination unit for determining whether the card is a card; the upper terminal that performs communication based on a third communication protocol that defines a communication procedure for block transmission different from the second communication protocol; A first conversion communication unit that converts data according to the respective communication protocol and relays communication with the first type IC card that performs the communication, and performs an upper communication that performs communication based on the third communication protocol. A second conversion communication means for converting data between the terminal and the second type IC card performing communication based on the second communication protocol according to the respective communication protocol and relaying the communication; Switching means for causing any one of the first conversion communication means and the second conversion communication means to perform communication based on a determination result of the means.
[0011]
Thereby, it is possible to convert to both block transmission and character transmission.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, a communication system 600 according to an embodiment of the present invention will be described.
1. Configuration of communication system 600
As shown in FIG. 1, the communication system 600 includes a PC 100 (personal computer), a reader / writer 200, and IC cards 300, 400, and 500.
[0013]
The PC 100 performs communication based on the communication protocol C. The communication protocol C is a communication protocol for block transmission called T = 1 described in International Standard ISO 7816 Part 3. The data structure of the communication protocol C will be described in 1.2.6 (6).
The IC cards 300 to 500 are detachable from the reader / writer 200, and one of the IC cards 300 to 500 is connected to the reader / writer 200. The IC card 300 performs communication based on the communication protocol A. The communication protocol A is a communication protocol for block transmission different from the communication protocol C. Similarly, the IC card 400 performs communication based on the communication protocol B, and the IC card 500 performs communication based on the communication protocol C. The communication protocol B is a communication protocol for character transmission called T = 0 described in International Standard ISO 7816 Part 3. The data structure of the communication protocol B will be described in 1.2.6 (9).
[0014]
The reader / writer 200 is electrically connected to the PC 100. When transmitting data from the PC 100 to any of the IC cards 300 to 500, the reader / writer 200 converts the data according to the communication protocol of each IC card, and converts the response data from each IC card into the communication protocol of the PC 100. Inverse conversion according to.
Hereinafter, the configuration of the reader / writer 200 will be described.
1.1 Reader / Writer 200
The reader / writer 200 communicates with the PC 100 based on the communication protocol C, and the reader / writer 200 communicates with the connected IC card based on the communication protocol A, B, or C.
[0015]
The reader / writer 200 includes a first storage unit 210, a communication protocol control unit 220, a central processing unit 230, a card detection unit 240, a first input / output unit 250, and a second input / output unit 260.
Hereinafter, each configuration will be described.
1.1.1 First Input / Output Unit 250
The first input / output unit 250 is physically connected to the PC 100. The first input / output unit 250 performs input / output of information with the PC 100 based on the communication protocol C.
[0016]
1.1.2 Second input / output unit 260
The second input / output unit 260 is physically connected to the IC card. When the IC card 300 is connected, the second input / output unit 260 inputs and outputs information to and from the IC card 300 based on the communication protocol A. When the IC card 400 or 500 is connected, information is input / output with the IC card 400 based on the communication protocol B or with the IC card 500 based on the communication protocol C, respectively.
[0017]
1.1.3 Card Detection Unit 240
The card detection unit 240 detects whether any of the IC cards 300 to 500 is physically connected to the reader / writer 200 and is in a communicable state. It outputs a detection signal indicating whether any of the IC cards 300 to 500 has been detected.
1.1.4 First Storage Unit 210
The first storage unit 210 stores information processed in the reader / writer 200.
[0018]
1.1.5 Central processing unit 230
When the data received by the first communication unit 222 from the PC 100 is a command to be processed in the reader / writer 200, the central processing unit 230 executes the program stored in the second storage unit 211 according to the command.
1.1.6 Communication Protocol Control Unit 220
The communication protocol control unit 220 includes a second storage unit 211, a peripheral control unit 221, a first communication unit 222, an initial response analysis unit 223, a first communication protocol conversion unit 224, a second communication unit 225, and a second communication protocol conversion unit. 226, a third communication unit 227, a communication path control unit 228, and a type storage unit 229.
Hereinafter, each configuration will be described.
(1) Second storage unit 211
The second storage unit 211 stores a program describing a process performed in the reader / writer 200.
(2) Type storage unit 229
The type storage unit 229 stores the type of the communication protocol received from the initial response analysis unit 223. The type takes one of the values “A”, “B” or “C”. “A” indicates the communication protocol A. Similarly, “B” indicates the communication protocol B, and “C” indicates the communication protocol C.
When the card is not connected, the type is not stored.
(4) Peripheral control unit 221
The peripheral control unit 221 determines whether data has been received from the PC 100 via the first input / output unit 250.
[0019]
(A1) When data is not received, a detection signal output by the card detection unit 240 is received. It is determined from the received detection signal whether any of the IC cards 300 to 500 has been detected.
(B1) When the detection signal indicates that the IC card has been detected, it is determined whether or not the type of the communication protocol is stored in the type storage unit 229. If the type is not stored in the type storage unit 229, the initial response analysis unit 223 is made to determine the type.
[0020]
(B2) If the detection signal indicates that the IC card has not been detected, or if it indicates that the IC card has been detected, and the type is stored in the type storage unit 229, Repeat the operation.
(A2) When data is received from the PC 100, the control is transferred to the first communication unit.
(5) Initial response analyzer 223
When the IC card 300 is connected to the reader / writer 200, the initial response analysis unit 223 activates the IC card 300 by a method described in the international standard ISO (ISO7816 part 2).
[0021]
An ATR (Answer To Reset) is received from the activated IC card 300 via the second input / output unit 260. The ATR is attribute information relating to the electrical / transmission protocol information of the IC card 300. The attribute information includes the type of the communication protocol of the IC card 300. The initial response analysis unit 223 analyzes the received ATR and determines the type of the communication protocol.
[0022]
If the type of the determined communication protocol is the communication protocol A, the initial response analysis unit 223 writes the value of “A” into the type storage unit 229.
The ATR is similarly analyzed when the IC card 400 or the IC card 500 is connected, and the value of “B” is stored when the type is the communication protocol B, and the value of “C” is stored when the type is the communication protocol C. Write to the section 229.
(6) First communication unit 222
The first communication unit 222 performs communication with the PC 100 according to the communication protocol C.
[0023]
Here, the configuration of the transmission data of the communication protocol C, which is the communication protocol of the block transmission, will be described with reference to FIG. The transmission data defined by the communication protocol C includes NAD, PCB, and LEN, which are header information, CLS, COD, P1, P2, and P3, which are communication blocks, a data section, and EDC.
The NAD stores the sender and receiver addresses of the data. The PCB stores information as to whether the next block exists as a series of information or a retransmission process of a communication block. LEN stores the length information of the communication block.
[0024]
The CLS stores information indicating the type of a communication block. The COD stores an instruction intended by the upper terminal. P1, P2 and P3 store additional information associated with the instruction. The data section stores actual data to be commanded.
The EDC stores header information and a check code for confirming the integrity of the communication block.
[0025]
As described above, the block transmission is a communication protocol for transmitting and receiving all such information as one block.
The first communication unit 222 receives data transmitted from the PC 100 via the first input / output unit 250 upon activation from the peripheral control unit 221.
It is determined whether there is a next block in the data to be received, and if so, the next block is received.
[0026]
When the data reception is completed, it is determined whether there is a communication error. If there is a communication error, a retransmission request is transmitted to PC 100. If there is no communication error, the header information of the received data is analyzed to confirm the destination of the received data. When the destination of the received data is the reader / writer 200, the processing is performed in the reader / writer 200, and the processing result is transmitted to the PC 100.
[0027]
When the destination of the reception data is any of the IC cards 300 to 500, the detection signal output from the card detection unit 240 is received. If the detection signal indicates that none of the IC cards 300 to 500 has been detected, a response indicating a processing error is created and sent to the PC 100 via the first input / output unit 250. When the detection signal indicates that any of the IC cards 300 to 500 has been detected, the type of the communication protocol stored in the type storage unit 229 is read. If the read type is “A”, the process proceeds to the second communication protocol conversion unit 226. Similarly, if the read type is “B”, the process proceeds to the first communication protocol conversion unit 224, and if the read type is “C”, the process proceeds to the communication channel control unit 228.
[0028]
The first communication unit 222 transmits the response data of the IC card 300 or 400 output by the first communication protocol conversion unit 224 or the second communication protocol conversion unit 226 to the PC 100.
(7) Third communication unit 227
The third communication unit 227 communicates with the IC card 300 according to the communication protocol A shown in FIG.
[0029]
The communication protocol A is a communication protocol for block transmission different from the communication protocol C. The data structure of the communication protocol A is the same as the data structure of the communication protocol C. The communication protocols C and A have different PCB configurations.
The third communication unit 227 transmits data received from the second communication protocol conversion unit 226 to the IC card 300. Further, when data is received again from the second communication protocol conversion unit 226, the data is transmitted again.
[0030]
The third communication unit 227 outputs the response data received from the IC card 300 to the second communication protocol conversion unit 226.
(8) Second communication protocol conversion unit 226
The second protocol conversion unit 226 converts data based on the protocol C into data based on the protocol A. In addition, data based on the communication protocol A is inversely converted into data based on the communication protocol C.
[0031]
Since only the PCB is different from the communication protocols A and C, the second communication protocol conversion unit 226 includes a conversion table for converting or reverse-converting the PCB.
When receiving the received data from the PC 100 from the first communication unit 222, the second communication protocol conversion unit 226 converts the PCB of the received data based on the communication protocol C into a PCB based on the communication protocol A according to the conversion table. The received data obtained by converting the PCB into data based on the communication protocol A is output to the third communication unit 227. In addition, the presence or absence of a communication error from the IC card 300 is confirmed. If there is a communication error, the received data is output to the third communication unit again. If there is no communication abnormality, the PCB of the response data from the IC card 300 received from the third communication unit 227 is inversely converted into a PCB based on the communication protocol C according to the conversion table. Response data obtained by inversely converting the PCB into data based on the communication protocol C is output to the first communication unit 222.
(9) Second communication unit 225
The second communication unit 225 communicates with the IC card 400 according to the communication protocol B.
[0032]
Here, the data structure of the communication protocol B, which is the communication protocol for character transmission, will be described with reference to FIG.
The data of the communication protocol B is composed of a communication block including a parameter part including CLS, COD, P1, P2, and P3 and a data part, and has no header information and EDC.
[0033]
As described above, character transmission is a communication protocol for transmitting and receiving such information in byte units.
The second communication unit 225 receives the data of the parameter part of the received data received from the PC 100 from the first communication protocol conversion unit 224, and transmits the received data to the IC card 400 in byte units. When the data of the parameter section is received again from the first communication protocol conversion section 224, the received data is transmitted to the IC card 400 again.
[0034]
The second communication unit 225 receives the data of the data portion of the received data from the first communication protocol conversion unit 224, and transmits the received data to the IC card 400 in byte units. When the data of the data section is received again from the first communication protocol conversion unit 224, the received data is transmitted to the IC card 400 again.
The second communication unit 225 receives the response data from the IC card 400. The received response data is output to the first communication protocol conversion unit 224.
(10) First communication protocol conversion unit 224
The first communication protocol conversion unit 224 converts data based on the communication protocol C into data based on the communication protocol B. In addition, data based on the communication protocol B is inversely converted into data based on the communication protocol C.
[0035]
The first communication protocol conversion unit 224 divides the data received from the PC 100 into a parameter part of the CLS, COD, P1, P2, and P3 commands, and a subsequent data part. The first communication protocol conversion unit 224 outputs the data of the divided parameter unit to the second communication unit 225. The presence or absence of a communication error is confirmed, and if there is a communication error, the data is output to the second communication unit 225 again.
[0036]
The first communication protocol conversion unit 224 receives the response data of the IC card 400 from the second communication unit 225. It is determined whether or not the response data is an ACK (ACKnowledgement) indicating acceptability. If the response data is other than ACK, the data of the parameter section is output to the second communication section 225 again.
If the response data from IC card 300 is ACK and the data received from PC 100 has a data part, first communication protocol conversion part 224 outputs the data of the data part to second communication part 225.
[0037]
The first communication protocol conversion unit 224 checks whether there is a communication error. If there is a communication error, the data is output to the second communication unit 225 again.
When there is no communication abnormality, the first communication protocol conversion unit 224 generates a PCB based on the communication protocol C by reflecting the response data from the IC card 400. The response data including the generated PCB is output to the first communication unit 222.
(11) Communication path control unit 228
When the communication protocol of the IC card 500 is the communication protocol C, the communication path control unit 228 sends the data transmitted from the PC 100 directly to the IC card 500 without passing through the internal processing of the reader / writer 200. The response data transmitted from the IC card 500 is transmitted to the PC 100.
2. Operation of communication system 600
The PC 100 transmits data to the reader / writer 200 according to the communication protocol C. The reader / writer 200 converts the received data according to the communication protocol of the destination IC card and transmits the converted data.
[0038]
Hereinafter, the operation of the reader / writer 200 will be described.
2.1 Operation of Reader / Writer 200
(1) Operation of peripheral control unit 221
The operation of the peripheral control unit 221 will be described with reference to FIG.
The peripheral control unit 221 determines whether or not data has been received from the PC 100 via the first input / output unit 250 (Step S10). If data has not been received (NO in step S10), a detection signal is received from card detection section 240 (step S11). It is determined from the received detection signal whether any of the IC cards 300 to 500 has been detected (step S12). When the detection signal indicates that the detection has been performed (YES in step S12), it is determined whether or not the type is stored in the type storage unit 229 (step S13). When the type is not stored (NO in step S13), the initial response analyzing unit 223 is made to determine the type (step S14). If the detection signal indicates no detection (NO in step S12) and if the type is stored (YES in step S13), it is determined again whether data has been received from PC 100 (step S13). Step S10).
[0039]
When data is received from PC 100 (YES in step S10), control is transferred to first communication unit 222 (step S14).
(2) Operation of initial response analysis unit 223
The operation of the initial response analyzer 223 in step S13 in FIG. 3 will be described with reference to FIG.
[0040]
The initial response analysis unit 223 activates the connected IC card (Step S20). When the ATR is received from the activated IC card via the second input / output unit 260, the type of the communication protocol of the IC card connected from the received ATR is determined (step S21). If the type is the communication protocol A, “A” is written into the type storage unit 229 (step S22). Similarly, when the type is the communication protocol B, “B” is written in the type storage unit 229 (step S23), and when the type is the communication protocol C, “C” is written in the type storage unit 229 (step S24). .
(3) Operation of first communication unit 222
The operation of the first communication unit 222 in step S14 of FIG. 3 will be described with reference to FIGS.
[0041]
When activated by the peripheral control unit 221, the first communication unit 222 receives data transmitted from the PC 100 via the first input / output unit 250 (step S30). It is determined whether there is a next block (step S31), and if there is (YES in step S31), the next block is received (step S30). If there is no next block (NO in step S31), it is determined whether there is a communication error (step S32). If there is a communication error (YES in step S32), a retransmission request is transmitted to PC 100 (step S33). If there is no communication abnormality (NO in step S32), the header information of the received data is analyzed, and the destination of the data is confirmed (step S34). When the data transmission destination is the reader / writer 200, the process is performed in the reader / writer 200 (step S35), and the result is transmitted to the PC 100 (step S44). If the data transmission destination is one of the IC cards 300 to 500, a detection signal is received from the card detection unit 240 (step S36). It is determined whether or not the received detection signal indicates that any of the IC cards 300 to 500 has been detected (step S37). If the detection signal indicates that no detection has been made (NO in step S37), an abnormal processing response is created (step S38), and the created abnormal processing response is transmitted to the PC 100 (step S44). When the detection signal indicates the detection (YES in step S37), the type of the communication protocol stored in the type storage unit 229 is read (step S39), and it is determined which communication protocol is used (step S40). If it is the communication protocol B, the control is transferred to the first communication protocol conversion unit 224 (step S41). Similarly, if it is the communication protocol A, the process is transferred to the second communication protocol conversion unit 226 (step S42), and if it is the communication protocol C, the process is transferred to the communication channel control unit 228 (step S43).
[0042]
The response data output by the first communication protocol conversion unit 224 or the second communication protocol conversion unit 226 is transmitted to the PC 100 (step S44).
(4) Operation of first communication protocol conversion unit 224
The operation of the first protocol conversion unit 224 in step S41 of FIG. 6 will be described with reference to FIG.
[0043]
Upon receiving the data received from the PC 100 from the first communication unit 222, the first communication protocol conversion unit 224 divides the data into a parameter part and a data part of CLS, COD, P1, P2, and P3 commands (step S50). The data of the divided parameter section is output to the second communication section 225 for transmission to the IC card 400 in byte units (step S51).
[0044]
It is checked whether there is a communication error from the IC card 400 (step S52). If there is a communication error (YES in step S52), the data of the parameter unit is output to the second communication unit 225 for retransmission (step S51). .
If there is no communication abnormality (NO in step S52), it is determined whether or not the response data of IC card 400 received from second communication unit 225 is ACK (step S53). If the response data is not ACK (NO in step S53), the data of the parameter section is output to second communication section 225 so as to be transmitted again (step S51). If the response data is ACK (YES in step S53), it is determined whether or not the data received from PC 100 has a data portion (step S54). If the data section does not exist (NO in step S54), a PCB for returning to the PC 100 is generated (step S57).
[0045]
If the data received from the PC 100 has a data portion (YES in step S54), the data in the data portion is output to the second communication portion 225 for transmission to the IC card 400 in byte units (step S55).
It is confirmed whether or not there is a communication error with respect to the transmitted data portion (step S56). If there is a communication error (YES in step S56), the data of the data portion is output to the second communication portion 225 to transmit again (step S55). . If there is no communication abnormality (NO in step S56), a PCB for returning to the PC 100 is generated by reflecting the response data received from the IC card 400 (step S57). The response data including the generated PCB is output to the first communication unit 222 for transmission to the PC 100. (Step S58)
(5) Operation of second communication protocol conversion unit 226
The operation of the second protocol conversion unit 226 in step S42 of FIG. 6 will be described with reference to FIG.
[0046]
When receiving the data received from the PC 100 from the first communication unit 222, the second communication protocol conversion unit 226 converts the PCB of the received data into a PCB based on the communication protocol A according to the conversion table (step S60). The received data obtained by converting the PCB into data based on the communication protocol A is output to the third communication unit 227 for transmission to the IC card 300 (step S61).
[0047]
It is confirmed whether or not there is a communication error from the IC card 300 (step S62). If there is a communication error (YES in step S62), the received data is output to the third communication unit 227 so as to be retransmitted (step S61).
If there is no communication abnormality (NO in step S62), the PCB of the response data from IC card 300 is inversely converted into a PCB of communication protocol C based on the conversion table (step S63). The response data including the inversely converted PCB is output to the first communication unit 222 (step S64).
[0048]
【The invention's effect】
As described above, the present invention relates to a reader / writer device to which a higher-level terminal is connected, an IC card is mounted, and relay communication of information is performed between the IC card and the higher-level terminal. Is a first type IC card that performs communication based on a first communication protocol that defines a communication procedure for character transmission, or a second type that performs communication based on a second communication protocol that defines a communication procedure for block transmission Determining means for determining whether the card is a seed IC card; the upper terminal that performs communication based on a third communication protocol that defines a communication procedure for block transmission different from the second communication protocol; A first conversion communication means for converting data in accordance with the respective communication protocol and relaying communication with the first type IC card which performs communication based on the third communication protocol; A second conversion communication unit that converts data according to the respective communication protocol and relays the communication between the host terminal and the second type IC card that performs communication based on the second communication protocol; A reader / writer device comprising: a switching unit that causes one of the first conversion communication unit and the second conversion communication unit to perform communication based on a determination result of the determination unit.
[0049]
According to this configuration, one port of the microcomputer mounted on the terminal is used and software is used, so the reader / writer device can switch to both the block transmission protocol and the character transmission protocol Thus, there is no need to control the upper terminal in consideration of the communication protocol, and there is an effect that the processing at the upper terminal can be simplified. In addition, since the block transmission and the character transmission can be controlled by software, the processing in the terminal can be flexibly performed.
[0050]
Here, when relaying communication between a third-type IC card that performs communication based on the third communication protocol and the higher-level terminal, the reader / writer device transmits data received from the higher-level terminal to the reader. Communication path switching means for transmitting data to the third type IC card without conversion in the writer device and transmitting data received from the third type IC card to the upper terminal without conversion in the reader / writer device The determination means determines whether the mounted IC card is the first type IC card, the second type IC card, or the third type IC card, and the switching means When the determination result is the third type IC card, the communication path switching means may perform communication.
[0051]
According to this configuration, when the communication protocol of the IC card is the same as the communication protocol of the upper terminal, the communication is performed without processing in the reader / writer device, so that the communication time can be reduced and the third IC card is also supported. I can do it.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an IC card reader / writer.
FIG. 2 shows a data configuration of block transmission and character transmission.
FIG. 3 is a flowchart showing an operation of a peripheral control unit 221.
FIG. 4 is a flowchart illustrating an operation of an initial response analysis unit 223;
FIG. 5 is a flowchart illustrating an operation of a first communication unit 222; Continued to FIG.
FIG. 6 is a flowchart showing an operation of the first communication unit 222. Continuation of FIG.
FIG. 7 is a flowchart showing an operation of the first communication protocol conversion unit 224.
FIG. 8 is a flowchart illustrating an operation of a second communication protocol conversion unit 226;
[Explanation of symbols]
100 PC
200 reader / writer
210 storage unit
211 Storage unit
220 communication protocol control unit
221 Peripheral control unit
222 communication unit
223 Initial response analyzer
224 Communication protocol conversion unit
225 Communication unit
226 Communication Protocol Conversion Unit
227 Communication unit
228 Communication path control unit
229 Type storage unit
230 central processing unit
240 Card Detector
250 input / output unit
260 Input / output unit
300, 400, 500 IC card
600 communication system

Claims (3)

上位端末が接続され、ICカードが装着され、前記ICカードと上位端末との間において情報の中継通信を行うリーダライタ装置であって、
装着されたICカードが、キャラクタ伝送の通信手順を定めた第1通信規約に基づいて通信を行う第1種ICカードであるか、又はブロック伝送の通信手順を定めた第2通信規約に基づいて通信を行う第2種ICカードであるか判断する判断手段と、
前記第2通信規約とは異なるブロック伝送の通信手順を定めた第3通信規約に基づいて通信を行う前記上位端末と、前記第1通信規約に基づいて通信を行う前記第1種ICカードとの間で、それぞれの通信規約に合わせてデータを変換して通信を中継する第1変換通信手段と、
前記第3通信規約に基づいて通信を行う前記上位端末と、前記第2通信規約に基づいて通信を行う前記第2種ICカードとの間で、それぞれの通信規約に合わせてデータを変換して通信を中継する第2変換通信手段と、
前記判断手段の判断結果に基づいて、前記第1変換通信手段と前記第2変換通信手段との何れかに通信を行わせる切換手段と
を備えることを特徴とするリーダライタ装置。
A reader / writer device to which an upper terminal is connected, an IC card is mounted, and information relay communication is performed between the IC card and the upper terminal.
The mounted IC card is a first-class IC card that performs communication based on a first communication protocol that defines a communication procedure for character transmission, or based on a second communication protocol that defines a communication procedure for block transmission. Determining means for determining whether the card is a second type IC card for communication;
The upper terminal that performs communication based on a third communication protocol that defines a communication procedure of block transmission different from the second communication protocol, and the first type IC card that performs communication based on the first communication protocol. A first conversion communication unit that converts data according to each communication protocol and relays the communication between
Data is converted between the upper-level terminal that performs communication based on the third communication protocol and the second-type IC card that performs communication based on the second communication protocol, in accordance with each communication protocol. Second conversion communication means for relaying communication;
A reader / writer device, comprising: switching means for causing any one of the first conversion communication means and the second conversion communication means to perform communication based on a result of the determination by the determination means.
前記リーダライタ装置は、
前記第3通信規約に基づいて通信を行う第3種ICカードと前記上位端末との間で通信を中継する場合、前記上位端末から受信するデータを、当該リーダライタ装置内で変換せずに前記第3種ICカードに送信し、前記第3種ICカードから受信するデータを、当該リーダライタ装置内で変換せずに前記上位端末に送信する通信路切換手段を含み、
前記判断手段は、装着されたICカードが、前記第1種ICカードであるか、前記第2種ICカードであるか、前記第3種ICカードであるか判断し、
前記切換手段は、前記判断結果が前記第3種ICカードである場合、前記通信路切換手段に通信を行わせる
ことを特徴とする請求項1記載のリーダライタ装置。
The reader / writer device,
When relaying communication between the third type IC card that performs communication based on the third communication protocol and the upper terminal, data received from the upper terminal is converted without being converted in the reader / writer device. Communication path switching means for transmitting data to the third type IC card and receiving data from the third type IC card to the upper terminal without converting the data in the reader / writer device;
The determining means determines whether the mounted IC card is the first type IC card, the second type IC card, or the third type IC card,
2. The reader / writer device according to claim 1, wherein the switching unit causes the communication path switching unit to perform communication when the determination result is the third type IC card.
上位端末が接続され、ICカードが装着されたリーダライタ装置が、前記上位端末と前記ICカードとの間において、情報の中継通信を行う通信システムであって、
キャラクタ伝送の通信手順を定めた第1通信規約に基づいて前記リーダライタ装置と通信を行う第1種ICカードと、
ブロック伝送の通信手順を定めた第2通信規約に基づいて前記リーダライタ装置と通信を行う第2種ICカードと、
前記第2通信規約と異なるブロック伝送の通信手順を定めた第3通信規約に基づいて前記リーダライタ装置と通信を行う前記上位端末と、
前記リーダライタ装置とを備え、
前記リーダライタ装置は、
第1通信手段、第1変換手段、第2変換手段、第2通信手段、第3通信手段及び入出力手段から構成され、
前記第1通信手段は、
前記第3通信規約に基づいて前記上位端末と通信を行い、当該リーダライタ装置に前記第1種ICカードが装着されている場合、前記上位端末からの受信データを前記第1変換手段に出力し、前記第2種ICカードが装着されている場合、前記受信データを前記第2変換手段に出力し、前記第1変換手段又は前記第2変換手段から受け取るデータは前記上位端末に送信し、
前記第1変換手段は、
前記第3通信手段から受け取るデータを、前記第1通信規約に基づくデータに変換して、変換したデータを前記第2通信手段に出力し、前記第2通信手段から受け取るデータを前記第3通信規約に基づくデータに変換して前記第1通信手段に出力し、
前記第2変換手段は、
前記第1通信手段から受け取るデータを、前記第1通信規約に基づくデータに変換して、変換したデータを前記第2通信手段に出力し、前記第2通信手段から受け取るデータを前記第3通信規約に基づくデータに変換して前記第1通信手段に出力し、
前記第2通信手段は、
前記第1通信規約に基づいて、前記第1種ICカードと通信を行い、前記第1変換手段から受け取るデータを前記入出力手段に出力し、前記入出力手段から受け取るデータを前記第1変換手段に出力し、
前記第3通信手段は、
前記第2通信規約に基づいて、前記第2種ICカードと通信を行い、前記第2変換手段から受け取るデータを前記入出力手段に出力し、前記入出力手段から受け取るデータを前記第2変換手段に出力し、
前記入出力手段は、第2通信手段から受け取るデータを前記第1種ICカードに送信し、前記第1種ICカードから受信するデータを前記第2通信手段に出力し、前記第3通信手段から受け取るデータを前記第2種ICカードに送信し、前記第2種ICカードから受信するデータを前記第3通信手段に出力する
ことを特徴とする通信システム。
A communication system in which a higher-level terminal is connected and a reader / writer device having an IC card mounted thereon performs relay communication of information between the higher-level terminal and the IC card,
A first-class IC card that communicates with the reader / writer device based on a first communication protocol that defines a communication procedure for character transmission;
A second type IC card that communicates with the reader / writer device based on a second communication protocol that defines a communication procedure for block transmission;
The higher-level terminal that communicates with the reader / writer device based on a third communication protocol that defines a communication procedure of block transmission different from the second communication protocol,
Comprising the reader / writer device,
The reader / writer device,
A first communication unit, a first conversion unit, a second conversion unit, a second communication unit, a third communication unit, and an input / output unit;
The first communication means,
It communicates with the upper terminal based on the third communication protocol, and when the first type IC card is attached to the reader / writer device, outputs received data from the upper terminal to the first conversion means. Outputting the received data to the second conversion means when the second type IC card is mounted, and transmitting data received from the first conversion means or the second conversion means to the upper terminal;
The first conversion means includes:
The data received from the third communication means is converted into data based on the first communication protocol, the converted data is output to the second communication means, and the data received from the second communication means is converted into the third communication protocol. And outputs the data to the first communication means.
The second conversion means,
The data received from the first communication unit is converted into data based on the first communication protocol, the converted data is output to the second communication unit, and the data received from the second communication protocol is converted into the third communication protocol. And outputs the data to the first communication means.
The second communication means,
The first communication protocol is communicated with the first type IC card, data received from the first conversion means is output to the input / output means, and data received from the input / output means is converted to the first conversion means. Output to
The third communication means,
Communicates with the second type IC card based on the second communication protocol, outputs data received from the second conversion means to the input / output means, and outputs data received from the input / output means to the second conversion means Output to
The input / output unit transmits data received from the second communication unit to the first type IC card, outputs data received from the first type IC card to the second communication unit, and outputs the data from the third communication unit. A communication system comprising: transmitting received data to the second type IC card; and outputting data received from the second type IC card to the third communication unit.
JP2003038904A 2003-02-17 2003-02-17 Reader/writer and communication system Withdrawn JP2004252499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003038904A JP2004252499A (en) 2003-02-17 2003-02-17 Reader/writer and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003038904A JP2004252499A (en) 2003-02-17 2003-02-17 Reader/writer and communication system

Publications (1)

Publication Number Publication Date
JP2004252499A true JP2004252499A (en) 2004-09-09

Family

ID=33023288

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003038904A Withdrawn JP2004252499A (en) 2003-02-17 2003-02-17 Reader/writer and communication system

Country Status (1)

Country Link
JP (1) JP2004252499A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033661A (en) * 2006-07-28 2008-02-14 Sony Corp Processor and processing method, and program
JP2011243027A (en) * 2010-05-19 2011-12-01 Toppan Printing Co Ltd Notification method fo processor, ic card, and processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033661A (en) * 2006-07-28 2008-02-14 Sony Corp Processor and processing method, and program
JP2011243027A (en) * 2010-05-19 2011-12-01 Toppan Printing Co Ltd Notification method fo processor, ic card, and processor

Similar Documents

Publication Publication Date Title
US7957402B2 (en) UDP to TCP bridge
US6940870B2 (en) System and method for communicating data
US4507782A (en) Method and apparatus of packet switching
US7043578B2 (en) Method, system, and program for processing a packet including I/O commands and data
US8078668B2 (en) Method and device for processing a message in a communication network
JP3028815B2 (en) Transmission method of portable electronic device and portable electronic device
CN110457744B (en) SD/SDIO equipment simulation model framework and design method thereof
US7299264B2 (en) System and method for monitoring a connection between a server and a passive client device
JP2004252499A (en) Reader/writer and communication system
EP0336547A2 (en) Computer network and method for operating it
US20030154288A1 (en) Server-client system and data transfer method used in the same system
WO2007004232A1 (en) Device management across firewall architecture
KR100311619B1 (en) How to send and receive messages between processors in a distributed processing system
JP4395969B2 (en) IC card processing method
JP3797363B2 (en) iSCSI device and communication control method thereof
US20020010787A1 (en) Network connecting device
JP4220861B2 (en) Test support method and test support apparatus
KR20040076097A (en) Emulating system for developing a home network
JP2006127128A (en) Slave apparatus of information processing system, operation control program for slave apparatus and operation control method for slave apparatus
US20030110269A1 (en) Method and system for wireless management of servers
KR100524058B1 (en) Method for processing error be occurred in office automation
CN117880213A (en) Method, system and electronic device for data transmission
US6519661B1 (en) Method for recording data in a telecommunications switching center
JPH11306115A (en) Peripherals, information reporting method, and storage medium
JP2000332847A (en) Protocol processing unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080919

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081014

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20081112