Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3710940B2 - Data transmission method, communication control device, and recording medium on which data transmission program is recorded - Google Patents
[go: Go Back, main page]

JP3710940B2 - Data transmission method, communication control device, and recording medium on which data transmission program is recorded - Google Patents

Data transmission method, communication control device, and recording medium on which data transmission program is recorded Download PDF

Info

Publication number
JP3710940B2
JP3710940B2 JP25610698A JP25610698A JP3710940B2 JP 3710940 B2 JP3710940 B2 JP 3710940B2 JP 25610698 A JP25610698 A JP 25610698A JP 25610698 A JP25610698 A JP 25610698A JP 3710940 B2 JP3710940 B2 JP 3710940B2
Authority
JP
Japan
Prior art keywords
data
lowest
protocol
determined
communication control
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 - Fee Related
Application number
JP25610698A
Other languages
Japanese (ja)
Other versions
JP2000078238A (en
Inventor
剛 倉本
Original Assignee
グローリー商事株式会社
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 グローリー商事株式会社 filed Critical グローリー商事株式会社
Priority to JP25610698A priority Critical patent/JP3710940B2/en
Publication of JP2000078238A publication Critical patent/JP2000078238A/en
Application granted granted Critical
Publication of JP3710940B2 publication Critical patent/JP3710940B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、2つの電子機器相互のデータの授受を仲介、制御する通信制御装置に係り、特に、外部からデータの読み出し/書き込みが可能ないわゆるICカードと、このICカードとのデータの授受を行うホスト装置との間に用いられるデータの伝送方法及び通信制御装置並びにデータ伝送プログラムを記録した記録媒体に関する。
【0002】
【従来の技術】
従来、この種の装置としては、例えば、特開平8−315090号公報に示されたように、いわゆるICカードとホスト装置間のデータの授受等を行うICカードリーダライタにおいて、ICカードのプロトコルの種類を判別する判別手段と、プロトコル変換手段とを設け、ICカードのプロトコルがホスト装置とICカードリーダライタとの間のプロトコルと異なるものであると判定された場合に、プロトコル変換手段によりプロトコル変換を行ってICカードとホスト装置とのデータの授受を行えるようにしてなるものが公知・周知となっている。
【0003】
【発明が解決しようとする課題】
しかしながら、かかる従来装置においては、ICカードのプロトコルが所定の形式以外であると判定された場合、ICカードからホスト装置へのデータ及びホスト装置からICカードへのデータが、ICカードリーダライタ内において、プロトコル変換手段によりプロトコルの変換、換言すればデータ変換がなされるため、プロトコルが所定の場合に比してデータの秘匿性が低下するという問題がある。すなわち、ICカードのプロトコルが所定の形式である場合、ICカードからホスト装置へのデータ及びホスト装置からICカードへのデータは、ICカードリーダライタにおいてデータ変換が施されることなくいわゆるスルー状態で、ICカードとホスト装置間で直接授受されることとなるため、ICカードリーダライタにおけるデータの秘匿性が十分高いものとすることができる。これに対して、上述のようにICカードリーダライタ内でプロトコル変換を行う場合には、ホスト装置からICカードへのデータ及びICカードからホスト装置へのデータが、ICカードリーダライタにおいて一旦が展開されるため、何らかの方策を施さない限り必然的にデータの秘匿性は低下することとなる。
【0004】
また、プロトコル変換を行うため、ホスト装置からICカードへのデータ及びICカードからホスト装置へのデータを一時的に蓄積するためのいわゆるバッファメモリが必要となり、しかもそのメモリ容量は、少なくともICカードが有するデータバイト分程度は必要となるため、ICカードリーダライトのハードウェアの負担が増し、高価格化を招くという問題がある。さらに、ICカードのプロトコルが所定の形式以外の場合には、プロトコル変換を行い、ホスト装置とICカード間でのデータの授受がなされるので、ICカードとホスト装置間のデータの授受に時間を要するという問題があった。
【0005】
本発明は、上記実状に鑑みてなされたもので、プロトコル変換を行うことなくプロトコルの異なるICカードに対応可能なうえに、メモリ容量が必要最小限で済み、低価格化を図ることのできるデータ伝送方法及び通信制御装置並びにデータ伝送プログラムを記録した記録媒体を提供することにある
【0006】
【課題を解決するための手段】
本発明のデータ伝送方法は、ブロック伝送プロトコル及びキャラクタ伝送プロトコルを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置におけるデータ伝送方法であって、接続された最下位装置の通信プロトコルを判定し、前記上位装置から伝送されたデータに含まれる先頭バイトが通信制御装置に対するものか否かを判定し、前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、前記最下位装置の 通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものであると判定された場合、前記上位装置から伝送されたデータを当該通信制御装置におけるコマンドとして処理し、前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、先頭バイトが通信制御装置に対するものであると判定された場合、上位装置からのデータを一時的に通信制御装置内に蓄積し、上位装置から伝送されたデータの2バイト目以降について、通信制御装置のコマンドであるか否かを判定し、通信制御装置のコマンドではないと判定された時点において、前記一時的に蓄積されたデータの最下位装置への伝送を開始すると共に、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる一方、前記上位装置から伝送されたデータの2バイト目以降が通信制御装置のコマンドと判定され、しかも、受信されたデータのバイト数が所定以上であると判定された場合、前記一時的に蓄積されたデータの最下位装置への伝送を行い、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめ、前記上位装置から伝送されたデータの2バイト目以降が通信制御装置のコマンドと判定され、しかも、受信されたデータのバイト数が所定内であると判定された場合、通信制御装置のコマンドとして処理するものである。
【0007】
また、本発明の通信制御装置は、ブロック伝送プロトコル及びキャラクタ伝送プロトコルを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置であって、当該通信制御装置は、接続された最下位装置の通信プロトコルを判定するプロトコル判定手段と、前記上位装置から伝送されたデータに含まれる先頭バイトが通信制御装置に対するものか否かを判定するアドレス判定手段と、外部入力されたデータを一時的に蓄積し、制御信号の入力に応じて外部へ出力するデータ蓄積手段と、前記プロトコル判定手段により、最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめる第1のデータ通過制御手段と、前記プロトコル判定手段により、最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、前記上位装置から伝送されたデータを当該通信制御装置におけるコマンドとして処理する第1のコマンド処理手段と、前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめる第2のデータ通過制御手段と、前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、上位装置からのデータを前記データ蓄積手段に蓄積させるバファリング制御手段と、前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、上位装置から伝送されたデータの2バイト目以降について、通信制御装置のコマンドであるか否かを判定するコマンド判定手段と、前記コマンド判定手段により、上位装置から伝送されたデータの何れかのバイトが通信制御装置のコマンドではないと判定された場合、前記データ蓄積手段のデータを前記最下位装置へ伝送すると共に、それ以後、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる第3のデータ通過制御手段と、前記コマンド判定手段により、上位装置から伝送されたデータの何れのバイトも通信制御装置のコマンドであると判定された場合において、前記上位装置から伝送されたデータのバイト数が所定以上か否かを判定するバイト数判定手段と、前記バイト数判定手段により、前記上位装置から伝送されたデータのバイト数が所定以上であると判定された場合、前記データ蓄積手段のデータを前記最下位装置へ伝送すると共に、それ以後、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる第4のデータ通過制御手段と前記バイト数判定手段により、前記上位装置から伝送されたデータのバイト数が所定内であると判定された場合、前記データを当該通信制御装置におけるコマンドとして処理する第2のコマンド処理手段とを具備してなるものである。
【0008】
また、本発明のデータ伝送プログラムを記録した記録媒体は、ブロック伝送プロトコル及びキャラクタ伝送プロトコルを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、コンピュータを用いてなり、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置における前記コンピュータに実行させるデータ伝送処理プログラムを記録した記録媒体であって、当該データ伝送処理プログラムはコンピュータに、接続された最下位装置の通信プロトコルを判定させ、前記上位装置から伝送されたデータに含まれる先頭バイトが当該コンピュータに対するものか否かを判定させ、前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものであると判定された場合、前記上位装置から伝送されたデータを当該コンピュータにおけるコマンドとして処理させ、前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、先頭バイトが当該コンピュータに対するものであると判定された場合、上位装置からのデータを一時的に蓄積させ、上位装置から伝送されたデータの2バイト目以降について、当該コンピュータにおけるコマンドであるか否かを判定させ、当該コンピュータにおけるコマンドではないと判定された時点において、前記一時的に蓄積されたデータの最下位装置への伝送を開始させると共に、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる一方、前記上位装置から伝送されたデータの2バイト目以降が当該コンピュータにおけるコマンドと判定され、しかも、受信されたデータのバイト数が所定以上であると判定された場合、前記一時的に蓄積されたデータの最下位装置への伝送を行わしめ、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめ、前記上位装置から伝送されたデータの2バイト目以降が当該コンピュータにおけるコマンドと判定され、しかも、受信されたデータのバイト数が所定内であると判定された場合、当該コンピュータにおけるコマンドとして処理させるものである。
【0009】
かかる構成は、特に、最下位装置がICカードであり、通信制御装置がいわゆるICカードリーダライタとした場合に好適なものである。かかる構成により、ICカードの通信プロトコルに関わらず、ICカードと上位装置間のデータの授受が、ICカードリーダライタ内で何等データの加工を行うことなく可能となるので、ICカードリーダライタにおけるデータの高い秘匿性を維持しつつ、迅速なデータの授受を実現することができることとなるものである。
【0010】
なお、上位装置は、必ずしもブロック伝送プロトコル及びキャラクタ伝送プロトコルの2種類の通信プロトコルを有してなるものである必要はなく、いずれか一方のプロトコルを有してなるものであってもよいものである。
【0011】
【発明の実施の形態】
以下、本発明の実施の形態について、図1乃至図13を参照しつつ説明する。
【0012】
なお、以下に説明する部材、配置等は本発明を限定するものではなく、本発明の趣旨の範囲内で種々改変することができるものである。
【0013】
最初に、この発明の実施の形態における通信制御装置としてのICカードリーダライタ1が用いられるシステム構成について図1を参照しつつ説明する。
【0014】
ICカードリーダライタ(図1においては「R/W」と表記)1は、最下位装置として、外部からデータの読み出し/書き込みが可能ないわゆるICカード3と、上位装置としてのホスト装置2とのデータの授受を仲介する機能を果たすもので、ホスト装置2とは所定のインターフェイス(例えばRS-232C等)により接続される一方、ICカード3の挿入、取り出しが可能に構成されてなるものである(図1参照)。
【0015】
この発明の実施の形態におけるホスト装置2は、現在ICカード3のプロトコルとして使用されている2つのプロトコル、すなわち、国際標準プロトコルT=1(半二重調歩同期ブロック伝送プロトコル)と、T=0(調歩式半二重キャラクタ伝送プロトコル)の双方に対応できるようになっているものである。
【0016】
一方、ICカードリーダライタ1は、図2に示されたように、いわゆるCPU4を主としてなり、この他に、ホスト装置2とのインターフェイスのための通信インターフェイス回路5と、ICカード3とのインターフェイスのためのカードインターフェイス回路6と、RAM7と、ROM8とを具備して構成されたものとなっている。
【0017】
ROM(Read Only Memory)8には、後述するようなICカード3とホスト装置2との間のデータの授受のための処理を行うためのプログラムが記憶されており、CPU4は、そのプログラムを読み込んで実行するようになっている。
【0018】
通信インターフェイス回路5は、ホスト装置2とICカードリーダライタ1との間のインターフェイスを図るもので、例えばRS-232C等の公知・周知のインターフェイス規格に基づいて、ICカード3とホスト装置2との通信ができるようになっているものである。
【0019】
カードインターフェイス回路6は、ICカード3との接続部分を介してICカード3へ電源電圧を供給し、また、ICカード3へ対するCPU4からの制御信号やデータ等を所定の電圧レベルで出力する一方、ICカード3から読み出されたデータを所定のレベルに変換する等の処理を行いCPU4へ送る等のICカード3とのインターフェイスを図るものである。
【0020】
RAM(Random Access Memory)7は、公知・周知のいわゆるICメモリであり、後述するバッファリング処理等において一時的にデータを蓄積するなどに利用されるようになっているものである。
【0021】
次に、かかる構成において、ホスト装置2、ICカードリーダライタ1及びICカード3の三者における相互の通信が如何なる形態であるかについて、図3の説明図を参照しつつ説明する。
【0022】
まず、ホスト装置2とICカードリーダライタ1間の通信について説明すれば、最初に、ICカードリーダライタ1の動作に関するコマンドのホスト装置2と授受については、半二重調歩同期ブロック伝送プロトコル(以下「ブロック伝送プロトコル」と言う)に基づいて行われるようになっている(図3の「ホスト−R/W間プロトコル」と表記された列において左欄が「R/Wコマンド通信」と表記された行の部分参照)。
【0023】
また、ICカード3がブロック伝送プロトコル仕様に準拠したものである場合、ICカードリーダライタ1とホスト装置2との通信は、ブロック伝送プロトコルにより行われるようになっている(図3の「ホスト−R/W間プロトコル」と表記された列において左欄が「ブロック伝送プロトコル仕様ICカード通信」と表記された行の部分参照)。
【0024】
さらに、ICカード3が調歩式半二重キャラクタ伝送プロトコル(以下「キャラクタ伝送プロトコル」と言う)仕様に準拠したものである場合、ICカードリーダライタ1とホスト装置2との通信は、キャラクタ伝送プロトコルにより行われるようになっている(図3の「ホスト−R/W間プロトコル」と表記された列において左欄が「キャラクタ伝送プロトコル仕様ICカード通信」と表記された行の部分参照)。
【0025】
次に、ICカードリーダライタ1とICカード3間の通信について説明すれば、まず、ICカード3がブロック伝送プロトコル仕様に準拠したものである場合、ICカード3とICカードリーダライタ1間の通信は、ブロック伝送プロトコルにしたがって行われることとなる(図3の「R/W−ICカード間プロトコル」と表記された列において左欄が「ブロック伝送プロトコル仕様ICカード通信」と表記された行の部分参照)。
【0026】
また、ICカード3がキャラクタ伝送プロトコル仕様に準拠したものである場合には、ICカード3とICカードリーダライタ1間の通信は、キャラクタ伝送プロトコルにしたがって行われることとなる(図3の「R/W−ICカード間プロトコル」と表記された列において左欄が「キャラクタ伝送プロトコル仕様ICカード通信」と表記された行の部分参照)。
【0027】
次に、ICカードリーダライタ1における内部処理について言えば、ICカードリーダライタ1における独自のコマンド等の処理については、所定のプログラムによるICカードリーダライタコマンド処理がなされるようになっている(図3の「R/W内部処理」と表記された列において左欄が「R/Wコマンド通信」と表記された行の部分参照)。
【0028】
また、ブロック伝送プロトコル仕様に準拠したICカード3に関するICカードリーダライタ1の内部処理については、直接データ転送が行われ(図3の「R/W内部処理」と表記された列において左欄が「ブロック伝送プロトコル仕様ICカード通信」と表記された行の部分参照)、さらに、キャラクタ伝送プロトコル仕様に準拠したICカード3に関するICカードリーダライタ1の内部処理については、ICカードリーダライタコマンドでないことが確定された後に直接データ転送が行われるようになっている(図3の「R/W内部処理」と表記された列において左欄が「キャラクタ伝送プロトコル仕様ICカード通信」と表記された行の部分参照)。
【0029】
次に、ICカードリーダライタ1による通信制御処理のより具体的な手順について図3乃至図13を参照しつつ説明することとする。
【0030】
最初に、図4を参照しつつ全体的な通信制御処理の流れについて説明すれば、まず、ICカード3がICカードリーダライタ1の所定の箇所に挿入されると、ICカード3への電源電圧の供給、初期設定等のいわゆるICカードの活性化がICカードリーダライタ1により行われる(図4のステップ100参照)。
【0031】
次いで、ICカードの活性化に応じてICカード3からICカードリーダライタ1へ対してアンサー・ツー・リセット(ATR)と称される初期応答データが伝送され、ICカードリーダライタ1において、その解析が行われることとなる(図4のステップ200参照)。
【0032】
そして、この初期応答データ中に含まれるICカード3のプロトコルタイプを示すデータにより、ICカード3のプロトコル判定が行われる(図4のステップ300参照)。
【0033】
このプロトコル判定により、ICカード3のプロトコルが、ブロック伝送プロトコルであると判定された場合には、ブロック伝送プロトコル仕様のICカード3との通信制御サブルーチンである第1の通信制御サブルーチンが実行され、ICカードリーダライタ1及びホスト装置2とICカード3との間の通信が行われることとなる(図4のステップ400参照)。
【0034】
一方、プロトコル判定により、ICカード3のプロトコルが、キャラクタ伝送プロトコルであると判定された場合には、キャラクタ伝送プロトコル仕様のICカード3との通信制御サブルーチンである第2の通信制御サブルーチンが実行され、ICカードリーダライタ1及びホスト装置2とICカード3との間の通信が行われることとなる(図4のステップ500参照)。
【0035】
なお、ここで、図4に示されたICカード活性化処理(図4のステップ100参照)からプロトコル判定処理(図4のステップ300参照)に至るまでの処理は、公知・周知の技術であり、実際に標準化されているものであるので、ここでの詳細な説明は省略することとする。
【0036】
次に、ICカード3がブロック伝送プロトコル仕様に準拠したものであると判定された場合に実行される第1の通信制御処理の具体的な内容について図5乃至図8を参照しつつ説明する。
【0037】
ICカードリーダライタ1によりICカード3がブロック伝送プロトコル仕様に準拠したものであると判定されると、ホスト装置2からは、ブロック伝送プロトコルに基づいて、ICカード3に対するデータまたはICカードリーダライタ1に対するデータの伝送が開始される。それに伴いICカードリーダライタ1においては、ホスト装置2からブロック伝送された信号の先頭バイトについて判定が行われる(図5のステップ410参照)。
【0038】
すなわち、いわゆるノードアドレスがICカードリーダライタ1に対するものか、ICカード3に対するものであるかが判定されることとなる。
【0039】
ここで、ブロック伝送の際に用いられるデータ構成を示せば、例えば、図6に示されたように、ブロック伝送におけるデータのブロックは、先頭から順に、先頭フィールド(PROLOG)、情報フィールド(INFORMATION)、最終フィールド(EPILOG)の3つに大別されてなり、これらが一体のデータとして、すなわちブロックとして伝送されるものである。このブロックの構成は、国際標準規格として定められているものであり、国内においては、「JISX6304」に規定されているものである。
【0040】
そして、ノードアドレス(図6においては「NAD」と表記)は、先頭フィールドの一構成要素であって、ブロックの送信元及び受信元のアドレスが表される部分となっているものである。なお、図6に示されたブロックの個々のデータの詳細についての説明は省略することとする。
【0041】
このノードアドレスがICカードリーダライタ1に対するものか、ICカード3に対するものかの判定は、例えば、この発明の実施の形態においては、その値が所定の範囲にあるか否かで判定するようにしてある。すなわち、例えば、ノードアドレスが、16進法で「10」乃至「1F」の範囲の値にないと判定された場合には、その受信ブロックについては、ICカード3のコマンドであるとしてスルーモード状態となる(図5のステップ420参照)。すなわち、その受信ブロックは、ブロック伝送プロトコルに基づいて、そのままICカード3へ伝送される一方、ICカード3からホスト装置2へ対して伝送されるデータがある場合には、ICカードリーダライタ1を介してそのままホスト装置2へ伝送されることとなる(図5のステップ420参照)。
【0042】
図7には、このスルーモードを概念的に表した図が示されている。
【0043】
すなわち、スルーモードにおいては、ICカードリーダライタ1を介してのホスト装置2とICカード3との相互のデータの授受は、ブロック伝送により行われることとなり、ICカードリーダライタ1に入力されたホスト装置2からのICカード3へのデータは、例えばカードインターフェイス回路6内に設けられたいわゆるFIFO(先入先出レジスタ)6aを介してICカード3へ伝送される一方、ICカード3からホスト装置2へのデータは、ICカードリーダライタ1の通信インターフェイス回路5内に設けられたFIFO5aを介してホスト装置2へ伝送されるようになっていることが表されている(図7の実線矢印部分参照)。
【0044】
なお、図7において、ICカード3の部分に表記された「T=14」は、国際標準に基づかないブロック伝送プロトコルを意味する。このプロトコルもブロック伝送という点ではT=0のプロトコルと共通し、本発明による通信制御を用いることができるため、ICカード3は、T=0またはT=14のいずれの通信プロトコルを用いるものであってもよいものである。
【0045】
一方、ホスト装置2から送信された受信ブロックのノードアドレスが、16進法で「10」乃至「1F」の範囲の値であると判定された場合には、その受信ブロックは、ICカードリーダライタ1のコマンド、すなわちリーダライタコマンドであるとして、リーダライタコマンド処理が実行されるリーダライタコマンドモードとなる(図5のステップ430参照)。すなわち、受信されたブロックのインフォメーションのデータに応じて定まる所定の処理が行われるものである。具体的に如何なる処理を行うかは、個々のICカードリーダライタ1において設定されるコマンドの種類や内容によって定まるものであり、ここでの詳細な説明は省略することとする。
【0046】
そして、このリーダライタコマンド処理において、ホスト装置2へ対してICカードリーダライタ1からデータを伝送する場合には、ブロック伝送プロトコル仕様に基づいたデータの伝送が行われるようになっている(図5のステップ440参照)。
【0047】
上述のリーダライタコマンドモードを概念的に表した図が図8に示されている。
【0048】
すなわち、図8においては、ホスト装置2から伝送されたデータの先頭アドレスがICカードリーダライタ1のノードアドレスと判定された場合、バッファリングされたデータは、RAM7に蓄積(バッファリング)されて、リーダライタコマンドとして必要な処理がなされ、この場合、ホスト装置2とICカードリーダライタ1間のデータの授受は、ブロック伝送により行われることが表されている(図8の実線矢印部分参照)。
【0049】
次に、先の図4に示されたステップ300におけるプロトコル判定において、ICカード3がキャラクタ伝送プロトコル仕様に準拠したものであると判定された場合に実行される第2の通信制御処理の具体的な内容について図9乃至図13を参照しつつ説明する。
【0050】
まず、ICカードリーダライタ1によりICカード3がキャラクタ伝送プロトコル仕様に準拠したものであると判定されると、ホスト装置2からデータの伝送が開始される。それに伴いICカードリーダライタ1においては、ホスト装置2から伝送されたデータの先頭バイトについて判定が行われる(図9のステップ502参照)。
【0051】
すなわち、データの先頭バイトが、ICカードリーダライタ1のノードアドレスか否かが判定され、ICカードリーダライタ1のノードアドレスではないと判定された場合には、ホスト装置2からのデータは、ICカード3に対するものであるとして、ホスト装置2からのデータをそのままICカード3へ伝送すると共に、ICカード3からホスト装置2へ対して出力されたデータは、ICカードリーダライタ1を介してそのままホスト装置2へ伝送する状態、すなわち、スルーモード状態となる(図9のステップ504参照)。
【0052】
この場合、ホスト装置2とICカード3間のデータの授受は、キャラクタ伝送プロトコルに基づいて行われることとなる。
【0053】
ここで、キャラクタ伝送におけるデータ構成は、先のブロック伝送におけると同様に「JISX6304」の規定に基づくものであり、図10を参照しつつ概略的に説明すれば、キャラクタ伝送にけるデータは、コマンド、手続バイト、データ、ステータス毎に別個のデータブロックとして伝送されるようになっている。そして、これら伝送順序は、特に規定されておらず、先頭がいずれのものとなるかは不定である。
【0054】
上述のスルーモードを概念的に表した図が図11に示されている。
【0055】
すなわち、上述したように、スルーモードにおいて、ICカードリーダライタ1を介してのホスト装置2とICカード3との相互のデータの授受は、キャラクタ伝送により行われることが図11において表されている(同図の実線矢印部分参照)。そして、ICカードリーダライタ1に入力されたホスト装置2からのICカード3へのデータは、例えばカードインターフェイス回路6内に設けられたいわゆるFIFO(先入先出レジスタ)6aを介してICカード3へ伝送される一方、ICカード3からホスト装置2へのデータは、ICカードリーダライタ1の通信インターフェイス回路5内に設けられたFIFO5aを介してホスト装置2へ伝送されるようになっている。
【0056】
一方、ホスト装置2から伝送されたデータの先頭バイトが、ICカードリーダライタ1のノードアドレスと一致すると判定された場合には、その受信データに対して仮バッファリングが実行されるバッファリングモードとなる(図9のステップ506参照)。すなわち、ホスト装置2からのデータは、一旦、RAM7の所定の領域に蓄積されることとなる。
【0057】
次いで、受信されたデータの2バイト目がリーダライタコマンドか否かが判定され(図9のステップ508参照)、2バイト目がリーダライタコマンドではないと判定された場合には、仮バッファリングにより受信されたホスト装置2からのデータは、そのままICカード3へキャラクタ伝送により転送されることとなる(図9のステップ518参照)。
【0058】
一方、ステップ508において、2バイト目がリーダライタコマンドであると判定された場合には、3バイト目以降のバイトがリーダライタコマンド以外のものがないか否かが判定されることとなる(図9のステップ510参照)。
【0059】
そして、3バイト目以降の何れかのバイトが、リーダライタコマンドではないと判定された場合には、その時点まで仮バッファリングにより受信されたホスト装置2からのデータは、そのままICカード3へキャラクタ伝送により転送されるいわばバッファリングモードとなる(図9のステップ518参照)。
【0060】
また一方、ステップ510において、3バイト目以降の何れのバイトにおいても、リーダライタコマンドではないと判定されることがなかった場合、受信されたバイト数がリーダライタコマンドに予め規定された所定のバイト数を越えたか否かが判定されることとなる(図9のステップ512参照)。
【0061】
そして、受信されたバイト数がリーダライタコマンドに予め規定された所定のバイト数を越えたと判定された場合(NGの場合)には、このホスト装置2から伝送されたデータは、ICカード3向けのものであるとして、それまで仮バッファリングによりRAM7に一時的に蓄積されたデータは、ICカード3へキャラクタ伝送により転送されることとなる(図9のステップ518参照)。
【0062】
また、ステップ512において、受信されたバイト数がリーダライタコマンドに予め規定された所定のバイト数を越えていないと判定された場合(OKの場合)には、受信されたデータは、最終的にリーダライタコマンドであるとして、リーダライタコマンド処理へ進むこととなる(図9のステップ514参照)。
【0063】
ここで、ステップ506、510、512のいずれかからステップ518へ進みデータ転送がなされる状態を、便宜上、バッファリングモードと称することとする。
【0064】
このバッファリングモードを概念的に表した図が図12に示されている。
【0065】
すなわち、図12においては、ホスト装置2から伝送されたデータが、リーダライタコマンドではないと判定された場合、仮バッファリングされたデータは、例えばカードインターフェイス回路6内に設けられたいわゆるFIFO(先入先出レジスタ)6aを介してICカード3へキャラクタ伝送により伝送される一方、ICカード3からホスト装置2へのデータは、ICカードリーダライタ1の通信インターフェイス回路5内に設けられたFIFO5aを介してホスト装置2へキャラクタ伝送により伝送されるようになっていることが表されている(図12の実線矢印部分参照)。
【0066】
なお、このバッファリングモードにおいては、ICカードリーダライタ1に必要とされるRAM7の容量としては、最大でICカードリーダライタ1のコマンドの最大バイト数分であればよく、従来と異なり、ICカード3のデータバイト数分を必要とすることはない。
【0067】
さらに、ホスト装置2とICカード3とのデータの授受が開始されるまで、ICカードリーダライタ1で費やされる時間は、最大でもICカードリーダライタ1のコマンドの最大バイト数分の受信時間に略匹敵する時間で済む。
【0068】
リーダライタコマンド処理(図9のステップ514参照)においては、受信したデータが最終的にリーダライタコマンドであると確定されたことに伴い、コマンドの内容に応じた必要な処理が行われるリーダライタコマンドモードとなるものである。このリーダライタコマンドモードにおいては、ICカードリーダライタ1からホスト装置2へデータの伝送が必要な場合には、ブロック伝送により行われるようになっている(図9のステップ516参照)。
【0069】
このリーダライタコマンドモード概念的に表した図が図13に示されている。
【0070】
すなわち、図13においては、ホスト装置2から伝送されたデータが、リーダライタコマンドであると確定された場合、仮バッファリングされたデータは、リーダライタコマンドとして必要な処理がなされ、この場合、ホスト装置2とICカードリーダライタ1間のデータの授受は、ブロック伝送により行われることが表されている(図13の実線矢印部分参照)。
【0071】
上述の例においては、ホスト装置2が、ブロック伝送プロトコル及びキャラクタ伝送プロトコルを備えてなるものであるとの前提の下で説明を行ったが、ホスト装置2は、常時これら2種類のプロトコルに対応可能なものでなければならないものではなく、いずれか一方のプロトコルに対応できる構成のものであっても、上述した構成のICカードリーダライタ1を介してICカード3とのデータの授受が同様に可能であることは勿論のことである。
【0072】
上述の説明においては、請求項5におけるアドレス判定手段は、CPU4によるステップ410、502の実行により、データ通過制御手段は、CPU4によるステップ420、504、508、510、512、518の実行により、コマンド処理手段は、CPU4によるステップ430、440、508、510、512、514、516の実行により、それぞれ実現されたものとなっている。
【0073】
また、請求項6及び請求項7におけるアドレス判定手段は、CPU4によるステップ410、502の実行により、データ蓄積手段は、RAM7により、第1のデータ通過制御手段は、CPU4によるステップ420の実行により、第1のコマンド処理手段は、CPU4によるステップ430、440の実行により、それぞれ実現されたものとなっている。さらに、請求項6及び請求項7における第2のデータ通過制御手段は、ステップ504の実行により、バファリング制御手段は、CPU4によるステップ506の実行により、コマンド判定手段は、CPU4によるステップ508、510の実行により、バイト数判定手段は、CPU4によるステップ512の実行により、第3のデータ通過制御手段及び第4のデータ通過制御手段は、CPU4によるステップ518の実行により、第2のコマンド処理手段は、CPU4によるステップ514、516の実行により、それぞれ実現されたものとなっている。
【0074】
なお、上述の説明においては、CPU4により実行されるデータ伝送プログラムがROM8に予め記憶されているとの前提の下で、上述のような通信制御が行われるとして説明したが、このプログラムは必ずしもROM8に予め記憶されている必要はないものである。すなわち、公知・周知の外部の記憶媒体に記憶させておき、起動制御の実行の際に、この記憶媒体からCPU4へ読み込まれるようにしてもよいものである。
【0075】
すなわち、例えば、このような記憶媒体としては、フロッピィー・ディスク、ハード・ディスク、磁気テープ等に代表されるいわゆる磁気記録媒体のようなものや、光ディスクのようなものを挙げることができる。勿論、このような記録媒体を用いる場合には、それぞれに適した読み取り装置(フロッピィー・ディスクドライブやハード・ディスクドライブ等)が必要となることは言うまでもないことである。
【0076】
また、上述の発明の実施の形態においては、好適な例として、通信制御装置が、ICカードリーダライタであり、最下位装置がICカードである場合について説明したが、通信制御装置、最下位装置は、勿論このようなものに限定される必要はないものである。
【0077】
【発明の効果】
発明によれば、通信制御装置へデータが入力されつつある場合において、通信制御装置のコマンドであるか否かの判定をバイト単位で逐次行い、当該入力データが所定のバイト数の範囲であって、全て通信制御装置のコマンドであると判定された以外は、上位装置と最下位装置間で授受されるべきデータであるとして当該データに何等加工を加えることなく通過せしめるようにしたので、従来に比してデータを一時的に蓄積するメモリ容量が必要最小限で済み、より回路の簡素化が図れ、装置の低価格化を実現することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態におけるICカードリーダライタシステムの構成例を示す構成図である。
【図2】ICカードリーダライタの構成例を示す構成図である。
【図3】本発明の実施の形態のICカードリーダライタシステムにおける通信プロトコルを説明する説明図である。
【図4】ICカードリーダライタにおける動作制御の全体的な流れを説明するメインフローチャートである。
【図5】第1の通信制御における制御手順を示すサブルーチンフローチャートである。
【図6】ブロック伝送プロトコルにおけるデータ構成を示す説明図である。
【図7】第1の通信制御におけるスルーモードを概念的に表した概念図である。
【図8】第1の通信制御におけるリーダライタコマンドモードを概念的に表した概念図である。
【図9】第2の通信制御における制御手順を示すサブルーチンフローチャートである。
【図10】キャラクタ伝送プロトコルにおけるデータ構成を説明する説明図である。
【図11】第2の通信制御におけるスルーモードを概念的に表した概念図である。
【図12】第2の通信制御におけるバッファリングモードを概念的に表した概念図である。
【図13】第2の通信制御におけるリーダライタコマンドモードを概念的に表した概念図である。
【符号の説明】
1 ICカードリーダライタ
2 ホスト装置
3 ICカード
4 CPU
5 通信インターフェイス回路
6 カードインターフェイス回路
7 RAM
8 ROM
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a communication control device that mediates and controls the exchange of data between two electronic devices, and in particular, a so-called IC card capable of reading / writing data from the outside and the exchange of data with this IC card. The present invention relates to a data transmission method, a communication control device, and a recording medium on which a data transmission program is used.
[0002]
[Prior art]
  Conventionally, as this type of device, for example, as shown in Japanese Patent Laid-Open No. 8-31590, an IC card reader / writer that performs data transfer between a so-called IC card and a host device, the protocol of the IC card is used. A determining means for determining the type and a protocol converting means are provided, and when it is determined that the protocol of the IC card is different from the protocol between the host device and the IC card reader / writer, the protocol converting means converts the protocol. Are known and known so that data can be exchanged between the IC card and the host device.
[0003]
[Problems to be solved by the invention]
  However, in such a conventional device, when it is determined that the protocol of the IC card is other than a predetermined format, the data from the IC card to the host device and the data from the host device to the IC card are stored in the IC card reader / writer. Since protocol conversion, in other words, data conversion is performed by the protocol conversion means, there is a problem that the confidentiality of data is reduced as compared with a case where the protocol is predetermined. That is, when the IC card protocol is in a predetermined format, the data from the IC card to the host device and the data from the host device to the IC card are in a so-called through state without being subjected to data conversion in the IC card reader / writer. Since the data is directly exchanged between the IC card and the host device, the confidentiality of data in the IC card reader / writer can be sufficiently high. On the other hand, when protocol conversion is performed in the IC card reader / writer as described above, the data from the host device to the IC card and the data from the IC card to the host device are once expanded in the IC card reader / writer. Therefore, the confidentiality of data will inevitably decrease unless some measure is taken.
[0004]
  In addition, in order to perform protocol conversion, a so-called buffer memory for temporarily storing data from the host device to the IC card and data from the IC card to the host device is required, and the memory capacity is at least that of the IC card. Since about data bytes are required, there is a problem that the hardware load of the IC card reader / write increases and the price increases. Furthermore, when the IC card protocol is not in a predetermined format, protocol conversion is performed and data is exchanged between the host device and the IC card. Therefore, it takes time to exchange data between the IC card and the host device. There was a problem that it took.
[0005]
  The present invention has been made in view of the above circumstances.,Compatible with IC cards with different protocols without protocol conversionon top,To provide a data transmission method, a communication control apparatus, and a recording medium on which a data transmission program is recorded, which requires a minimum memory capacity and can be reduced in price..
[0006]
[Means for Solving the Problems]
  Of the present inventionThe data transmission method isA host device having a block transmission protocol and a character transmission protocol, and a lowest device configured to be able to read and write data based on any one communication protocol of the block transmission protocol or the character transmission protocol; Is a data transmission method in a communication control device that mediates and controls communication between the higher-level device and the lowest-level device, and determines a communication protocol of the connected lowest-level device, from the higher-level device It is determined whether or not the first byte included in the transmitted data is for the communication control device, and when the communication protocol of the least significant device is determined to be a block transmission protocol, the first byte is for the communication control device. If it is determined that the data is not, the data transmitted from the host device is While allowed to pass to the lower unit, passed through a data transmitted from said bottom device to the host device, the lowest device If it is determined that the communication protocol is a block transmission protocol, and if it is determined that the first byte is for the communication control device, the data transmitted from the host device is processed as a command in the communication control device. When the communication protocol of the lowest-order device is determined to be a character transmission protocol, and it is determined that the first byte is not for the communication control device, the data transmitted from the higher-order device is transferred to the lowest-order device. The data transmitted from the lowest-order device is passed to the higher-order device, and the communication protocol of the lowest-order device is determined to be a character transmission protocol, and the first byte is for the communication control device. If it is determined that the data is a device, temporarily control the communication of data from the host device. It is determined whether or not the second and subsequent bytes of the data stored in the device and transmitted from the host device are commands of the communication control device, and when the command is determined not to be a command of the communication control device, the temporary The transmission of the accumulated data to the lowest device is started, and thereafter, the data from the upper device is allowed to pass to the lowest device and the data from the lowest device is allowed to pass to the higher device. If it is determined that the second and subsequent bytes of data transmitted from the device are commands of the communication control device, and if it is determined that the number of bytes of received data is greater than or equal to a predetermined value, the temporarily stored data Perform transmission to the lowest device, and then pass data from the host device to the lowest device and pass data from the lowest device to the host device, If the second and subsequent bytes of the data transmitted from the host device are determined as a command of the communication control device, and if it is determined that the number of bytes of the received data is within the predetermined range, the command is processed as a command of the communication control device DoIs.
[0007]
  The communication control device of the present inventionA host device having a block transmission protocol and a character transmission protocol, and a lowest device configured to be able to read and write data based on one communication protocol of the block transmission protocol or the character transmission protocol. A communication control device that mediates and controls communication between the higher-level device and the lowest-level device, the communication control device including a protocol determination unit that determines a communication protocol of the connected lowest-level device; , Address determination means for determining whether or not the first byte included in the data transmitted from the higher-level device is for the communication control device, temporarily storing the externally input data, and according to the input of the control signal The communication protocol of the lowest level device is obtained by the data storage means for outputting to the outside and the protocol judgment means. Is determined to be a block transmission protocol, and if the address determination means determines that the first byte is not for the communication control device, the data transmitted from the higher-level device is transferred to the lowest-level device. When the communication protocol of the lowest-order device is determined to be a block transmission protocol by the first data passage control means for passing the data transmitted from the lowest-order device to the higher-order device and the protocol determination means Then, when the address determination means determines that the first byte is for the communication control device, the first command processing for processing the data transmitted from the host device as a command in the communication control device Means and the protocol determination means, the communication protocol of the lowest device is If it is determined as a character transmission protocol and the address determination means determines that the first byte is not for the communication control device, the data transmitted from the higher-level device is passed to the lowest-level device. On the other hand, when the communication protocol of the lowest device is determined to be a character transmission protocol by the second data passage control means for passing the data transmitted from the lowest device to the higher device and the protocol determination device. When the address determination means determines that the first byte is for the communication control device, the buffer control means for storing data from the host device in the data storage means, and the protocol determination means The communication protocol of the lowest level device is determined as the character transmission protocol. In this case, when the address determining means determines that the first byte is for the communication control device, the second and subsequent bytes of data transmitted from the host device are transmitted with the command of the communication control device. If the command determination means for determining whether or not there is any byte of the data transmitted from the host device that is not a command for the communication control device, the data of the data storage means A third data passage control means for transmitting data from the upper-level device to the lower-level device and passing data from the lower-level device to the upper-level device, and the command determination Means that any byte of data transmitted from the host device is a command of the communication control device. The number of bytes determination unit for determining whether or not the number of bytes of data transmitted from the host device is greater than or equal to a predetermined value, and the number of bytes of data transmitted from the host device is greater than or equal to a predetermined number by the number of bytes determination unit If it is determined that there is a data, the data stored in the data storage means is transmitted to the lowest device, and then the data from the host device is passed to the lowest device and the data from the lowest device is passed to the host device. When the number of bytes of data transmitted from the host device is determined to be within a predetermined range by the fourth data passing control unit and the byte number determination unit, the data is processed as a command in the communication control device. Second command processing meansAndAlso comprisingBecauseis there.
[0008]
  In addition, the recording medium on which the data transmission program of the present invention is recorded includes a host device having a block transmission protocol and a character transmission protocol, and data storage based on one of the block transmission protocol and the character transmission protocol. Executed by the computer in the communication control device that is provided between the lowest device configured to be readable and writable and that uses a computer to mediate and control communication between the host device and the lowest device. The data transmission processing program causes the computer to determine the communication protocol of the lowest device connected, and the first byte included in the data transmitted from the upper device is Determine if it is for the computer When the communication protocol of the lowest-order device is determined to be a block transmission protocol, and it is determined that the first byte is not for the computer, the data transmitted from the higher-order device is transferred to the lowest-order device. The data transmitted from the lowest-order device is passed to the higher-order device, and when the communication protocol of the lowest-order device is determined to be a block transmission protocol, the first byte corresponds to the computer. If it is determined that the data is transmitted from the host device as a command in the computer, and the communication protocol of the lowest device is determined to be a character transmission protocol, the first byte is If it is determined that it is not for the computer The data transmitted from the higher-level device is allowed to pass to the lowest-level device, while the data transmitted from the lowest-level device is allowed to pass to the higher-level device, and the communication protocol of the lowest-level device is determined to be a character transmission protocol. In this case, if it is determined that the first byte is for the computer, the data from the host device is temporarily stored, and the second and subsequent bytes of the data transmitted from the host device are commanded by the computer. At the time when it is determined that the command is not a command in the computer, the transmission of the temporarily accumulated data to the lowest device is started, and thereafter data from the host device is To the lowest device and the data from the lowest device to the higher device. On the other hand, if it is determined that the second and subsequent bytes of the data transmitted from the host device are commands in the computer, and it is determined that the number of bytes of the received data is greater than or equal to a predetermined value, the temporary storage is performed. Transmission of the received data to the lowest device, and thereafter, the data from the host device is passed to the lowest device and the data from the lowest device is passed to the host device and transmitted from the host device. If it is determined that the second and subsequent bytes of data are commands in the computer, and if it is determined that the number of bytes of received data is within a predetermined range, the commands are processed as commands in the computer.
[0009]
  Such a configuration is particularly suitable when the lowest device is an IC card and the communication control device is a so-called IC card reader / writer. With this configuration, data can be exchanged between the IC card and the host device without any data processing in the IC card reader / writer, regardless of the communication protocol of the IC card. Thus, it is possible to realize quick data exchange while maintaining high confidentiality.
[0010]
  Note that the host device does not necessarily have to have two types of communication protocols, block transmission protocol and character transmission protocol, and may have either one of the protocols. is there.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
  Hereinafter, embodiments of the present invention will be described with reference to FIGS. 1 to 13.
[0012]
  The members and arrangements described below do not limit the present invention and can be variously modified within the scope of the gist of the present invention.
[0013]
  First, a system configuration in which an IC card reader / writer 1 as a communication control apparatus according to an embodiment of the present invention is used will be described with reference to FIG.
[0014]
  An IC card reader / writer (indicated as “R / W” in FIG. 1) includes a so-called IC card 3 capable of reading / writing data from the outside as a lowest device and a host device 2 as a host device. It functions to mediate data exchange, and is connected to the host device 2 by a predetermined interface (for example, RS-232C, etc.) while being able to insert and remove the IC card 3. (See FIG. 1).
[0015]
  The host apparatus 2 according to the embodiment of the present invention has two protocols that are currently used as the protocol of the IC card 3, that is, the international standard protocol T = 1 (half-duplex asynchronous block transmission protocol) and T = 0. (Asynchronous half-duplex character transmission protocol) can be supported.
[0016]
  On the other hand, as shown in FIG. 2, the IC card reader / writer 1 mainly includes a so-called CPU 4, and in addition, a communication interface circuit 5 for interfacing with the host device 2 and an interface with the IC card 3. The card interface circuit 6, the RAM 7, and the ROM 8 are provided.
[0017]
  A ROM (Read Only Memory) 8 stores a program for performing processing for data exchange between the IC card 3 and the host device 2 as will be described later. The CPU 4 reads the program. It is supposed to run on.
[0018]
  The communication interface circuit 5 is an interface between the host device 2 and the IC card reader / writer 1. For example, the communication interface circuit 5 is connected between the IC card 3 and the host device 2 based on a known and well-known interface standard such as RS-232C. Communication is possible.
[0019]
  The card interface circuit 6 supplies a power supply voltage to the IC card 3 through a connection portion with the IC card 3 and outputs a control signal, data, and the like from the CPU 4 to the IC card 3 at a predetermined voltage level. The interface with the IC card 3, such as converting the data read from the IC card 3 to a predetermined level and sending it to the CPU 4, is intended.
[0020]
  A RAM (Random Access Memory) 7 is a known and known so-called IC memory, and is used for temporarily storing data in a buffering process or the like to be described later.
[0021]
  Next, in the above configuration, the form of mutual communication between the host device 2, the IC card reader / writer 1, and the IC card 3 will be described with reference to the explanatory diagram of FIG.
[0022]
  First, the communication between the host device 2 and the IC card reader / writer 1 will be described. First, the command regarding the operation of the IC card reader / writer 1 with respect to the host device 2 is exchanged with a half-duplex asynchronous block transmission protocol (hereinafter referred to as a half-duplex asynchronous block transmission protocol). (Referred to as “block transmission protocol”) (in the column labeled “host-R / W protocol” in FIG. 3, the left column is denoted as “R / W command communication”) (See the line part).
[0023]
  Further, when the IC card 3 conforms to the block transmission protocol specification, the communication between the IC card reader / writer 1 and the host device 2 is performed by the block transmission protocol (see “Host--” in FIG. 3). The left column in the column labeled “R / W protocol” (see the portion of the line labeled “Block transmission protocol specification IC card communication”).
[0024]
  Further, when the IC card 3 conforms to the asynchronous half-duplex character transmission protocol (hereinafter referred to as “character transmission protocol”) specification, the communication between the IC card reader / writer 1 and the host device 2 is the character transmission protocol. (Refer to the part of the row in which the left column in the column labeled “Host-R / W Protocol” in FIG. 3 is labeled “Character Transmission Protocol Specification IC Card Communication”).
[0025]
  Next, communication between the IC card reader / writer 1 and the IC card 3 will be described. First, when the IC card 3 conforms to the block transmission protocol specification, communication between the IC card 3 and the IC card reader / writer 1 is performed. Is performed in accordance with the block transmission protocol (in the column labeled “R / W-IC card protocol” in FIG. 3, the left column is the row labeled “Block transmission protocol specification IC card communication”. See section).
[0026]
  When the IC card 3 conforms to the character transmission protocol specification, communication between the IC card 3 and the IC card reader / writer 1 is performed according to the character transmission protocol (“R” in FIG. 3). In the column labeled “/ W-IC card protocol”, the left column refers to the portion of the row labeled “character transmission protocol specification IC card communication”).
[0027]
  Next, with regard to internal processing in the IC card reader / writer 1, IC card reader / writer command processing by a predetermined program is performed for processing such as a unique command in the IC card reader / writer 1 (see FIG. 3 in the column labeled “R / W internal processing” in the left column (see the portion of the row labeled “R / W command communication”).
[0028]
  As for the internal processing of the IC card reader / writer 1 related to the IC card 3 compliant with the block transmission protocol specification, direct data transfer is performed (the left column in the column labeled “R / W internal processing” in FIG. The internal processing of the IC card reader / writer 1 related to the IC card 3 conforming to the character transmission protocol specification is not an IC card reader / writer command. The data transfer is performed directly after the data is confirmed (in the column labeled “R / W internal processing” in FIG. 3, the left column is the row labeled “Character transmission protocol specification IC card communication”. See the part).
[0029]
  Next, a more specific procedure of communication control processing by the IC card reader / writer 1 will be described with reference to FIGS.
[0030]
  First, the flow of the overall communication control process will be described with reference to FIG. 4. First, when the IC card 3 is inserted into a predetermined location of the IC card reader / writer 1, the power supply voltage to the IC card 3 will be described. The IC card reader / writer 1 activates the so-called IC card, such as supply of data and initial setting (see step 100 in FIG. 4).
[0031]
  Next, in response to the activation of the IC card, initial response data called answer-to-reset (ATR) is transmitted from the IC card 3 to the IC card reader / writer 1, and the IC card reader / writer 1 analyzes the data. (See step 200 of FIG. 4).
[0032]
  Then, the protocol determination of the IC card 3 is performed based on the data indicating the protocol type of the IC card 3 included in the initial response data (see step 300 in FIG. 4).
[0033]
  If it is determined by this protocol determination that the protocol of the IC card 3 is a block transmission protocol, a first communication control subroutine that is a communication control subroutine with the IC card 3 of the block transmission protocol specification is executed. Communication between the IC card reader / writer 1 and the host device 2 and the IC card 3 is performed (see step 400 in FIG. 4).
[0034]
  On the other hand, if it is determined by protocol determination that the protocol of the IC card 3 is a character transmission protocol, a second communication control subroutine that is a communication control subroutine with the IC card 3 of the character transmission protocol specification is executed. Communication between the IC card reader / writer 1 and the host device 2 and the IC card 3 is performed (see step 500 in FIG. 4).
[0035]
  Here, the processes from the IC card activation process (see step 100 in FIG. 4) to the protocol determination process (see step 300 in FIG. 4) shown in FIG. 4 are known and well-known techniques. Since these are actually standardized, a detailed description thereof will be omitted here.
[0036]
  Next, specific contents of the first communication control process executed when it is determined that the IC card 3 conforms to the block transmission protocol specification will be described with reference to FIGS.
[0037]
  When the IC card reader / writer 1 determines that the IC card 3 conforms to the block transmission protocol specification, the host device 2 sends data to the IC card 3 or the IC card reader / writer 1 based on the block transmission protocol. Transmission of data to is started. Accordingly, the IC card reader / writer 1 determines the first byte of the signal block-transmitted from the host device 2 (see step 410 in FIG. 5).
[0038]
  That is, it is determined whether the so-called node address is for the IC card reader / writer 1 or the IC card 3.
[0039]
  Here, if the data configuration used in the block transmission is shown, for example, as shown in FIG. 6, the blocks of data in the block transmission are, in order from the top, the first field (PROLOG) and the information field (INFORMATION). The final field (EPILOG) is roughly divided into three, and these are transmitted as integral data, that is, as a block. The structure of this block is defined as an international standard, and is defined in “JISX6304” in Japan.
[0040]
  The node address (denoted as “NAD” in FIG. 6) is a constituent element of the head field, and is a portion that represents the address of the transmission source and reception source of the block. A detailed description of the individual data of the block shown in FIG. 6 will be omitted.
[0041]
  Whether the node address is for the IC card reader / writer 1 or the IC card 3 is determined, for example, in the embodiment of the present invention by determining whether the value is within a predetermined range. It is. That is, for example, if it is determined that the node address is not in the range of “10” to “1F” in hexadecimal, the received block is in the through mode state as a command of the IC card 3. (See step 420 in FIG. 5). That is, the received block is transmitted as it is to the IC card 3 based on the block transmission protocol, while if there is data to be transmitted from the IC card 3 to the host device 2, the IC card reader / writer 1 is connected. Then, the data is transmitted as it is to the host device 2 (see step 420 in FIG. 5).
[0042]
  FIG. 7 is a diagram conceptually showing this through mode.
[0043]
  That is, in the through mode, data exchange between the host device 2 and the IC card 3 via the IC card reader / writer 1 is performed by block transmission, and the host input to the IC card reader / writer 1 is transmitted. Data from the device 2 to the IC card 3 is transmitted to the IC card 3 via, for example, a so-called FIFO (first-in first-out register) 6a provided in the card interface circuit 6, while the host device 2 from the IC card 3 is transmitted. Is transmitted to the host device 2 via the FIFO 5a provided in the communication interface circuit 5 of the IC card reader / writer 1 (see the solid arrow in FIG. 7). ).
[0044]
  In FIG. 7, “T = 14” written in the portion of the IC card 3 means a block transmission protocol not based on the international standard. This protocol is also common to the T = 0 protocol in terms of block transmission, and the communication control according to the present invention can be used. Therefore, the IC card 3 uses any communication protocol of T = 0 or T = 14. It may be.
[0045]
  On the other hand, when it is determined that the node address of the reception block transmitted from the host device 2 is a value in the range of “10” to “1F” in hexadecimal, the reception block is the IC card reader / writer. 1 command, that is, a reader / writer command mode in which reader / writer command processing is executed (see step 430 in FIG. 5). That is, a predetermined process determined according to the information data of the received block is performed. The specific processing to be performed is determined by the type and content of the command set in each IC card reader / writer 1, and detailed description thereof will be omitted here.
[0046]
  In the reader / writer command processing, when data is transmitted from the IC card reader / writer 1 to the host device 2, data is transmitted based on the block transmission protocol specification (FIG. 5). (See step 440).
[0047]
  A diagram conceptually showing the above-mentioned reader / writer command mode is shown in FIG.
[0048]
  That is, in FIG. 8, when it is determined that the head address of the data transmitted from the host device 2 is the node address of the IC card reader / writer 1, the buffered data is stored (buffered) in the RAM 7, Processing necessary as a reader / writer command is performed. In this case, data exchange between the host device 2 and the IC card reader / writer 1 is performed by block transmission (see a solid arrow in FIG. 8).
[0049]
  Next, in the protocol determination in step 300 shown in FIG. 4, the second communication control process that is executed when it is determined that the IC card 3 conforms to the character transmission protocol specification. The details will be described with reference to FIGS.
[0050]
  First, when the IC card reader / writer 1 determines that the IC card 3 conforms to the character transmission protocol specification, data transmission from the host device 2 is started. Accordingly, the IC card reader / writer 1 determines the first byte of the data transmitted from the host device 2 (see step 502 in FIG. 9).
[0051]
  That is, it is determined whether or not the first byte of the data is the node address of the IC card reader / writer 1, and if it is determined that it is not the node address of the IC card reader / writer 1, the data from the host device 2 is Assuming that the data is for the card 3, the data from the host device 2 is transmitted to the IC card 3 as it is, and the data output from the IC card 3 to the host device 2 is directly sent to the host via the IC card reader / writer 1. A state of transmission to the device 2, that is, a through mode state is entered (see step 504 in FIG. 9).
[0052]
  In this case, data exchange between the host device 2 and the IC card 3 is performed based on the character transmission protocol.
[0053]
  Here, the data structure in the character transmission is based on the provision of “JISX6304” as in the previous block transmission. If it is schematically described with reference to FIG. Each procedure byte, data, and status is transmitted as a separate data block. These transmission orders are not particularly defined, and it is uncertain which one will start.
[0054]
  A diagram conceptually showing the above-described through mode is shown in FIG.
[0055]
  That is, as described above, in the through mode, it is shown in FIG. 11 that data exchange between the host device 2 and the IC card 3 via the IC card reader / writer 1 is performed by character transmission. (Refer to the solid arrows in the figure). The data from the host device 2 to the IC card 3 input to the IC card reader / writer 1 is transferred to the IC card 3 via a so-called FIFO (first-in first-out register) 6a provided in the card interface circuit 6, for example. On the other hand, data from the IC card 3 to the host device 2 is transmitted to the host device 2 via the FIFO 5 a provided in the communication interface circuit 5 of the IC card reader / writer 1.
[0056]
  On the other hand, if it is determined that the first byte of the data transmitted from the host device 2 matches the node address of the IC card reader / writer 1, a buffering mode in which temporary buffering is performed on the received data (See step 506 in FIG. 9). That is, data from the host device 2 is temporarily stored in a predetermined area of the RAM 7.
[0057]
  Next, it is determined whether or not the second byte of the received data is a reader / writer command (see step 508 in FIG. 9). If it is determined that the second byte is not a reader / writer command, temporary buffering is performed. The received data from the host device 2 is directly transferred to the IC card 3 by character transmission (see step 518 in FIG. 9).
[0058]
  On the other hand, if it is determined in step 508 that the second byte is a reader / writer command, it is determined whether or not the third and subsequent bytes are other than the reader / writer command (FIG. 5). 9 step 510).
[0059]
  If it is determined that any byte after the third byte is not a reader / writer command, the data from the host device 2 received by temporary buffering up to that point is directly sent to the IC card 3 as a character. The so-called buffering mode is established by transmission (see step 518 in FIG. 9).
[0060]
  On the other hand, if it is not determined in step 510 that any of the third and subsequent bytes is not a reader / writer command, the number of received bytes is equal to a predetermined byte defined in the reader / writer command. It is determined whether or not the number has been exceeded (see step 512 in FIG. 9).
[0061]
  When it is determined that the number of received bytes exceeds a predetermined number of bytes preliminarily defined in the reader / writer command (in the case of NG), the data transmitted from the host device 2 is directed to the IC card 3 Therefore, the data temporarily stored in the RAM 7 by temporary buffering until then is transferred to the IC card 3 by character transmission (see step 518 in FIG. 9).
[0062]
  If it is determined in step 512 that the number of received bytes does not exceed the predetermined number of bytes specified in advance in the reader / writer command (in the case of OK), the received data is finally Assuming that it is a reader / writer command, the process proceeds to a reader / writer command process (see step 514 in FIG. 9).
[0063]
  Here, for the sake of convenience, the state in which data is transferred from any one of steps 506, 510, and 512 to step 518 is referred to as a buffering mode.
[0064]
  A diagram conceptually showing this buffering mode is shown in FIG.
[0065]
  That is, in FIG. 12, when it is determined that the data transmitted from the host device 2 is not a reader / writer command, the temporarily buffered data is, for example, a so-called FIFO (first-in) FIFO provided in the card interface circuit 6. Data is transmitted from the IC card 3 to the host device 2 via the FIFO 5a provided in the communication interface circuit 5 of the IC card reader / writer 1 while being transmitted by character transmission to the IC card 3 via the advance register 6a. It is shown that the data is transmitted to the host device 2 by character transmission (see the solid line arrow portion in FIG. 12).
[0066]
  In this buffering mode, the capacity of the RAM 7 required for the IC card reader / writer 1 only needs to be the maximum number of bytes of the command of the IC card reader / writer 1, and unlike the conventional case, the IC card No need for 3 data bytes.
[0067]
  Further, the time spent in the IC card reader / writer 1 until the data transfer between the host device 2 and the IC card 3 is started is abbreviated to the reception time corresponding to the maximum number of bytes of the command of the IC card reader / writer 1 at the maximum. Comparable time is enough.
[0068]
  In the reader / writer command processing (see step 514 in FIG. 9), a reader / writer command that performs necessary processing according to the content of the command when the received data is finally determined to be a reader / writer command. It becomes a mode. In this reader / writer command mode, when data transmission from the IC card reader / writer 1 to the host device 2 is necessary, block reader transmission is used (see step 516 in FIG. 9).
[0069]
  FIG. 13 shows a conceptual view of this reader / writer command mode.
[0070]
  That is, in FIG. 13, when it is determined that the data transmitted from the host apparatus 2 is a reader / writer command, the temporarily buffered data is processed as a reader / writer command. It is shown that data exchange between the device 2 and the IC card reader / writer 1 is performed by block transmission (see the solid line arrow portion in FIG. 13).
[0071]
  In the above example, the host device 2 has the block transmission protocol and the character transmission protocol.LeAlthough the description has been made under the premise that the host device 2 is provided, the host device 2 does not always have to be able to support these two types of protocols, and can support either one of the protocols. Of course, even with the configuration, data can be exchanged with the IC card 3 via the IC card reader / writer 1 having the configuration described above.
[0072]
  In the above description, the address determination means in claim 5 is executed by executing the steps 410 and 502 by the CPU 4, and the data passage control means is executed by executing the steps 420, 504, 508, 510, 512 and 518 by the CPU 4. The processing means is realized by execution of steps 430, 440, 508, 510, 512, 514, and 516 by the CPU 4, respectively.
[0073]
  Further, the address determination means in claims 6 and 7 is executed by the CPU 4 in steps 410 and 502, the data storage means is in the RAM 7, and the first data passage control means is executed in step 420 by the CPU 4. The first command processing means is realized by the execution of steps 430 and 440 by the CPU 4, respectively. Further, the second data passage control means in claims 6 and 7 is executed by executing step 504, the buffering control means is executed by step 4 by the CPU 4, and the command determining means is executed by steps 4508 and 510 by the CPU 4. , The number of bytes determining means is executed by the CPU 4 in step 512, the third data passing control means and the fourth data passing control means are executed in step 518 by the CPU 4, and the second command processing means is These are realized by the execution of steps 514 and 516 by the CPU 4.
[0074]
  In the above description, it has been described that the communication control as described above is performed under the assumption that the data transmission program executed by the CPU 4 is stored in the ROM 8 in advance. Need not be stored in advance. In other words, it may be stored in a known and well-known external storage medium, and read from this storage medium to the CPU 4 when executing the start control.
[0075]
  That is, for example, examples of such a storage medium include a so-called magnetic recording medium represented by a floppy disk, a hard disk, a magnetic tape, and the like, and an optical disk. Of course, when such a recording medium is used, it is needless to say that a reading device (floppy disk drive, hard disk drive, etc.) suitable for each is required.
[0076]
  Moreover, in the above-described embodiments of the present invention, as a preferred example, a case where the communication control device is an IC card reader / writer and the lowest device is an IC card has been described. Of course, it is not necessary to be limited to such a thing.
[0077]
【The invention's effect】
  BookAccording to the invention, ThroughWhen data is being input to the communication control device, it is sequentially determined whether or not it is a command of the communication control device in units of bytes, and the input data is within a predetermined number of bytes, and all communication control devices Except that it is determined that the command is a command, the data is to be passed between the host device and the lowest device without any processing. The memory capacity to be temporarily stored is minimal, the circuit can be simplified, and the cost of the device can be reduced.The
[Brief description of the drawings]
FIG. 1 is a configuration diagram showing a configuration example of an IC card reader / writer system in an embodiment of the present invention.
FIG. 2 is a configuration diagram showing a configuration example of an IC card reader / writer.
FIG. 3 is an explanatory diagram illustrating a communication protocol in the IC card reader / writer system according to the embodiment of this invention.
FIG. 4 is a main flowchart illustrating an overall flow of operation control in the IC card reader / writer.
FIG. 5 is a subroutine flowchart showing a control procedure in the first communication control.
FIG. 6 is an explanatory diagram showing a data configuration in a block transmission protocol.
FIG. 7 is a conceptual diagram conceptually showing a through mode in the first communication control.
FIG. 8 is a conceptual diagram conceptually showing a reader / writer command mode in the first communication control.
FIG. 9 is a subroutine flowchart showing a control procedure in second communication control.
FIG. 10 is an explanatory diagram illustrating a data configuration in a character transmission protocol.
FIG. 11 is a conceptual diagram conceptually showing a through mode in the second communication control.
FIG. 12 is a conceptual diagram conceptually showing a buffering mode in second communication control.
FIG. 13 is a conceptual diagram conceptually showing a reader / writer command mode in second communication control.
[Explanation of symbols]
        1 IC card reader / writer
        2 Host device
        3 IC card
        4 CPU
        5 Communication interface circuit
        6 Card interface circuit
        7 RAM
        8 ROM

Claims (8)

ブロック伝送プロトコル及びキャラクタ伝送プロトコルを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置におけるデータ伝送方法であって、
接続された最下位装置の通信プロトコルを判定し、
前記上位装置から伝送されたデータに含まれる先頭バイトが通信制御装置に対するものか否かを判定し、
前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、
前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものであると判定された場合、前記上位装置から伝送されたデータを当該通信制御装置におけるコマンドとして処理し、
前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、
前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、先頭バイトが通信制御装置に対するものであると判定された場合、上位装置からのデータを一時的に通信制御装置内に蓄積し、上位装置から伝送されたデータの2バイト目以降について、通信制御装置のコマンドであるか否かを判定し、通信制御装置のコマンドではないと判定された時点において、前記一時的に蓄積されたデータの最下位装置への伝送を開始すると共に、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる一方、
前記上位装置から伝送されたデータの2バイト目以降が通信制御装置のコマンドと判定され、しかも、受信されたデータのバイト数が所定以上であると判定された場合、前記一時的に蓄積されたデータの最下位装置への伝送を行い、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめ、
前記上位装置から伝送されたデータの2バイト目以降が通信制御装置のコマンドと判定され、しかも、受信されたデータのバイト数が所定内であると判定された場合、通信制御装置のコマンドとして処理することを特徴とするデータ伝送方法。
A host device having a block transmission protocol and a character transmission protocol, and a lowest device configured to be able to read and write data based on one communication protocol of the block transmission protocol or the character transmission protocol. A data transmission method in a communication control device that is provided between and performs communication mediation and control of communication between the host device and the lowest device,
Determine the communication protocol of the connected lowest device,
Determine whether the first byte included in the data transmitted from the host device is for the communication control device,
When it is determined that the communication protocol of the lowest-order device is a block transmission protocol and it is determined that the first byte is not for the communication control device, the data transmitted from the higher-order device is transferred to the lowest-order device. While allowing data transmitted from the lowest device to pass to the host device,
When the communication protocol of the lowest-order device is determined to be a block transmission protocol, and when it is determined that the first byte is for the communication control device, the data transmitted from the higher-level device is transferred to the communication control device. As a command in
When it is determined that the communication protocol of the lowest-order device is a character transmission protocol, and it is determined that the first byte is not for a communication control device, the data transmitted from the higher-order device is transferred to the lowest-order device. While allowing data transmitted from the lowest device to pass to the host device,
When the communication protocol of the lowest device is determined to be a character transmission protocol, and it is determined that the first byte is for the communication control device, the data from the higher device is temporarily stored in the communication control device. It is determined whether or not the second and subsequent bytes of data transmitted from the host device are commands of the communication control device, and the temporary storage is performed when it is determined that the command is not a command of the communication control device. Transmission of the received data to the lowest device, and thereafter, the data from the upper device is allowed to pass to the lowest device and the data from the lowest device is allowed to pass to the higher device,
If it is determined that the second and subsequent bytes of data transmitted from the host device are commands of the communication control device, and if it is determined that the number of bytes of received data is greater than or equal to a predetermined value, the temporarily stored data Transmit the data to the lowest device, and then pass the data from the host device to the lowest device and the data from the lowest device to the host device,
If it is determined that the second and subsequent bytes of the data transmitted from the host device are commands of the communication control device, and if it is determined that the number of bytes of the received data is within the predetermined range, it is processed as a command of the communication control device. A data transmission method.
ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置におけるデータ伝送方法であって、
接続された最下位装置の通信プロトコルを判定し、
前記上位装置から伝送されたデータに含まれる先頭バイトが通信制御装置に対するものか否かを判定し、
前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、
前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものであると判定された場合、前記上位装置から伝送されたデータを当該通信制御装置におけるコマンドとして処理し、
前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、
前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、先頭バイトが通信制御装置に対するものであると判定された場合、上位装置からのデータを一時的に通信制御装置内に蓄積し、上位装置から伝送されたデータの2バイト目以降について、通信制御装置のコマンドであるか否かを判定し、通信制御装置のコマンドではないと判定された時点において、前記一時的に蓄積されたデータの最下位装置への伝送を開始すると共に、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる一方、
前記上位装置から伝送されたデータの2バイト目以降が通信制御装置のコマンドと判定され、しかも、受信されたデータのバイト数が所定以上であると判定された場合、前記一時的に蓄積されたデータの最下位装置への伝送を行い、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめ、
前記上位装置から伝送されたデータの2バイト目以降が通信制御装置のコマンドと判定され、しかも、受信されたデータのバイト数が所定内であると判定された場合、通信制御装置のコマンドとして処理することを特徴とするデータ伝送方法。
Based on the host device having either one of the block transmission protocol or the character transmission protocol, and based on any one communication protocol of the block transmission protocol or the character transmission protocol, the data can be read and written. A data transmission method in a communication control device that is provided between the lowest device and mediates and controls communication between the host device and the lowest device,
Determine the communication protocol of the connected lowest device,
Determine whether the first byte included in the data transmitted from the host device is for the communication control device,
When it is determined that the communication protocol of the lowest-order device is a block transmission protocol and it is determined that the first byte is not for the communication control device, the data transmitted from the higher-order device is transferred to the lowest-order device. While allowing data transmitted from the lowest device to pass to the host device,
When the communication protocol of the lowest-order device is determined to be a block transmission protocol, and when it is determined that the first byte is for the communication control device, the data transmitted from the higher-level device is transferred to the communication control device. As a command in
When it is determined that the communication protocol of the lowest-order device is a character transmission protocol, and it is determined that the first byte is not for a communication control device, the data transmitted from the higher-order device is transferred to the lowest-order device. While allowing data transmitted from the lowest device to pass to the host device,
When the communication protocol of the lowest device is determined to be a character transmission protocol, and it is determined that the first byte is for the communication control device, the data from the higher device is temporarily stored in the communication control device. It is determined whether or not the second and subsequent bytes of data transmitted from the host device are commands of the communication control device, and the temporary storage is performed when it is determined that the command is not a command of the communication control device. Transmission of the received data to the lowest device, and thereafter, the data from the upper device is allowed to pass to the lowest device and the data from the lowest device is allowed to pass to the higher device,
If it is determined that the second and subsequent bytes of data transmitted from the host device are commands of the communication control device, and if it is determined that the number of bytes of received data is greater than or equal to a predetermined value, the temporarily stored data Transmit the data to the lowest device, and then pass the data from the host device to the lowest device and the data from the lowest device to the host device,
If it is determined that the second and subsequent bytes of the data transmitted from the host device are commands of the communication control device, and if it is determined that the number of bytes of the received data is within the predetermined range, it is processed as a command of the communication control device. A data transmission method.
通信制御装置は、ICカードリーダライタであり、最下位装置は、ICカードであることを特徴とする請求項1または2記載のデータ伝送方法。 3. The data transmission method according to claim 1, wherein the communication control device is an IC card reader / writer, and the lowest device is an IC card. ブロック伝送プロトコル及びキャラクタ伝送プロトコルを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置であって、
当該通信制御装置は、
接続された最下位装置の通信プロトコルを判定するプロトコル判定手段と、
前記上位装置から伝送されたデータに含まれる先頭バイトが通信制御装置に対するものか否かを判定するアドレス判定手段と、
外部入力されたデータを一時的に蓄積し、制御信号の入力に応じて外部へ出力するデータ蓄積手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめる第1のデータ通過制御手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、前記上位装置から伝送されたデータを当該通信制御装置におけるコマンドとして処理する第1のコマンド処理手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめる第2のデータ通過制御手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、上位装置からのデータを前記データ蓄積手段に蓄積させるバファリング制御手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、上位装置から伝送されたデータの2バイト目以降について、通信制御装置のコマンドであるか否かを判定するコマンド判定手段と、
前記コマンド判定手段により、上位装置から伝送されたデータの何れかのバイトが通信制御装置のコマンドではないと判定された場合、前記データ蓄積手段のデータを前記最下位装置へ伝送すると共に、それ以後、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる第3のデータ通過制御手段と、
前記コマンド判定手段により、上位装置から伝送されたデータの何れのバイトも通信制御装置のコマンドであると判定された場合において、前記上位装置から伝送されたデータのバイト数が所定以上か否かを判定するバイト数判定手段と、
前記バイト数判定手段により、前記上位装置から伝送されたデータのバイト数が所定以上であると判定された場合、前記データ蓄積手段のデータを前記最下位装置へ伝送すると共に、それ以後、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる第4のデータ通過制御手段と
前記バイト数判定手段により、前記上位装置から伝送されたデータのバイト数が所定内であると判定された場合、前記データを当該通信制御装置におけるコマンドとして処理する第2のコマンド処理手段と、
を具備してなることを特徴とする通信制御装置。
A host device having a block transmission protocol and a character transmission protocol, and a lowest device configured to be able to read and write data based on one communication protocol of the block transmission protocol or the character transmission protocol. A communication control device that is provided between and performs communication mediation and control of communication between the host device and the lowest device,
The communication control device
Protocol determining means for determining the communication protocol of the connected lowest-level device;
Address determination means for determining whether or not the first byte included in the data transmitted from the host device is for the communication control device;
Data storage means for temporarily storing externally input data and outputting to the outside in response to the input of a control signal;
When the protocol determining means determines that the communication protocol of the lowest device is a block transmission protocol, and when the address determining means determines that the first byte is not for the communication control device, First data passage control means for allowing data transmitted from a device to pass to the lowest device, while allowing data transmitted from the lowest device to pass to the host device;
When the protocol determination unit determines that the communication protocol of the lowest device is a block transmission protocol, and when the address determination unit determines that the first byte is for the communication control device, First command processing means for processing data transmitted from the device as a command in the communication control device;
When the protocol determining means determines that the communication protocol of the lowest-order device is a character transmission protocol, and when the address determining means determines that the first byte is not for the communication control device, Second data passage control means for allowing data transmitted from a device to pass to the lowest device, while allowing data transmitted from the lowest device to pass to the host device;
When the protocol determining unit determines that the communication protocol of the lowest device is a character transmission protocol, and when the address determining unit determines that the first byte is for the communication control device, Buffering control means for storing data from the data storage means;
When the protocol determining unit determines that the communication protocol of the lowest device is a character transmission protocol, and when the address determining unit determines that the first byte is for the communication control device, Command determination means for determining whether the second and subsequent bytes of the data transmitted from the communication control device are commands,
When it is determined by the command determination means that any byte of the data transmitted from the host device is not a command of the communication control device, the data in the data storage means is transmitted to the lowest device and thereafter A third data passage control means for passing data from the host device to the lowest device and passing data from the lowest device to the host device;
Whether or not the number of bytes of data transmitted from the host device is greater than or equal to a predetermined number when the command determination unit determines that any byte of data transmitted from the host device is a command of the communication control device. A number of bytes judging means for judging;
When the number of bytes transmitted from the host device is determined by the byte number determination means to be greater than or equal to a predetermined number, the data in the data storage means is transmitted to the lowest device, and thereafter the host device And a fourth data passage control means for passing data from the lowest device and passing data from the lowest device to the host device ;
A second command processing means for processing the data as a command in the communication control device when the number of bytes transmitted from the host device is determined by the byte number determination means to be within a predetermined range;
A communication control apparatus comprising:
ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置であって、
当該通信制御装置は、
接続された最下位装置の通信プロトコルを判定するプロトコル判定手段と、
前記上位装置から伝送されたデータに含まれる先頭バイトが通信制御装置に対するものか否かを判定するアドレス判定手段と、
外部入力されたデータを一時的に蓄積し、制御信号の入力に応じて外部へ出力するデータ蓄積手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめる第1のデータ通過制御手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、前記上位装置から伝送されたデータを当該通信制御装置におけるコマンドとして処理する第1のコマンド処理手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめる第2のデータ通過制御手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、上位装置からのデータを前記データ蓄積手段に蓄積させるバファリング制御手段と、
前記プロトコル判定手段により、最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記アドレス判定手段により、前記先頭バイトが通信制御装置に対するものであると判定された場合、上位装置から伝送されたデータの2バイト目以降について、通信制御装置のコマンドであるか否かを判定するコマンド判定手段と、
前記コマンド判定手段により、上位装置から伝送されたデータの何れかのバイトが通信制御装置のコマンドではないと判定された場合、前記データ蓄積手段のデータを前記最下位装置へ伝送すると共に、それ以後、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる第3のデータ通過制御手段と、
前記コマンド判定手段により、上位装置から伝送されたデータの何れのバイトも通信制御装置のコマンドであると判定された場合において、前記上位装置から伝送されたデータのバイト数が所定以上か否かを判定するバイト数判定手段と、
前記バイト数判定手段により、前記上位装置から伝送されたデータのバイト数が所定以上であると判定された場合、前記データ蓄積手段のデータを前記最下位装置へ伝送すると共に、それ以後、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる第4のデータ通過制御手段と
前記バイト数判定手段により、前記上位装置から伝送されたデータのバイト数が所定内であると判定された場合、前記データを当該通信制御装置におけるコマンドとして処理する第2のコマンド処理手段と、
を具備してなることを特徴とする通信制御装置。
Based on the host device having either one of the block transmission protocol or the character transmission protocol, and based on any one communication protocol of the block transmission protocol or the character transmission protocol, the data can be read and written. A communication control device that is provided between the lowest device and mediates and controls communication between the host device and the lowest device;
The communication control device
Protocol determining means for determining the communication protocol of the connected lowest-level device;
Address determination means for determining whether or not the first byte included in the data transmitted from the host device is for the communication control device;
Data storage means for temporarily storing externally input data and outputting to the outside in response to the input of a control signal;
When the protocol determining means determines that the communication protocol of the lowest device is a block transmission protocol, and when the address determining means determines that the first byte is not for the communication control device, First data passage control means for allowing data transmitted from a device to pass to the lowest device, while allowing data transmitted from the lowest device to pass to the host device;
When the protocol determination unit determines that the communication protocol of the lowest device is a block transmission protocol, and when the address determination unit determines that the first byte is for the communication control device, First command processing means for processing data transmitted from the device as a command in the communication control device;
When the protocol determining means determines that the communication protocol of the lowest-order device is a character transmission protocol, and when the address determining means determines that the first byte is not for the communication control device, Second data passage control means for allowing data transmitted from a device to pass to the lowest device, while allowing data transmitted from the lowest device to pass to the host device;
When the protocol determining unit determines that the communication protocol of the lowest device is a character transmission protocol, and when the address determining unit determines that the first byte is for the communication control device, Buffering control means for storing data from the data storage means;
When the protocol determining unit determines that the communication protocol of the lowest device is a character transmission protocol, and when the address determining unit determines that the first byte is for the communication control device, Command determination means for determining whether the second and subsequent bytes of the data transmitted from the communication control device are commands,
When it is determined by the command determination means that any byte of the data transmitted from the host device is not a command of the communication control device, the data in the data storage means is transmitted to the lowest device and thereafter A third data passage control means for passing data from the host device to the lowest device and passing data from the lowest device to the host device;
Whether or not the number of bytes of data transmitted from the host device is greater than or equal to a predetermined number when the command determination unit determines that any byte of data transmitted from the host device is a command of the communication control device. A number of bytes judging means for judging;
When the number of bytes transmitted from the host device is determined by the byte number determination means to be greater than or equal to a predetermined number, the data in the data storage means is transmitted to the lowest device, and thereafter the host device And a fourth data passage control means for passing data from the lowest device and passing data from the lowest device to the host device ;
A second command processing means for processing the data as a command in the communication control device when the number of bytes transmitted from the host device is determined by the byte number determination means to be within a predetermined range;
A communication control apparatus comprising:
通信制御装置は、ICカードリーダライタであり、最下位装置は、ICカードであることを特徴とする請求項4または5記載の通信制御装置。6. The communication control device according to claim 4 , wherein the communication control device is an IC card reader / writer, and the lowest device is an IC card. ブロック伝送プロトコル及びキャラクタ伝送プロトコルを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、コンピュータを用いてなり、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置における前記コンピュータに実行させるデータ伝送処理プログラムを記録した記録媒体であって、
当該データ伝送処理プログラムはコンピュータに、接続された最下位装置の通信プロトコルを判定させ、
前記上位装置から伝送されたデータに含まれる先頭バイトが当該コンピュータに対するものか否かを判定させ、
前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、
前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものであると判定された場合、前記上位装置から伝送されたデータを当該コンピュータにおけるコマンドとして処理させ、
前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、
前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、先頭バイトが当該コンピュータに対するものであると判定された場合、上位装置からのデータを一時的に蓄積させ、上位装置から伝送されたデータの2バイト目以降について、当該コンピュータにおけるコマンドであるか否かを判定させ、当該コンピュータにおけるコマンドではないと判定された時点において、前記一時的に蓄積されたデータの最下位装置への伝送を開始させると共に、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる一方、
前記上位装置から伝送されたデータの2バイト目以降が当該コンピュータにおけるコマンドと判定され、しかも、受信されたデータのバイト数が所定以上であると判定された場合、前記一時的に蓄積されたデータの最下位装置への伝送を行わしめ、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめ、
前記上位装置から伝送されたデータの2バイト目以降が当該コンピュータにおけるコマンドと判定され、しかも、受信されたデータのバイト数が所定内であると判定された場合、当該コンピュータにおけるコマンドとして処理させることを特徴とするデータ伝送プログラムを記録した記録媒体。
A host device having a block transmission protocol and a character transmission protocol, and a lowest device configured to be able to read and write data based on one communication protocol of the block transmission protocol or the character transmission protocol. A recording medium provided with a computer and recording a data transmission processing program to be executed by the computer in a communication control device that mediates and controls communication between the host device and the lowest device;
The data transmission processing program causes the computer to determine the communication protocol of the connected lowest device,
Determining whether the first byte included in the data transmitted from the host device is for the computer;
If it is determined that the communication protocol of the lowest order device is a block transmission protocol, and if it is determined that the first byte is not for the computer, the data transmitted from the higher order device is sent to the lowest order device. While allowing the data transmitted from the lowest device to pass to the host device,
When the communication protocol of the lowest device is determined to be a block transmission protocol, and it is determined that the first byte is for the computer, the data transmitted from the higher device is used as a command in the computer. Let
If it is determined that the communication protocol of the lowest-order device is a character transmission protocol, and if it is determined that the first byte is not for the computer, the data transmitted from the higher-order device is sent to the lowest-order device. While allowing the data transmitted from the lowest device to pass to the host device,
When it is determined that the communication protocol of the lowest device is a character transmission protocol and it is determined that the first byte is for the computer, the data from the upper device is temporarily accumulated, It is determined whether or not the second byte or later of the transmitted data is a command in the computer, and when it is determined that the command is not a command in the computer, to the lowest device of the temporarily accumulated data , And thereafter, the data from the host device is passed to the lowest device and the data from the lowest device is passed to the host device,
If it is determined that the second and subsequent bytes of data transmitted from the host device are commands in the computer, and if it is determined that the number of bytes of received data is greater than or equal to a predetermined value, the temporarily stored data After that, the data from the lower-level device is allowed to pass to the lower-level device and the data from the lower-level device is allowed to pass to the higher-level device.
If it is determined that the second and subsequent bytes of the data transmitted from the host device are commands in the computer, and if it is determined that the number of bytes of the received data is within a predetermined range, the commands are processed as commands in the computer. The recording medium which recorded the data transmission program characterized by these.
ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つを有してなる上位装置と、ブロック伝送プロトコルまたはキャラクタ伝送プロトコルのいずれか一つの通信プロトコルに基づいてデータの読み出し及び書き込みが可能に構成されてなる最下位装置との間に設けられ、コンピュータを用いてなり、前記上位装置と前記最下位装置の通信の仲介、制御を行う通信制御装置における前記コンピュータに実行させるデータ伝送処理プログラムを記録した記録媒体であって、
当該データ伝送処理プログラムはコンピュータに、接続された最下位装置の通信プロトコルを判定させ、
前記上位装置から伝送されたデータに含まれる先頭バイトが当該コンピュータに対するものか否かを判定させ、
前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、
前記最下位装置の通信プロトコルがブロック伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものであると判定された場合、前記上位装置から伝送されたデータを当該コンピュータにおけるコマンドとして処理させ、
前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、前記先頭バイトが当該コンピュータに対するものではないと判定された場合、前記上位装置から伝送されたデータを前記最下位装置へ通過せしめる一方、前記最下位装置から伝送されたデータを前記上位装置へ通過せしめ、
前記最下位装置の通信プロトコルがキャラクタ伝送プロトコルと判定された場合にあって、先頭バイトが当該コンピュータに対するものであると判定された場合、上位装置からのデータを一時的に蓄積させ、上位装置から伝送されたデータの2バイト目以降について、当該コンピュータにおけるコマンドであるか否かを判定させ、当該コンピュータにおけるコマンドではないと判定された時点において、前記一時的に蓄積されたデータの最下位装置への伝送を開始させると共に、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめる一方、
前記上位装置から伝送されたデータの2バイト目以降が当該コンピュータにおけるコマンドと判定され、しかも、受信されたデータのバイト数が所定以上であると判定された場合、前記一時的に蓄積されたデータの最下位装置への伝送を行わしめ、それ以降、上位装置からのデータを最下位装置へ通過せしめると共に最下位装置からのデータを上位装置へ通過せしめ、
前記上位装置から伝送されたデータの2バイト目以降が当該コンピュータにおけるコマンドと判定され、しかも、受信されたデータのバイト数が所定内であると判定された場合、当該コンピュータにおけるコマンドとして処理させることを特徴とするデータ伝送プログラムを記録した記録媒体。
Based on the host device having either one of the block transmission protocol or the character transmission protocol, and based on any one communication protocol of the block transmission protocol or the character transmission protocol, the data can be read and written. A recording medium that is provided between the lowest device and uses a computer to record a data transmission processing program to be executed by the computer in a communication control device that mediates and controls communication between the upper device and the lowest device Because
The data transmission processing program causes the computer to determine the communication protocol of the connected lowest device,
Determining whether the first byte included in the data transmitted from the host device is for the computer;
If it is determined that the communication protocol of the lowest order device is a block transmission protocol, and if it is determined that the first byte is not for the computer, the data transmitted from the higher order device is sent to the lowest order device. While allowing the data transmitted from the lowest device to pass to the host device,
When the communication protocol of the lowest device is determined to be a block transmission protocol, and it is determined that the first byte is for the computer, the data transmitted from the higher device is used as a command in the computer. Let
If it is determined that the communication protocol of the lowest-order device is a character transmission protocol, and if it is determined that the first byte is not for the computer, the data transmitted from the higher-order device is sent to the lowest-order device. While allowing the data transmitted from the lowest device to pass to the host device,
When it is determined that the communication protocol of the lowest device is a character transmission protocol and it is determined that the first byte is for the computer, the data from the upper device is temporarily accumulated, It is determined whether or not the second byte or later of the transmitted data is a command in the computer, and when it is determined that the command is not a command in the computer, to the lowest device of the temporarily accumulated data , And thereafter, the data from the host device is passed to the lowest device and the data from the lowest device is passed to the host device,
If it is determined that the second and subsequent bytes of data transmitted from the host device are commands in the computer, and if it is determined that the number of bytes of received data is greater than or equal to a predetermined value, the temporarily stored data After that, the data from the lower-level device is allowed to pass to the lower-level device and the data from the lower-level device is allowed to pass to the higher-level device.
If it is determined that the second and subsequent bytes of the data transmitted from the host device are commands in the computer, and if it is determined that the number of bytes of the received data is within a predetermined range, the commands are processed as commands in the computer. The recording medium which recorded the data transmission program characterized by these.
JP25610698A 1998-08-27 1998-08-27 Data transmission method, communication control device, and recording medium on which data transmission program is recorded Expired - Fee Related JP3710940B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25610698A JP3710940B2 (en) 1998-08-27 1998-08-27 Data transmission method, communication control device, and recording medium on which data transmission program is recorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25610698A JP3710940B2 (en) 1998-08-27 1998-08-27 Data transmission method, communication control device, and recording medium on which data transmission program is recorded

Publications (2)

Publication Number Publication Date
JP2000078238A JP2000078238A (en) 2000-03-14
JP3710940B2 true JP3710940B2 (en) 2005-10-26

Family

ID=17287982

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25610698A Expired - Fee Related JP3710940B2 (en) 1998-08-27 1998-08-27 Data transmission method, communication control device, and recording medium on which data transmission program is recorded

Country Status (1)

Country Link
JP (1) JP3710940B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100603612B1 (en) * 2004-12-20 2006-07-24 한국전자통신연구원 Radio Identification Reader Interface and Event Management Apparatus and Method for Supporting Heterogeneous Readers based on Multiprotocol
JP4812554B2 (en) * 2006-08-04 2011-11-09 富士通テン株式会社 SEMICONDUCTOR INTEGRATED CIRCUIT, ELECTRONIC CONTROL DEVICE, AND ELECTRONIC CONTROLLED DEVICE CONTROL METHOD
JP5349459B2 (en) * 2007-05-09 2013-11-20 ソニー株式会社 Service card adapter
CN105955204A (en) * 2016-05-13 2016-09-21 镇江同舟螺旋桨有限公司 High-compatibility multifunctional various field bus protocol motion control system

Also Published As

Publication number Publication date
JP2000078238A (en) 2000-03-14

Similar Documents

Publication Publication Date Title
JP3028815B2 (en) Transmission method of portable electronic device and portable electronic device
US6886083B2 (en) Apparatus and method for controlling a card device
JPH1153485A (en) Computer system, storage device, conversion system, and recording medium
US6128670A (en) Image input device employing a personal computercard/interface or generic interface
JP3480746B2 (en) Portable electronic devices
US6907480B2 (en) Data processing apparatus and data input/output apparatus and data input/output method
US8456684B2 (en) Image processing apparatus and method
JP3710940B2 (en) Data transmission method, communication control device, and recording medium on which data transmission program is recorded
EP1016973A1 (en) Communication dma device
EP1376453B1 (en) Method for issuing portable electronic mediums
US7212363B2 (en) Magnetic disk apparatus
JPH11175667A (en) Information card processor
JPH08129629A (en) Information recording medium with memory check function
JPH01140276A (en) Portable recording medium processor
JP2636226B2 (en) Recording medium reader
JP2002135270A (en) Asynchronous data transfer method
EP1081584B1 (en) Information processing apparatus and storage medium control method
JPH03194644A (en) Portable electronic device
KR20040059013A (en) FIFO buffer using dual address pointer and data input/output method in the FIFO buffer
JPH06162283A (en) IC card data transfer device
JP2002292943A (en) Printer and data transfer method in printer
US20040128298A1 (en) Information processing apparatus
JPH11321028A (en) Image printer apparatus
JPH11272445A (en) Interface circuit
JPH09116563A (en) Mpeg2 data transfer device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20040517

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20040517

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20040517

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041124

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050420

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050520

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050622

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050727

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050811

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080819

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090819

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090819

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100819

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110819

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees