[go: up one dir, main page]

JP2008033906A - Communication system and peripheral device used therefor - Google Patents

Communication system and peripheral device used therefor Download PDF

Info

Publication number
JP2008033906A
JP2008033906A JP2007163464A JP2007163464A JP2008033906A JP 2008033906 A JP2008033906 A JP 2008033906A JP 2007163464 A JP2007163464 A JP 2007163464A JP 2007163464 A JP2007163464 A JP 2007163464A JP 2008033906 A JP2008033906 A JP 2008033906A
Authority
JP
Japan
Prior art keywords
information
data
peripheral device
host device
command
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.)
Pending
Application number
JP2007163464A
Other languages
Japanese (ja)
Inventor
Fumitoshi Uno
文敏 宇野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2007163464A priority Critical patent/JP2008033906A/en
Publication of JP2008033906A publication Critical patent/JP2008033906A/en
Pending legal-status Critical Current

Links

Images

Abstract

【課題】 通信イベントの実行を司るコマンドの発行方向が、上記のごとく、PC側から周辺装置側への一方向に規制されているにも拘わらず、周辺装置に装着されたカード型記憶メディアを認証するための通信機構を簡単に実現できる通信システムを提供する。
【解決手段】 本発明特有の付加情報通信機構により、ホスト装置側で取得されるセキュリティー参照情報を、調査指示データ上の付加情報として周辺装置に送信することが可能となる。そして、周辺装置には、カード型記憶メディアに書き込まれたセキュリティーマスター情報と、ホスト装置から受信するセキュリティー参照情報とを用いて、カード型記憶メディアへのホスト装置側からのアクセス権を認証する認証手段とを設けておくことで、PC側から周辺装置側への一方向に規制されているにも拘わらず、周辺装置に装着されたカード型記憶メディアをセキュリティー認証するための通信機構を簡単に実現できる。
【選択図】 図12
PROBLEM TO BE SOLVED: To provide a card-type storage medium attached to a peripheral device even though the issuing direction of a command for executing a communication event is restricted in one direction from the PC side to the peripheral device side as described above. A communication system capable of easily realizing a communication mechanism for authentication is provided.
The additional information communication mechanism unique to the present invention makes it possible to transmit security reference information acquired on the host device side to the peripheral device as additional information on the survey instruction data. The peripheral device uses the security master information written in the card type storage medium and the security reference information received from the host device to authenticate the access right from the host device side to the card type storage medium. The communication mechanism for security authentication of the card-type storage media attached to the peripheral device can be simplified despite being restricted in one direction from the PC side to the peripheral device side. realizable.
[Selection] FIG.

Description

本発明は、パーソナルコンピュータ(以下「PC」と略称する)やワークステーション等をホスト装置としてこれに周辺装置が接続された通信システムと、それに使用する周辺装置とに関する。   The present invention relates to a communication system in which a peripheral device is connected to a personal computer (hereinafter abbreviated as “PC”), a workstation, or the like as a host device, and a peripheral device used therefor.

特開2005−18645号公報JP 2005-18645 A 特開2005−107875号公報JP 2005-107875 A

近年、フラッシュメモリなどの不揮発性メモリがカード型にパッケージングされたいわゆるメモリーカード(カード型記憶メディア:記録メディアの一例)が広く知られている。このメモリーカードは、デジタルカメラや携帯音楽プレーヤーなどのデジタル機器に用いられるデータの記憶メディアとして急速に普及している。メモリーカードの仕様は統一されておらず、例えば、コンパクトフラッシュ(登録商標、以下「CF」と略称する)、スマートメディア(登録商標、以下「SM」と略称する)、メモリースティック(登録商標、以下「MS」と略称する)、SDメモリーカード(登録商標、以下「SD」と略称する)など、種々のものが市場に出回っている。   In recent years, a so-called memory card (card type storage medium: an example of a recording medium) in which a nonvolatile memory such as a flash memory is packaged in a card type is widely known. This memory card is rapidly spreading as a data storage medium used in digital devices such as digital cameras and portable music players. The specifications of the memory card are not unified. For example, compact flash (registered trademark, hereinafter abbreviated as “CF”), smart media (registered trademark, hereinafter abbreviated as “SM”), memory stick (registered trademark, hereinafter referred to as “SM”). Various products such as “MS” and SD memory card (registered trademark, hereinafter abbreviated as “SD”) are on the market.

上記メモリーカードは、PCなどに接続されてメモリーカードの読み書きを行なうメモリーカードリーダライタ(周辺装置の一例、以下「リーダライタ」と略称する)を用いることで、PCから上記メモリーカードへのアクセスが可能となる。これにより、PCとメモリーカードとの間でデータ通信が行なえるようになる。こうしたリーダライタには、メモリーカードを挿入するスロットを一つ備えたシングルスロットタイプと、複数のスロットを備えて複数のメモリーカードに対するデータの読み書きが可能なマルチスロットタイプなどがある(特許文献1〜2)。   By using a memory card reader / writer (an example of a peripheral device, hereinafter abbreviated as “reader / writer”) connected to a PC or the like, the memory card can be accessed from the PC. It becomes possible. As a result, data communication can be performed between the PC and the memory card. Such reader / writers include a single slot type having one slot for inserting a memory card, and a multi-slot type having a plurality of slots and capable of reading / writing data from / to a plurality of memory cards (Patent Documents 1 to 3). 2).

ところで、上記のようなリーダライタは、マルチメディアの普及によりデータ転送容量が飛躍的に増大した背景から、PCとの間のデータ伝送をシリアル通信にて行なうことも一般化してきている。しかしながら、データアクセスのための制御には、複数カード型記憶メディアの取り扱いが容易、といった観点から、パラレル通信用周辺機器の調停/アクセス制御にて使用されていた方式を引き継いだ機器も数多く存在する。その典型例として、PCとリーダライタとのデータ通信を、いわゆるSCSI規格で定義されたプロトコル(以下、SCSIプロトコルともいう)に基づいて行われるように設計されたシステムを例示できる。SCSI規格は、ANSI(American National Standard Institute;米規格協会)によって規格化され、国際的に広く準拠されている通信プロトコルである。該プロトコルは、PC及びリーダライタの汎用性を高めることができるため広く用いられている。なお、以下の説明において、SCSI規格とは主としてSCSI−2を示すものとする。   By the way, the reader / writer as described above has also been generalized to perform data transmission with a PC by serial communication due to the background of the dramatic increase in data transfer capacity due to the spread of multimedia. However, in the control for data access, there are many devices that have inherited the method used in the arbitration / access control of peripheral devices for parallel communication from the viewpoint of easy handling of multiple card storage media. . As a typical example, a system designed to perform data communication between a PC and a reader / writer based on a protocol defined by a so-called SCSI standard (hereinafter also referred to as a SCSI protocol) can be exemplified. The SCSI standard is a communication protocol standardized by ANSI (American National Standard Institute) and widely internationally compliant. This protocol is widely used because it can enhance the versatility of PCs and reader / writers. In the following description, the SCSI standard mainly indicates SCSI-2.

SCSIプロトコルにおいては、ホスト装置となるPCは、通信イベントの起動決定権が与えられたイニシエータとして機能し、周辺装置は該ホスト装置の通信対象であるターゲットとして定められる。通信イベントを実行命令するためのコマンドはPCから周辺装置に向けて順次発行される一方、発行されたコマンドを受領した周辺装置が当該コマンドに対応する処理(例えば、データの読出しや書き込み、消去、及び種々の付随的な処理)を逐次実行し、その実行結果に応じた応答情報をホスト装置側に返信する。そして、通信イベントの実行を司るコマンドの発行方向は、ホスト装置側から周辺装置側への一方向に規制されている。   In the SCSI protocol, a PC serving as a host device functions as an initiator to which a communication event activation decision right is given, and a peripheral device is defined as a target that is a communication target of the host device. A command for instructing execution of a communication event is sequentially issued from the PC to the peripheral device, while the peripheral device that has received the issued command performs processing corresponding to the command (for example, data read, write, erase, And various incidental processes) are sequentially executed, and response information corresponding to the execution result is returned to the host device side. The issue direction of the command that controls the execution of the communication event is restricted to one direction from the host device side to the peripheral device side.

上記のごとく、SCSI通信はPCと周辺装置との間での双方向通信ではあるが、通信イベントの実行を司るコマンドの発行方向が、上記のごとく、PC側から周辺装置側への一方向に規制されており、通信処理開始の主導権は常にイニシエータとなるPC側が握る形となる。つまり、SCSIプロトコルに従う限り、周辺装置側でホスト装置側に通信イベント始動のためのコマンドを逆発行することは不可能であり、周辺装置に装着されたメモリーカードを、パスワード等を用いてアクセス認証するための通信処理も非常に困難であった。   As described above, the SCSI communication is bidirectional communication between the PC and the peripheral device. However, as described above, the command issuing direction for executing the communication event is one direction from the PC side to the peripheral device side. It is regulated, and the initiative to start communication processing is always held by the PC as the initiator. In other words, as long as the SCSI protocol is followed, it is impossible for the peripheral device side to issue a command for starting a communication event to the host device side, and the memory card attached to the peripheral device is authenticated using a password or the like. Communication processing for doing so was also very difficult.

本発明の課題は、通信イベントの実行を司るコマンドの発行方向が、上記のごとく、PC側から周辺装置側への一方向に規制されているにも拘わらず、周辺装置に装着されたカード型記憶メディアを認証するための通信機構を簡単に実現できる通信システムと、それに使用する周辺装置とを提供することにある。   An object of the present invention is to provide a card type that is mounted on a peripheral device, even though the direction of issuing a command for executing a communication event is restricted in one direction from the PC side to the peripheral device side as described above. An object of the present invention is to provide a communication system that can easily realize a communication mechanism for authenticating a storage medium, and a peripheral device used for the communication system.

上記課題を解決するための本発明の通信システムは、通信イベントの起動決定権を有したホスト装置と、該ホスト装置に接続される該ホスト装置の通信対象となる周辺装置とを含み、通信イベントを実行命令するためのコマンドをホスト装置から周辺装置に向けて順次発行する一方、発行されたコマンドを受領した周辺装置が当該コマンドに対応するデータ処理を逐次実行し、その実行結果に応じた応答情報をホスト装置側に返信するようになっており、かつ、コマンドの発行方向がホスト装置側から周辺装置側への一方向に規制された主通信プロトコルを有する通信システムにおいて、ホスト装置側に設けられ、周辺装置に対し該周辺装置自身に対する調査報告処理を要求する調査要求コマンドを発行するとともに、該調査要求コマンドの発行に伴い、調査報告指示内容を示す予め定められたフレームフォーマットを有するとともに当該フレームの予め定められたフィールドに付加情報が書き込まれた調査指示データを作成する調査指示データ作成手段と、作成された調査指示データを周辺装置に送信する調査指示データ送信手段と、周辺装置に設けられ、調査指示データを受けて、予め定められたフレームフォーマットを有する調査報告データを生成する調査報告データ生成手段と、周辺装置に設けられ、調査報告データを応答情報としてホスト装置に送信する調査報告データ送信手段と、周辺装置側に設けられ、受信した該調査指示データの予め定められたフィールドから付加情報を抽出する付加情報抽出手段とを有する付加情報通信機構が構築され、周辺装置が、データの読出し及び書き込みに係るデータアクセスが可能とされた不揮発性メモリからなるカード型記憶メディアがスロットに着脱可能に装着され、通信イベントにより該カード型記憶メディアに対してデータアクセスを行なう記憶装置として構成されるとともに、付加情報通信機構により実現される機能手段として、ホスト装置側で取得されるセキュリティ参照情報を、調査指示データ上の付加情報として周辺装置に送信するセキュリティ参照情報送信手段が設けられ、周辺装置には、カード型記憶メディアに書き込まれたセキュリティーマスター情報と、ホスト装置から受信するセキュリティ参照情報とを用いて、カード型記憶メディアへのホスト装置側からのアクセス権を認証する認証手段が設けられていることを特徴とする。   A communication system according to the present invention for solving the above-mentioned problem includes a host device having a communication event activation decision right and a peripheral device to be communicated with by the host device connected to the host device, Are sequentially issued from the host device to the peripheral device, while the peripheral device receiving the issued command sequentially executes the data processing corresponding to the command, and responds according to the execution result. Provided on the host device side in a communication system having a main communication protocol in which information is sent back to the host device side and the command issuance direction is restricted in one direction from the host device side to the peripheral device side And issues a survey request command requesting the peripheral device to perform a survey report process on the peripheral device itself. A survey instruction data creating means for creating survey instruction data having a predetermined frame format indicating the contents of the survey report instruction and having additional information written in a predetermined field of the frame is generated along with the line. Survey instruction data transmitting means for transmitting survey instruction data to the peripheral device, survey report data generating means provided in the peripheral device, receiving survey instruction data, and generating survey report data having a predetermined frame format, Survey report data transmitting means provided in the peripheral device for transmitting the survey report data as response information to the host device, and additional information is extracted from a predetermined field of the received survey instruction data provided on the peripheral device side. An additional information communication mechanism having additional information extracting means is constructed, and the peripheral device A card-type storage medium composed of a non-volatile memory that can be accessed for writing and writing is detachably mounted in the slot, and is configured as a storage device that performs data access to the card-type storage medium by a communication event. In addition, as a functional means realized by the additional information communication mechanism, security reference information transmitting means for transmitting the security reference information acquired on the host device side to the peripheral device as additional information on the survey instruction data is provided. The device is provided with authentication means for authenticating the access right from the host device side to the card type storage medium using the security master information written in the card type storage medium and the security reference information received from the host device. It is characterized by being.

また、本発明の周辺装置は、上記本発明の通信システムを構成する周辺装置であって、データの読出し及び書き込みに係るデータアクセスが可能とされた不揮発性メモリからなるカード型記憶メディアがスロットに着脱可能に装着され、通信イベントにより該カード型記憶メディアに対してデータアクセスを行なう記憶装置として構成され、調査指示データを受けて、予め定められたフレームフォーマットを有する調査報告データを生成する調査報告データ生成手段と、調査報告データを応答情報としてホスト装置に送信する調査報告データ送信手段と、受信した調査指示データの予め定められたフィールドから付加情報を抽出する付加情報抽出手段と、カード型記憶メディアに書き込まれたセキュリティーマスター情報と、ホスト装置から受信するセキュリティ参照情報とを用いて、カード型記憶メディアへのホスト装置側からのアクセス権を認証する認証手段と、を有してなることを特徴とする。   Further, the peripheral device of the present invention is a peripheral device constituting the communication system of the present invention, and a card-type storage medium comprising a non-volatile memory capable of data access related to reading and writing of data is provided in the slot. A survey report that is detachably mounted and configured as a storage device that performs data access to the card-type storage medium by a communication event, receives survey instruction data, and generates survey report data having a predetermined frame format Data generation means, investigation report data transmission means for transmitting investigation report data as response information to the host device, additional information extraction means for extracting additional information from a predetermined field of the received investigation instruction data, and card-type storage Security master information written on the media and the host device By using the security reference information signal, and characterized by having an authentication unit, the authenticating access rights from the host device to the card-type storage medium.

本発明において主通信プロトコルは、周辺装置をなす記憶装置との間のデータファイルの送受信を行なうのが主目的であり、主通信プロトコルがサポートしていない制御処理(特に、周辺装置側で通信イベントを開始するような処理)に関与する情報は、主通信プロトコルがサポートする制御情報からは独立した付加情報として取り扱う必要がある。このような付加情報は、送受信の対象となるデータファイルの本体に書き込んでも意味がない。なぜなら、制御実行等のために付加情報の内容をホスト装置側あるいは周辺装置側で参照しようとした場合、そのデータファイルを開くためのアプリケーションソフトを立ち上げる必要が生じ、全く現実性がないためである。しかし、上記の構成によれば、本発明特有の上記付加情報通信機構により、ホスト装置側から周辺装置側へ送りたい付加情報を、周辺装置に対し該周辺装置自身に対する調査報告処理を要求する調査要求イベントを利用する形で、その調査要求コマンドの発行に伴い作成される調査指示データの予め定められたフィールドに書き込むことで、主通信プロトコルによる制御下でデータファイルを経由せずに確実に送信することができる。   In the present invention, the main communication protocol is mainly for transmitting / receiving data files to / from a storage device constituting a peripheral device, and control processing not supported by the main communication protocol (in particular, a communication event on the peripheral device side). It is necessary to handle the information related to the processing that starts the process as additional information independent of the control information supported by the main communication protocol. It is meaningless to write such additional information in the main body of the data file to be transmitted / received. This is because, when trying to refer to the contents of additional information on the host device side or peripheral device side for control execution etc., it is necessary to launch application software for opening the data file, which is not realistic at all. is there. However, according to the above configuration, the additional information communication mechanism peculiar to the present invention requires that the additional information desired to be transmitted from the host device side to the peripheral device side is requested to the peripheral device for investigation report processing for the peripheral device itself. By using the request event and writing in the predetermined field of the survey instruction data created when the survey request command is issued, the data is transmitted without going through the data file under the control of the main communication protocol. can do.

そして、本発明では、付加情報通信機構により、ホスト装置側で取得されるセキュリティ参照情報を、調査指示データ上の付加情報として周辺装置に送信することが可能となる。そして、周辺装置には、カード型記憶メディアに書き込まれたセキュリティーマスター情報と、ホスト装置から受信するセキュリティ参照情報とを用いて、カード型記憶メディアへのホスト装置側からのアクセス権を認証する認証手段とを設けておくことで、PC側から周辺装置側への一方向に規制されているにも拘わらず、周辺装置に装着されたカード型記憶メディアをセキュリティ認証するための通信機構を簡単に実現できる。   In the present invention, the security reference information acquired on the host device side can be transmitted to the peripheral device as additional information on the survey instruction data by the additional information communication mechanism. Then, the peripheral device uses the security master information written in the card type storage medium and the security reference information received from the host device to authenticate the access right from the host device side to the card type storage medium. The communication mechanism for security authentication of the card-type storage media attached to the peripheral device can be simplified despite being restricted in one direction from the PC side to the peripheral device side. realizable.

主通信プロトコルとしては、本発明においてはSCSIプロトコル(SCSI−1、SCSI−2及びSCSI−3のいずれか:特に、現在も多くのOSカーネルで使われつづけているSCSI−2)を採用することができるが、これに限定されるものではない。   As the main communication protocol, in the present invention, the SCSI protocol (either SCSI-1, SCSI-2, or SCSI-3: in particular, SCSI-2 that is still used in many OS kernels) is adopted. However, it is not limited to this.

なお、本発明では、周辺装置との間でピア・ツー・ピア通信が可能な別プロトコルに準拠した通信インターフェース(例えば、IEEE1394ないし1394b)をホスト装置側に組み込み、その通信インターフェースの端子に周辺装置を接続する構成も可能である。このハードウェア構成では、周辺装置側から上記通信インターフェース(すなわち、ホスト装置)に通信処理用のコマンドを発行することができるので、トリガ報告要求コマンド発行手段(ホスト装置側)やトリガ発生報告情報返信手段(周辺装置側)などの主通信プロトコルに従う機能を省略した、本発明に属さない参考技術態様へのシフトが一応可能ではある。ただし、この参考技術態様は、ホスト装置側のシステムに上記ピア・ツー・ピア通信を可能とするための別プロトコルを取り扱うモジュールも組み入れねばならず、通信インターフェースの高コスト化も免れ得ない欠点があるので現実的ではない。   In the present invention, a communication interface (for example, IEEE 1394 to 1394b) compliant with another protocol capable of peer-to-peer communication with a peripheral device is incorporated on the host device side, and the peripheral device is connected to the terminal of the communication interface. It is also possible to connect the two. In this hardware configuration, a command for communication processing can be issued from the peripheral device side to the communication interface (that is, the host device). It is possible to shift to a reference technical mode that does not belong to the present invention, omitting the function according to the main communication protocol such as means (peripheral device side). However, this reference technical aspect has a drawback that a module for handling another protocol for enabling the peer-to-peer communication must be incorporated in the system on the host device side, and the cost of the communication interface cannot be avoided. Because it is, it is not realistic.

他方、本発明においては、周辺装置とホスト装置とを、ホスト装置側からの周辺装置のポーリングは可能であって、該周辺装置側からのホスト装置の逆ポーリングが不能なシリアル通信機構を介して接続し、通信イベントを実行するためのホスト装置と周辺装置との間における情報転送を、ホスト装置が周辺装置をポーリングする形式にてシリアル通信により実行されるものとして構成できる。この構成では、周辺装置側からホスト装置をポーリングすることができない(つまり、周辺装置側に通信開始の決定権が与えられない)形になるので、本発明の効果がより有効に発揮されるばかりでなく、周辺装置を直接接続するためのホスト装置側の通信インターフェースが大幅に簡略化され、システム構成の軽量・低コスト化を図ることができる。このようなシリアル通信の規格として、USB(Universal Serial Bus)を例示できる。また、本明細書では、主通信プロトコルとしてSCSIプロトコルが採用され、かつ、ホスト装置とUSBプロトコルに従うシリアル通信バスにより接続される周辺機器のことを、USB/SCSI型周辺機器とも称する。   On the other hand, in the present invention, the peripheral device and the host device can be polled by the peripheral device from the host device side through a serial communication mechanism in which the reverse polling of the host device from the peripheral device side is impossible. Information transfer between the host device and the peripheral device for connecting and executing a communication event can be configured to be executed by serial communication in a form in which the host device polls the peripheral device. In this configuration, the host device cannot be polled from the peripheral device side (that is, the peripheral device side is not given the right to start communication), so that the effect of the present invention is more effectively exhibited. In addition, the communication interface on the host device side for directly connecting the peripheral devices is greatly simplified, and the system configuration can be reduced in weight and cost. An example of such a serial communication standard is USB (Universal Serial Bus). Further, in this specification, a peripheral device that adopts the SCSI protocol as a main communication protocol and is connected to the host device by a serial communication bus according to the USB protocol is also referred to as a USB / SCSI type peripheral device.

USBを採用する場合、周辺装置は、より具体的には以下のように構成できる。すなわち、コマンドをホスト装置から受信してコマンド内容を解析するコマンド解析ステップと、該コマンドの解析内容を反映したデータ処理を実行するデータ処理ステップと、データ処理の結果を示す応答情報をホスト装置に返信する応答情報返信ステップとをこの順序で実行する形で周辺機器側の通信処理制御を行なうアクセス制御デバイスと、上記コマンド及び応答情報の相互転送を、前記ホスト装置が複数の前記アクセス制御デバイスをポーリングする形式にてシリアル通信により実行するシリアル通信部とを有するものとして構成する。アクセス制御デバイスは、シリアル通信部との間でコマンド及び応答情報を送受信する送受信部と、コマンドを解釈してその内容に応じたデータ処理を制御実行主体とからなるものとして構成される。なお、送受信部とシリアル通信部とは専用ICに集積することができる。この構成では、USBプロトコルに従うシリアル通信にバスを介して、SCSI等の主通信プロトコルに従うコマンドないし応答情報のやり取りを問題なく行なうことができる。   When USB is adopted, the peripheral device can be configured more specifically as follows. That is, a command analysis step for receiving a command from the host device and analyzing the command content, a data processing step for executing data processing reflecting the analysis content of the command, and response information indicating the result of the data processing are sent to the host device. A response information return step for replying is executed in this order, and an access control device for controlling communication processing on the peripheral device side, and mutual transfer of the command and response information is performed by the host device with a plurality of access control devices. And a serial communication unit that executes serial communication in a polling format. The access control device includes a transmission / reception unit that transmits / receives command and response information to / from the serial communication unit, and a control execution entity that interprets the command and performs data processing according to the content. The transmission / reception unit and the serial communication unit can be integrated in a dedicated IC. In this configuration, commands or response information according to a main communication protocol such as SCSI can be exchanged without problems via a bus for serial communication according to the USB protocol.

より具体的には、周辺装置側のシリアル通信部が、ホスト装置からのシリアル通信バスを接続する通信バス接続端子と、シリアル通信バスと送受信部との間でコマンド及び応答情報の転送通信処理を実行する通信制御部とを備え、該通信制御部が、通信バス接続端子に接続される通信処理のプロトコルエンジン部と、該プロトコルエンジン部にFIFOメモリからなる制御用の双方向エンドポイントを介して接続され、転送通信処理の制御を司る制御指令部とを備えたものとして構成できる。そして、送受信部は上記プロトコルエンジン部に対し、FIFOメモリからなる該プロトコルエンジン部への入力用エンドポイントと、FIFOメモリからなる該プロトコルエンジン部からの出力用エンドポイントとを介して入出力経路が分離された形で接続することができる。また、通信制御部は、ホスト装置側から、データアクセスの対象となる送受信部の特定情報と、該送受信部に対応するエンドポイントの特定情報とを受信して、各送受信部をターゲットデバイスとしてポーリングするものとなるように構成することができる。送受信のデータバッファとなるエンドポイントを送信側と受信側とで独立して設け、ポーリング時にいずれのエンドポイントを指定するかによって、データの転送方向も容易に特定することができる。   More specifically, the serial communication unit on the peripheral device side performs communication processing for transferring command and response information between the communication bus connection terminal for connecting the serial communication bus from the host device and the serial communication bus and the transmission / reception unit. A communication control unit that executes communication protocol unit connected to a communication bus connection terminal, and the protocol engine unit via a bidirectional endpoint for control comprising a FIFO memory. A control command unit that is connected and controls the transfer communication process can be provided. The transmission / reception unit has an input / output path to the protocol engine unit via an input endpoint to the protocol engine unit composed of a FIFO memory and an output endpoint from the protocol engine unit composed of a FIFO memory. Can be connected separately. In addition, the communication control unit receives from the host device side the identification information of the transmission / reception unit to be accessed and the identification information of the endpoint corresponding to the transmission / reception unit, and polls each transmission / reception unit as a target device. It can be configured to be. Endpoints serving as transmission / reception data buffers are provided independently on the transmission side and the reception side, and the data transfer direction can be easily specified depending on which endpoint is designated at the time of polling.

次に、本発明においては、付加情報通信機構により実現される機能手段として、認証手段による認証結果を反映した認証結果反映情報を周辺装置に要求する認証結果要求情報を調査指示データ上の付加情報として周辺装置に送信するとともに、調査報告データの予め定められたフレームにホスト装置側からの付加情報に対応する対応付加情報として認証結果反映情報が書き込まれた調査報告データを、応答情報として周辺装置からホスト装置に返信する認証通信手段を設けることができる。この場合、ホスト装置には、返信された認証結果反映情報を出力する認証結果反映情報出力手段を設けることができる。本発明特有の付加情報通信機構により、周辺装置からホスト装置にカード型記憶メディアの認証結果を問題なく返すことができ、ホスト装置では、その認証結果反映情報を出力することで、認証がうまくなされたかどうかをユーザーは適格に把握できる。   Next, in the present invention, as the functional means realized by the additional information communication mechanism, the authentication result request information for requesting the authentication result reflection information reflecting the authentication result by the authentication means to the peripheral device is added to the additional information on the investigation instruction data. As the response information, the survey report data in which the authentication result reflection information is written as the corresponding additional information corresponding to the additional information from the host device side in the predetermined frame of the survey report data. It is possible to provide an authentication communication means for sending a reply to the host device. In this case, the host device can be provided with authentication result reflection information output means for outputting the returned authentication result reflection information. By the additional information communication mechanism unique to the present invention, the authentication result of the card-type storage medium can be returned from the peripheral device to the host device without any problem. The user can qualify whether or not

カード型記憶メディアの記憶エリアは、認証手段によりアクセス権の認証が棄却された場合でもホスト装置側からのアクセスが可能なノーマルエリアと、認証手段によりアクセス権の認証が受理された場合にのみホスト装置側からのアクセスが可能なセキュリティエリアとに分けておくことができる。この場合、周辺装置には、カード型記憶メディアへのアクセスモードを、ノーマルエリアにのみアクセスが可能なノーマルモードと、セキュリティエリアにアクセスが可能なセキュリティモードとのいずれかに設定するアクセスモード設定手段と、認証手段による認証結果が受理認証であった場合にのみ、アクセスモード設定手段に対しアクセスモードをセキュリティモードに設定させるアクセスモード設定制御手段とを設けることができる。これにより、カード型記憶メディアのデータ記憶エリアのうち、セキュリティエリアとして指定されたエリアを確実に保護することが可能となる。   The storage area of the card-type storage medium is a normal area that can be accessed from the host device even if access right authentication is rejected by the authentication means, and only when the access right authentication is accepted by the authentication means. It can be divided into security areas that can be accessed from the device side. In this case, in the peripheral device, an access mode setting means for setting the access mode to the card-type storage medium to one of a normal mode in which only the normal area can be accessed and a security mode in which the security area can be accessed. And an access mode setting control means for causing the access mode setting means to set the access mode to the security mode only when the authentication result by the authentication means is acceptance authentication. Thereby, it is possible to reliably protect the area designated as the security area among the data storage areas of the card type storage medium.

また、本発明においては、付加情報通信機構により実現される機能手段として、周辺装置に設定されているアクセスモードの種別を該周辺装置に報告させるためのアクセスモード報告指示情報を、調査指示データ上の付加情報として周辺装置に送信するとともに、調査報告データの予め定められたフレームにホスト装置側からの付加情報に対応する対応付加情報としてアクセスモード設定手段が設定中のアクセスモードを報告するアクセスモード報告情報が書き込まれた調査報告データを、応答情報として周辺装置側からホスト装置に返信するアクセスモード報告通信手段を設けることができる。この場合、ホスト装置には、アクセスモード報告通信手段により取得されたアクセスモードの種別を表示するアクセスモード種別表示手段を設けることができる。この構成により、周辺装置に設定されているアクセスモードが何であるかを、ホスト装置側の表示によりユーザーが容易に把握できる。   In the present invention, as a functional means realized by the additional information communication mechanism, the access mode report instruction information for causing the peripheral device to report the type of access mode set in the peripheral device is included in the investigation instruction data. Access mode in which the access mode setting means reports the access mode being set as additional information corresponding to the additional information from the host device side in a predetermined frame of the investigation report data. Access mode report communication means can be provided for returning the investigation report data in which the report information is written as response information from the peripheral device side to the host device. In this case, the host device can be provided with an access mode type display means for displaying the type of the access mode acquired by the access mode report communication means. With this configuration, the user can easily grasp what access mode is set in the peripheral device by displaying on the host device side.

また、ホスト装置には、アクセスモードとしてノーマルモードとセキュリティモードとのいずれかを選択するためのアクセスモード選択手段を設けることができる。この場合、付加情報通信機構により実現される機能手段として、ホスト装置側でノーマルモードが選択された場合に、該ノーマルモードへの移行を周辺装置に指示するノーマルモード移行指示情報を、調査指示データ上の付加情報として周辺装置に送信するノーマルモード移行指示情報送信手段と、該ノーマルモード移行指示情報を受けた周辺装置が、アクセスモード設定手段がアクセスモードをノーマルモードに設定するに伴い、調査報告データの予め定められたフレームにホスト装置側からの付加情報に対応する対応付加情報として、ノーマルモードへの設定完了を報告するノーマルモード設定完了報告情報を調査報告データとしてホスト装置に返信するノーマルモード設定完了報告情報返信手段とを設けることができる。これにより、ホスト装置側でノーマルモードが選択された場合、これを周辺装置に問題なく転送でき、周辺装置側ではノーマルモードの設定を速やかに行なうことができる。他方、ホスト装置は、セキュリティ参照情報の入力手段を有し、前述のセキュリティ参照情報送信手段は、入力されたセキュリティ参照情報を、調査指示データ上の付加情報として周辺装置に送信するものとして構成できる。これにより、ホスト装置側でセキュリティモードが選択された場合、ユーザーが入力したセキュリティ参照情報を周辺装置に問題なく転送でき、周辺装置側では該セキュリティー参照情報による認証処理と、認証受理であった場合のセキュリティモードの設定を速やかに行なうことができる。   The host device can be provided with an access mode selection means for selecting either the normal mode or the security mode as the access mode. In this case, as the functional means realized by the additional information communication mechanism, when the normal mode is selected on the host device side, normal mode shift instruction information for instructing the peripheral device to shift to the normal mode is obtained as the survey instruction data. The normal mode transition instruction information transmitting means for transmitting to the peripheral device as additional information above, and the peripheral device receiving the normal mode transition instruction information, the access mode setting means sets the access mode to the normal mode, and the investigation report Normal mode in which normal mode setting completion report information for reporting completion of setting to normal mode is returned to the host device as investigation report data as corresponding additional information corresponding to additional information from the host device side in a predetermined frame of data Setting completion report information return means can be provided. Thus, when the normal mode is selected on the host device side, it can be transferred to the peripheral device without any problem, and the normal mode can be quickly set on the peripheral device side. On the other hand, the host device has security reference information input means, and the above-described security reference information transmission means can be configured to transmit the input security reference information to the peripheral device as additional information on the survey instruction data. . As a result, when the security mode is selected on the host device side, the security reference information input by the user can be transferred to the peripheral device without any problem. The security mode can be quickly set.

セキュリティ参照情報は暗号化キーとして使用されるパスワードとすることができる。具体的には、カード型記憶メディア内には、予め定められた照合用元データを、マスター暗号化キーで暗号化した状態で照合データとして格納する照合データ格納領域を設けることができ、周辺装置には、照合用元データをセキュリティーマスター情報として記憶するセキュリティーマスター情報記憶手段を設けることができる。認証手段は、ホスト装置側から受信した暗号化キーで照合データを復号化した情報を照合対象情報として、該照合対象情報がセキュリティーマスター情報と照合一致した場合に受理認証とし、照合不一致の場合に棄却認証とするものとできる。パスワードと暗号化とを組み合わせた照合処理により、データ保護をより確実に図ることができる。また、上記の方式では、周辺装置側に個々のユーザーのパスワード登録部を設ける必要がなく、また、記憶メディアにはパスワードが直接書き込まれない(直接書き込まれるのは、パスワードをキーとして照合用元データを暗号化した情報である)のでより安全性が高い。   The security reference information can be a password used as an encryption key. Specifically, in the card-type storage medium, a collation data storage area can be provided in which predetermined collation source data is stored as collation data in a state encrypted with a master encryption key. Can be provided with security master information storage means for storing the original data for verification as security master information. The authentication means uses the information obtained by decrypting the verification data with the encryption key received from the host device side as the verification target information. It can be regarded as a rejection certificate. Data protection can be more reliably achieved by a collation process combining a password and encryption. In the above method, it is not necessary to provide a password registration unit for each user on the peripheral device side, and the password is not directly written to the storage medium. Since it is encrypted information, it is more secure.

調査指示データ作成手段は調査指示データにおいて、格納するべき主格納情報として付加情報以外の情報が格納されるよう主通信プロトコルに規定されたフィールドに、付加情報を主格納情報に兼用させる形で書き込むものとすることができる。主通信プロトコルがSCSIプロトコルのごとく既製の通信規格に従う場合などにおいては、本発明において初めて発生する技術概念である付加情報用の専用フィールドを、調査指示データのフレーム内に新たに設定できる余地が存在しない場合がある。このとき、上記のように本来付加情報とは全く別の主格納情報用に用意されたフィールドに、付加情報(を含む付加情報)を当該主格納情報に兼用させる形で書き込むようにすれば、上記のごとく専用フィールドを設ける余裕がない場合でも付加情報を問題なく書き込むことができる。   The survey instruction data creation means writes the additional information in the field specified in the main communication protocol so that the information other than the additional information is stored as the main storage information to be stored in the survey instruction data in the form of using the additional information as the main storage information. Can be. When the main communication protocol conforms to an off-the-shelf communication standard such as the SCSI protocol, there is room for newly setting a dedicated field for additional information, which is the first technical concept in the present invention, in the frame of the survey instruction data. May not. At this time, if the additional information (including additional information) is written to the field prepared for the main storage information that is completely different from the additional information as described above, the main storage information is also used. As described above, even when there is no room to provide a dedicated field, additional information can be written without any problem.

例えば、周辺装置が、少なくともデータの読出しに係るデータアクセスが可能とされたカード型記憶メディアが内蔵されるか又は着脱可能に装着され、通信イベントにより該カード型記憶メディアに対してデータアクセスを行なう記憶装置として構成される場合、調査指示データにおいて、主通信プロトコルに従いカード型記憶メディアに対するデータの読み出し又は書き込みに係る通信イベントを実行する際に、該読み出し処理又は書き込み処理に割り当てられる当該カード型記憶メディア上のメモリ領域のアロケーション長を設定するためのフィールドをアロケーション長設定フィールドとして確保することができる。この場合、該アロケーション長設定フィールドにおいてアロケーション長情報を主格納情報とする形で、該アロケーション長情報に兼用される発生報告指示情報を書き込むことができる。このようにすると、アロケーション長情報に兼用させる形で、主通信プロトコルに規定されていない固有の付加情報を周辺装置側へ送信することが可能となる。   For example, a peripheral device incorporates or is detachably mounted with a card-type storage medium capable of at least data access related to data reading, and performs data access to the card-type storage medium by a communication event. When configured as a storage device, the card-type storage assigned to the read process or the write process when executing a communication event related to reading or writing of data to the card-type storage medium according to the main communication protocol in the survey instruction data A field for setting the allocation length of the memory area on the medium can be secured as the allocation length setting field. In this case, the occurrence report instruction information that is also used as the allocation length information can be written in the allocation length setting field, with the allocation length information as the main storage information. In this way, it is possible to transmit unique additional information not defined in the main communication protocol to the peripheral device side in a form that is also used as allocation length information.

主通信プロトコルにおいて、アロケーション長設定フィールドのサイズが一定ビット長に定められる場合、アロケーション長設定フィールドに上記付加情報を書き込む空き領域を形成するために、次のような巧妙な方法が存在する。すなわち、アロケーション長として設定可能な最大値をバイト単位にて表わしたときのビット数を、アロケーション長設定フィールドの総ビット数未満に設定する。そして、上記最大値を超えるアロケーション長がアロケーション長設定フィールドに記述された場合には、記述されたアロケーション長値とは無関係に上記最大値をアロケーション長の実設定値として定める。そして、該最大値を超える冗長なアロケーション長記述値に一義的に対応付ける形で、付加情報を含む、異なる付加情報内容を定義することができる。例えば、SCSIプロトコルにおける後述のInquiryコマンドのCDBを調査指示データとして使用する場合、このCDBはSCSIプロトコル制御用に割り振られたフィールドばかりからなり、ユーザーが新たなデータを書き込むための余裕は一見全く存在しないように見える。しかし、本来はSCSIプロトコルの主格納情報であるアロケーション長の設定フィールドにおいて、上記のごとくアロケーション長として設定可能な最大値をアロケーション長設定フィールドの総ビット数未満に設定することで、該最大値を超える冗長なアロケーション長の設定記述値に、付加情報を含む付加情報としての意味をもたせることができる。   In the main communication protocol, when the size of the allocation length setting field is determined to be a constant bit length, there is a clever method as follows in order to form an empty area in which the additional information is written in the allocation length setting field. That is, the number of bits when the maximum value that can be set as the allocation length is expressed in bytes is set to be less than the total number of bits in the allocation length setting field. When an allocation length exceeding the maximum value is described in the allocation length setting field, the maximum value is determined as the actual setting value of the allocation length regardless of the described allocation length value. Then, different additional information contents including additional information can be defined in a manner that uniquely associates with a redundant allocation length description value exceeding the maximum value. For example, when a CDB of an inquiry command (to be described later) in the SCSI protocol is used as survey instruction data, this CDB consists only of fields allocated for SCSI protocol control, and there is no room for the user to write new data. Looks like not. However, by setting the maximum value that can be set as the allocation length as described above in the allocation length setting field that is originally the main storage information of the SCSI protocol, the maximum value is set to be less than the total number of bits of the allocation length setting field. It is possible to give a meaning as additional information including additional information to the setting description value of the redundant allocation length that exceeds.

次に、SCSIプロトコル等の場合、調査要求コマンドにはいくつかの種別が用意されている場合がある。この場合、どのような種別の調査要求コマンドを使用するかが問題になる場合がある。例えば、周辺装置が、データの読出し及び書込の双方に係るデータアクセスが可能とされたカード型記憶メディアが着脱可能に装着され、通信イベントにより該カード型記憶メディアに対してデータアクセスを行なう記憶装置として構成される場合、周辺装置には、カード型記憶メディアの交換がなされた場合に当該カード型記憶メディアの交換をホスト装置に通知するための交換通知情報を保持する交換通知情報保持手段と、ホスト装置から予め定められた第一種コマンドを受信した場合には、該コマンドの実行後に交換通知情報保持手段に保持されている交換通知情報をクリアし、同じく第一種コマンド以外の第二種コマンドを受信した場合は、該コマンドの実行後においても交換通知情報保持手段による交換通知情報の保持状態を保留する交換通知情報保持制御手段とが設けられる場合がある。この場合、使用する調査要求コマンドとしては、第二種コマンドの使用が強く推奨される。なぜならば、このような目的に第一種コマンドを使用した場合、交換通知情報を特に必要としない付加情報の送信イベントであるにも拘わらず、処理終了時には交換通知情報がクリアされてしまい、ホスト装置側でこの交換通知情報を本来必要とするシステムコンポーネント(例えばファイルシステム)が、これを取得できなくなってしまう状況が発生し、カード型記憶メディアの記憶内容が破壊されたりするといったトラブルにつながる場合があるためである。   Next, in the case of the SCSI protocol or the like, there are cases where several types of investigation request commands are prepared. In this case, what type of investigation request command is used may be a problem. For example, a storage device in which a peripheral storage device is detachably mounted with a card-type storage medium that allows data access for both reading and writing of data, and performs data access to the card-type storage medium by a communication event. When configured as a device, the peripheral device includes exchange notification information holding means for holding replacement notification information for notifying the host device of replacement of the card type storage medium when the card type storage medium is exchanged. When the predetermined first type command is received from the host device, the exchange notification information held in the exchange notification information holding means is cleared after the execution of the command, and the second type other than the first type command is also cleared. When a seed command is received, the exchange notification information holding unit holds the exchange notification information holding state even after execution of the command. And exchanging notification information holding control means which may be provided that. In this case, it is strongly recommended to use the second type command as the investigation request command to be used. This is because when the first type command is used for such a purpose, the exchange notification information is cleared at the end of the process, even though it is an additional information transmission event that does not require the exchange notification information. When a system component (for example, a file system) that originally needs the exchange notification information on the device side cannot obtain the information, which leads to troubles such as the stored contents of the card-type storage medium being destroyed Because there is.

調査要求コマンドとしては、例えば、周辺装置に対し該周辺装置自身の構成及び属性を特定する情報である構成/属性特定情報の報告を指示する構成/属性調査要求コマンドを採用することができる。このような周辺装置自身の構成及び属性の特定に係る通信イベントは、主通信プロトコル上では、例えばどのような種別の周辺装置(デバイス:SCSIの場合、ターゲット)が接続されているのかを、装置立ち上げ時に認識するために実行する目的で使用されることが多いが、これを本発明では、付加情報通信機構を実現するために、装置立ち上げ後においても任意のタイミングで発行する。該構成/属性調査要求コマンドにより規定される通信イベントは、本来的には(装置使用中においては不変となる)周辺装置のいわば「素性」を認識することのみが目的であり、例えば、コマンドの発生の前後でカード型記憶メディアの交換があった場合において、交換通知情報の保持状態等に不要な影響を与えるべきではないので、上記の第二種コマンドとして用意することが望ましいのである。これを付加情報通信機構に流用することで、該コマンドを何度繰り返し発行しても交換通知情報の保持状態には影響が及ばず、前述のトラブルを防ぐことができる。   As the investigation request command, for example, a configuration / attribute investigation request command for instructing a peripheral device to report configuration / attribute identification information that is information for identifying the configuration and attributes of the peripheral device itself can be employed. Such a communication event related to specifying the configuration and attributes of the peripheral device itself indicates, for example, what type of peripheral device (device: target in the case of SCSI) is connected on the main communication protocol. In many cases, it is used for the purpose of performing recognition for start-up. In the present invention, this is issued at an arbitrary timing even after the apparatus is started in order to realize the additional information communication mechanism. The communication event defined by the configuration / attribute investigation request command is originally intended only to recognize the so-called “feature” of the peripheral device (which remains unchanged when the device is in use). When the card-type storage medium is exchanged before and after the occurrence, it should not be unnecessarily affected to the holding state of the exchange notification information, so it is desirable to prepare it as the second type command. By diverting this information to the additional information communication mechanism, it is possible to prevent the above-mentioned troubles without affecting the holding state of the exchange notification information, even if the command is repeatedly issued.

主通信プロトコルがSCSIプロトコルである場合、上記の調査要求コマンドとしてInquiry(照会)コマンドを使用することが望ましい。この場合、ホスト装置(イニシエータ)から周辺装置(ターゲット)に送られる調査指示データは、Inquiryコマンドの詳細内容を記述する、CDB(Command Descriptor Block:コマンド記述ブロック、コマンド毎にフレーム形式がSCSIプロトコルにて詳細に規定されている)であり、周辺装置(ターゲット)からホスト装置(イニシエータ)に返される調査報告データはInquiryデータ(フレーム形式がSCSIプロトコルにて詳細に規定されている)である。表1はInquiryコマンドに対応するCDBの形式を示すものである。   When the main communication protocol is the SCSI protocol, it is desirable to use an inquiry command as the above-mentioned investigation request command. In this case, the investigation instruction data sent from the host device (initiator) to the peripheral device (target) describes the detailed contents of the inquiry command. The investigation report data returned from the peripheral device (target) to the host device (initiator) is inquiry data (the frame format is defined in detail by the SCSI protocol). Table 1 shows a CDB format corresponding to the inquiry command.

Figure 2008033906
Figure 2008033906

SCSIプロトコルでは、ホスト装置(イニシエータ)側で周辺装置(ターゲット)から返されるInquiryデータの種別を指定することができる。具体的には、Inquiryコマンドに対応するCDBには、EVPD(Enable Vital Product Data)と称さ
れるフィールド(1ビット)と、ページコード(8ビット)と称されるフィールドが形成されている。表2に示すごとくEVPDフィールドに「0」が記述されているCDB(以下、CDB(0)と略記する)に対しては、Inquiryデータとして、表3に示すような、周辺装置の仕様に関係なく形式及び内容が共通に定められたスタンダードInquiryデータ(以下、S/Iデータと略称する)が返される。S/Iデータのうち、SCSIプロトコルによる通信制御に直接使用しない空き領域を、本発明特有の対応付加情報の記述フィールドとして使用することができる。
In the SCSI protocol, the type of inquiry data returned from the peripheral device (target) can be specified on the host device (initiator) side. Specifically, a field called EVPD (Enable Vital Product Data) (1 bit) and a field called page code (8 bits) are formed in the CDB corresponding to the inquiry command. As shown in Table 2, for a CDB in which “0” is described in the EVPD field (hereinafter abbreviated as CDB (0)), the inquiry data is related to the peripheral device specifications as shown in Table 3. Instead, standard inquiry data (hereinafter abbreviated as S / I data) whose format and contents are defined in common is returned. Of the S / I data, a free area that is not directly used for communication control by the SCSI protocol can be used as a description field of corresponding additional information unique to the present invention.

Figure 2008033906
Figure 2008033906

Figure 2008033906
Figure 2008033906

例えば、S/Iデータでは、デバイスのベンダに固有の情報を記述するための一定長のフィールド(以下、ベンダ固有領域という)が設けられており、このフィールドに空き領域がある場合は、これを本発明特有の応答情報の記述フィールドとして使用することができる。また、ビット数は僅少であるが、次のような空き領域も、本発明特有の応答情報の記述フィールドとして利用することができる。すなわち、8ビットに設定された追加データ長フィールド(S/Iデータのバイト5以降のデータ長)は、S/Iデータにおけるデータフレーム長の上限から、最大データ長が8ビットに満たないことがある。この場合、追加データ長フィールドに上記最大データ長を超えるデータ長が指定されている場合、追加データ長フィールドの記述内容によらず、最大データ長が指定されることとなる。その結果、最大データ長を超えるビット値の範囲は、実質的に対応付加情報を記述するための「空き領域」として活用できる。   For example, in the S / I data, a fixed-length field (hereinafter referred to as a vendor-specific area) for describing information specific to a device vendor is provided. If there is a free area in this field, It can be used as a description field for response information unique to the present invention. Further, although the number of bits is very small, the following free space can also be used as a description field for response information unique to the present invention. In other words, the additional data length field (data length after byte 5 of S / I data) set to 8 bits may have a maximum data length of less than 8 bits due to the upper limit of the data frame length in S / I data. is there. In this case, when a data length exceeding the maximum data length is specified in the additional data length field, the maximum data length is specified regardless of the description content of the additional data length field. As a result, the range of bit values exceeding the maximum data length can be utilized as a “free area” for describing the corresponding additional information substantially.

一方、表4のごとく、EVPDフィールドに「1」が記述されているCDB(以下、CDB(1)と略記する)は、ホスト装置(イニシエータ)により詳細な、あるいはデバイス固有の情報を提供するための、表5のようなVPD(Vital Product Data)と称される特殊なInquiryデータが返される。   On the other hand, as shown in Table 4, a CDB in which “1” is described in the EVPD field (hereinafter abbreviated as CDB (1)) provides detailed or device-specific information to the host device (initiator). As shown in Table 5, special inquiry data called VPD (Vital Product Data) is returned.

Figure 2008033906
Figure 2008033906

Figure 2008033906
Figure 2008033906

VPDにはいくつかの種類が規定されており、どの種別のVPDを指定するかをCDBのページコードフィールドに記述する(具体的には、ページコードリスト(ページコード:00)、FRU ASCII情報(ページコード:01〜7F)、ユニットシリアル番号(ページコード:80)、動作モード定義(ページコード:81)、ASCII動作モード定義(ページコード:82)、及びベンダ固有の形式(ページコード:C0〜FF))。周辺装置はページコードフィールドで指定された種類のVDPを作成し、ホスト装置に返信する。特に、FRU ASCII情報形式及びASCII動作モード定義形式のVPDは、ページ長フィールドに続いて、必要なASCII情報を書き込むフィールドのデータ長のフィールドと、そのデータ長で指定されるASCII情報フィールドとが形成されるが、以降のフィールドはベンダ固有領域として、対応付加情報を記述するための「空き領域」として活用できる。例えば、ASCII動作モード定義形式のVPDにおいて、ASCII情報フィールドを、デバイスのバージョン情報などを記述するためのバイト数の小さい(例えば1〜3バイト)のフィールドとして定義すれば、ベンダ固有領域となる残りのフィールドの長さを比較的大きく確保することができ、ある程度サイズの大きい対応付加情報を書き込むことが可能となる。 The VPD are defined several types, or to specify the VPD of which type to describe (specifically page code field of the CDB, pages Listing (Page Code: 00 h), FRU ASCII information (page code: 01 h ~7F h), the unit serial number (page code: 80 h), the operation mode definition (page code: 81 h), ASCII operation mode definition (page code: 82 h), and vendor-specific format (page code: C0 h ~FF h)). The peripheral device creates a VDP of the type specified in the page code field and returns it to the host device. In particular, in the VPD in the FRU ASCII information format and the ASCII operation mode definition format, a data length field in which necessary ASCII information is written and an ASCII information field specified by the data length are formed following the page length field. However, the subsequent fields can be used as a “free area” for describing the corresponding additional information as a vendor-specific area. For example, in the ASCII operation mode definition format VPD, if the ASCII information field is defined as a field having a small number of bytes (for example, 1 to 3 bytes) for describing the version information of the device, the remaining vendor-specific area It is possible to ensure a relatively large field length, and to write corresponding additional information that is somewhat large in size.

SCSIプロトコルでは、ターゲット(周辺装置)、あるいはこれに含まれる1又は複数のロジカルユニット(周辺装置が記憶装置である場合は、1又は複数のカード型記憶メディア装着スロットである)上で事象や状態の変化が、ホスト装置(イニシエータ)の動作とは非同期に発生した場合、これを該イニシエータに通知するためのユニット・アテンション・コンディションを生成する機能が設けられている。周辺装置にてカード型記憶メディアの交換が発生した場合、その交換通知情報が生成されるユニット・アテンション・コンディションに反映されることとなる。SCSIプロトコルでは、そのようなユニット・アテンション・コンディションを保留中の周辺装置に向けてInquiryコマンドが発行された場合、該周辺装置は保留中のユニット・アテンション・コンディションをクリアせずに(ただし、Copy Aborded(CA)状態の生成前に限る)、発行されたInquiryコマンドが実行される(Inquiryデータの作成・返信)。従って、対応付加情報の返信要求イベントを起動する際にあっては、Inquiryコマンドを用いることで、カード型記憶メディアの交換がなされた場合も、その交換通知情報を含むユニット・アテンション・コンディションが保持され、交換通知情報の喪失を防ぐことができる。Inquiryコマンドが前述の第二種コマンドに該当するものであることは明らかである。   In the SCSI protocol, an event or a state on a target (peripheral device) or one or a plurality of logical units included therein (or one or a plurality of card-type storage media mounting slots when the peripheral device is a storage device) When this change occurs asynchronously with the operation of the host device (initiator), a function is provided for generating a unit attention condition for notifying the initiator of this change. When the card type storage medium is exchanged in the peripheral device, the exchange notification information is reflected in the generated unit attention condition. In the SCSI protocol, when an inquiry command is issued to a peripheral device that has such a unit attention condition pending, the peripheral device does not clear the pending unit attention condition (however, Copy The issued Inquiry command is executed (created / returned Inquiry data) only when the Aborted (CA) state is generated. Therefore, when the response request event for the corresponding additional information is started, the unit attention condition including the replacement notification information is maintained even when the card-type storage medium is replaced by using the inquiry command. Therefore, loss of exchange notification information can be prevented. It is clear that the inquiry command corresponds to the above-described second type command.

なお、SCSIプロトコルでは、Request Senseコマンドと称される別の調査要求コマンドも使用が可能である。Request Senseコマンドは、周辺装置(ターゲット)に例えばエラー原因や種類などを報告するためのセンスデータを要求するコマンドであり、調査報告データとして該センスデータが規定フォーマットのフレームに記述されて返される。本発明においては、このセンスデータの空き領域を利用して対応付加情報を書き込み、ホスト装置に返すことも原理的には可能である。しかし、SCSIプロトコルでは、SCSIプロトコルでは、ユニット・アテンション・コンディションを保留中の周辺装置に向けてRequest Senseコマンドが発行された場合、該周辺装置は保留中のユニット・アテンション・コンディションをクリアするように(ただし、Copy Aborded(CA)状態の生成前に限る)決められており、カード型記憶メディアの交換がなされた場合に、その交換通知情報を含むユニット・アテンション・コンディションがクリアされ、交換通知情報が喪失する惧れがある。つまり、Request Senseコマンドは前述の第一種コマンドに該当するものである。   In the SCSI protocol, another investigation request command called a Request Sense command can also be used. The Request Sense command is a command for requesting sense data for reporting, for example, an error cause and type to a peripheral device (target), and the sense data is described and returned as a survey report data in a frame of a prescribed format. In the present invention, it is also possible in principle to write the corresponding additional information using the empty space of the sense data and return it to the host device. However, in the SCSI protocol, in the SCSI protocol, when a Request Sense command is issued to a peripheral device holding a unit attention condition, the peripheral device clears the pending unit attention condition. (However, only before the generation of the Copy Aborted (CA) state) When the card-type storage medium is exchanged, the unit attention condition including the exchange notice information is cleared, and the exchange notice information is obtained. May be lost. That is, the Request Sense command corresponds to the first type command described above.

以下、適宜図面を参照して本発明の実施形態に係る通信システム1について説明する。図1は通信システム1に適用されるマルチリーダライタ2(記憶装置:周辺装置の一例)の斜視図、図2はマルチリーダライタ2の概略構成を示すブロック図、図6は通信システム1に適用されるPC3(ホスト装置の一例)の概略構成を示すブロック図である。なお、以下に説明する通信システム1の構成は、本発明を具現化するための単なる一例であり、本発明の要旨を変更しない範囲で構成を適宜変更できることは当然である。   Hereinafter, a communication system 1 according to an embodiment of the present invention will be described with reference to the drawings as appropriate. 1 is a perspective view of a multi-reader / writer 2 (storage device: an example of a peripheral device) applied to the communication system 1, FIG. 2 is a block diagram showing a schematic configuration of the multi-reader / writer 2, and FIG. It is a block diagram which shows schematic structure of PC3 (an example of a host apparatus) performed. Note that the configuration of the communication system 1 described below is merely an example for embodying the present invention, and it is natural that the configuration can be appropriately changed without departing from the gist of the present invention.

図1(a)に示すように、マルチリーダライタ2は、その前面に着脱可能なカード型記憶メディアとして、第1メモリーカード11(例えばCF)を挿入するための第1スロット16と、第2メモリーカード12(例えばSM)を挿入するための第2スロット17と、第3メモリーカード13(例えばMS)を挿入するための第3スロット18と、第4メモリーカード14(例えばSD)を挿入するための第4スロット19とを備えている。なお、本実施形態では、周辺装置としてマルチリーダライタ2を例示して説明するが、シングルスロットタイプのリーダライタにも適用可能である。また、CFやSMなどのメモリーカードに代えてCD−ROM、DVD−ROMあるいはリムーバブルハードディスクなどのディスク記録メディアとする場合は、該ディスク記録メディアを単数あるいは複数着脱可能に挿入可能な挿入部を備えてなる、いわゆるチェンジャー型ドライブ周辺装置となる。該周辺装置を備えて構成された通信システムにも本発明は適用可能である。   As shown in FIG. 1A, the multi-reader / writer 2 includes a first slot 16 for inserting a first memory card 11 (for example, CF) as a removable card-type storage medium on the front surface, a second slot 16 A second slot 17 for inserting a memory card 12 (for example, SM), a third slot 18 for inserting a third memory card 13 (for example, MS), and a fourth memory card 14 (for example, SD) are inserted. And a fourth slot 19 for the purpose. In the present embodiment, the multi-reader / writer 2 is described as an example of the peripheral device, but the present invention can also be applied to a single slot type reader / writer. Also, when a disk recording medium such as a CD-ROM, a DVD-ROM or a removable hard disk is used instead of a memory card such as CF or SM, an insertion section is provided that allows the disk recording medium to be detachably inserted. This is a so-called changer-type drive peripheral device. The present invention is also applicable to a communication system configured with the peripheral device.

マルチリーダライタ2はUSB/SCSI型周辺機器として構成され、その背面には、図1B及び図2に示すように、USBケーブル25(図2参照)を接続するためのUSB端子24が設けられている。また、本実施形態では、主通信プロトコルとしてSCSI−2のプロトコルが採用されているものとする。図2に示すように、マルチリーダライタ2は、その内部に、各構成部を制御するCPU27と、制御プログラムや種々のデータ等を格納するROM28と、CPU27による演算の作業領域となるRAM29と、入出力制御LSI31と、USBチップ32とを備え、これらがバス33を介して相互にデータ転送が可能なように接続されている。マルチリーダライタ2は、該マルチリーダライタ2が接続されるPC3との間で、SCSIプロトコルに従うデータ通信を行なう。   The multi-reader / writer 2 is configured as a USB / SCSI type peripheral device, and a USB terminal 24 for connecting a USB cable 25 (see FIG. 2) is provided on the rear surface thereof as shown in FIGS. 1B and 2. Yes. In this embodiment, it is assumed that the SCSI-2 protocol is adopted as the main communication protocol. As shown in FIG. 2, the multi-reader / writer 2 includes therein a CPU 27 that controls each component, a ROM 28 that stores a control program, various data, and the like, and a RAM 29 that is a work area for operations by the CPU 27. An input / output control LSI 31 and a USB chip 32 are provided, and these are connected via a bus 33 so that data can be transferred to each other. The multi-reader / writer 2 performs data communication according to the SCSI protocol with the PC 3 to which the multi-reader / writer 2 is connected.

具体的には、ROM28には、SCSIプロトコルに基づいて作成された通信制御プログラムと、PC3から送信されたデータ(CDB)を解析するために用いられる解析データのテーブルリストが格納され、CPU27は、リーダライタ2がSCSI対応機器のターゲットとして機能するための、受信したSCSIコマンドに対応した通信イベントの実行制御処理を行なう。また、各スロット16〜19に着脱可能に装着される各第1〜第4メモリーカード11〜14は、例えば、コンパクトフラッシュ(CF:登録商標)、スマートメディア(SM:登録商標)、メモリースティック(MS:登録商標)、SDメモリーカード(SD:登録商標)など、PC3によるデータの書き込み、書き換え、消去、読出し、メディア装着確認等のデータアクセスが可能なフラッシュメモリを搭載したカード型記憶メディアである。   Specifically, the ROM 28 stores a communication control program created based on the SCSI protocol and a table list of analysis data used for analyzing data (CDB) transmitted from the PC 3. In order for the reader / writer 2 to function as a target of a SCSI compatible device, a communication event execution control process corresponding to the received SCSI command is performed. The first to fourth memory cards 11 to 14 that are detachably mounted in the slots 16 to 19 are, for example, compact flash (CF: registered trademark), smart media (SM: registered trademark), memory stick (MS). : A registered trademark), an SD memory card (SD: registered trademark), and the like, a card-type storage medium equipped with a flash memory capable of data access such as data writing, rewriting, erasing, reading, and media loading confirmation by the PC 3.

SCSIプロトコルに従い、PC3はホスト装置として通信イベントの起動決定権が与えられ、該PC3(ホスト装置:イニシエータ)に接続されるマルチリーダライタ2は、PC3(ホスト装置)の通信対象(ターゲット)となる。そして、通信イベントを実行命令するためのSCSIコマンドがPC3(ホスト装置)からマルチリーダライタ2(周辺装置)に向けて順次発行される一方、発行されたコマンドを受領したマルチリーダライタ2(周辺装置)が当該SCSIコマンドに対応するデータ処理を逐次実行し、その実行結果に応じた応答情報をホスト装置側に返信する。また、SCSIコマンドの発行方向は、PC3(ホスト装置)側からマルチリーダライタ2(周辺装置)側への一方向に規制されている。   In accordance with the SCSI protocol, the PC 3 is given the right to determine a communication event as a host device, and the multi-reader / writer 2 connected to the PC 3 (host device: initiator) becomes a communication target (target) of the PC 3 (host device). . SCSI commands for instructing execution of communication events are sequentially issued from the PC 3 (host device) to the multi-reader / writer 2 (peripheral device), while the multi-reader / writer 2 (peripheral device) that has received the issued command. ) Sequentially executes data processing corresponding to the SCSI command, and returns response information corresponding to the execution result to the host device side. Also, the issuing direction of the SCSI command is restricted to one direction from the PC 3 (host device) side to the multi-reader / writer 2 (peripheral device) side.

次に、USBチップ32には、各外部メモリ入出力制御部51〜54に共通して設けられたコマンド・データ・ステータス送受信部(以下、単に「送受信部」という;転送要素送受信部)341と、USB端子(通信バス接続端子)24に接続されたUSBプロトコルエンジン(プロトコルエンジン部)321と、転送通信処理の制御を司るUSBコントロール部(制御指令部)331とが集積されてなる。   Next, the USB chip 32 includes a command / data / status transmission / reception unit (hereinafter simply referred to as “transmission / reception unit”; transfer element transmission / reception unit) 341 provided in common to the external memory input / output control units 51 to 54. The USB protocol engine (protocol engine unit) 321 connected to the USB terminal (communication bus connection terminal) 24 and the USB control unit (control command unit) 331 for controlling the transfer communication processing are integrated.

ここで、USBプロトコルエンジン(プロトコルエンジン部)321と、USBコントロール部(制御指令部)331とで構成される部分が通信制御部に該当し、また、この通信制御部と、USB端子(通信バス接続端子)24とで構成される部分がシリアル通信部に該当する。   Here, a portion composed of a USB protocol engine (protocol engine unit) 321 and a USB control unit (control command unit) 331 corresponds to the communication control unit, and this communication control unit and a USB terminal (communication bus) The portion composed of the connection terminal 24 corresponds to the serial communication unit.

各USBコントロール部331は、対応するUSBプロトコルエンジン321にFIFOメモリからなる制御用の双方向エンドポイントを介して接続されている。また、送受信部341は、USBプロトコルエンジン321に対し、FIFOメモリからなるUSBプロトコルエンジン321への入力用エンドポイントと、FIFOメモリからなるUSBプロトコルエンジン321からの出力用エンドポイントとを介して入出力経路が分離された形で接続されている。   Each USB control unit 331 is connected to a corresponding USB protocol engine 321 via a bidirectional endpoint for control including a FIFO memory. The transmission / reception unit 341 inputs / outputs the USB protocol engine 321 via an input endpoint to the USB protocol engine 321 including a FIFO memory and an output endpoint from the USB protocol engine 321 including a FIFO memory. Routes are connected in a separate form.

USBプロトコルエンジン321とUSBコントロール部331とで構成される通信制御部は、それぞれ、PC側から、送受信部341の特定情報と、該送受信部341に対応するエンドポイントの特定情報とを受信して、該送受信部341をターゲットデバイスとしてポーリングすることにより、データアクセス先が外部メモリ入出力制御部51〜54であることと、データ送受信の方向とを特定する。なお、当然のことであるが、ターゲットデバイスとなる送受信部341側からホスト装置であるPC3を逆ポーリングすることは、USBプロトコルでは許されていない。   Each of the communication control units including the USB protocol engine 321 and the USB control unit 331 receives the specific information of the transmission / reception unit 341 and the specific information of the endpoint corresponding to the transmission / reception unit 341 from the PC side. By polling the transmission / reception unit 341 as a target device, the data access destination is the external memory input / output control units 51 to 54 and the data transmission / reception direction is specified. As a matter of course, reverse polling of the PC 3 as the host device from the transmission / reception unit 341 side serving as the target device is not permitted in the USB protocol.

送受信部(転送要素送受信部)341は、USBプロトコルエンジン321との間でSCSIプロトコルに従う送受信するものである。ここで、転送要素とは、PC3との間でUSBバスを介してやり取りされる、通信イベントの内容を特定するコマンド(SCSIコマンド)と、通信イベント処理実行に対応して周辺装置側から返信される応答情報(ステータス)とを含む(SCSIコマンドに特定された処理内容が、メモリーカードに記憶されたデータの送受信に関係するデータアクセス処理であった場合は、そのデータも転送要素となる)。   The transmission / reception unit (transfer element transmission / reception unit) 341 performs transmission / reception with the USB protocol engine 321 according to the SCSI protocol. Here, the transfer element is a command (SCSI command) for specifying the content of the communication event exchanged with the PC 3 via the USB bus, and is returned from the peripheral device side corresponding to the execution of the communication event process. (If the processing content specified in the SCSI command is data access processing related to transmission / reception of data stored in the memory card, the data is also a transfer element).

また、送受信部341は、図3に示すように、コントロールレジスタ81(図4参照)、ステータスレジスタ82(図5参照)、SCSIコマンドバッファ83、SCSIステータスバッファ84、SCSIデータDMAアドレスレジスタ85、SCSIデータDMAカウントレジスタ86を有する。これらの詳細については後述する。   As shown in FIG. 3, the transmission / reception unit 341 includes a control register 81 (see FIG. 4), a status register 82 (see FIG. 5), a SCSI command buffer 83, a SCSI status buffer 84, a SCSI data DMA address register 85, a SCSI A data DMA count register 86 is provided. Details of these will be described later.

CPU27は、送受信部341が受信したSCSIコマンドを解析するコマンド解析ステップと、該SCSIコマンドに特定された内容の通信イベントを、対象となる外部メモリ入出力制御部51〜54(つまり、リーダライタ2をターゲットとした場合、それに含まれている複数のロジカルユニット)との間で行なうイベント実行ステップと、ステータスを送受信部341に送信させるステータス送信ステップと、をこの順序で実行する。   The CPU 27 analyzes the command analysis step for analyzing the SCSI command received by the transmission / reception unit 341 and the communication event having the content specified by the SCSI command into the target external memory input / output control units 51 to 54 (that is, the reader / writer 2). When the target is a target, an event execution step performed with a plurality of logical units) and a status transmission step for transmitting the status to the transmission / reception unit 341 are performed in this order.

マルチリーダライタ2では、挿入されたメモリーカードに対してデータの読み書きを行なう場合は、該メモリーカードからデータを読み出すために使用するメモリ領域あるいは該メモリーカードにデータを記憶するために使用するメモリ領域の割り当てが行われる。この割り当てられるメモリ領域のデータ長はアロケーション長と呼ばれている。一般に、該アロケーション長はマルチリーダライタ2にアクセスするPC3からの指定されたデータ長に設定されるが、本実施形態では、マルチリーダライタ2で設定可能なアロケーション長の最大値が、PC3側から指定し得る最大数値未満に設定されている。   In the multi-reader / writer 2, when reading / writing data from / to the inserted memory card, a memory area used for reading data from the memory card or a memory area used for storing data in the memory card Is assigned. The data length of the allocated memory area is called an allocation length. Generally, the allocation length is set to a specified data length from the PC 3 that accesses the multi-reader / writer 2, but in this embodiment, the maximum allocation length that can be set by the multi-reader / writer 2 is determined from the PC 3 side. It is set to less than the maximum value that can be specified.

PC3は、図6に示すように、各構成部を制御するCPU41と、ROM42と、RAM43と、各種ソフトウェアプログラムやデータが格納されたHDD44と、ビデオコントロールLSI45と、USBチップ46と、ビデオ端子47と、複数の入出力ポートを有するUSB端子48などを備え、これらがバス100を介して相互にデータ転送が可能なように接続されている。これら各部はいわゆるマザーボードと呼ばれるメイン制御基板に一体的に組み込まれている。ビデオ端子47にはビデオケーブルを介してディスプレイ56が接続されている。USB端子48はUSBハブ機能を有する。このUSB端子48には、キーボード57及びマウス58等の入力手段が接続されており、さらに、マルチリーダライタ2が接続されている。   As shown in FIG. 6, the PC 3 includes a CPU 41 that controls each component, a ROM 42, a RAM 43, an HDD 44 that stores various software programs and data, a video control LSI 45, a USB chip 46, and a video terminal 47. And a USB terminal 48 having a plurality of input / output ports, which are connected to each other via the bus 100 so as to be able to transfer data to each other. These parts are integrated into a main control board called a so-called mother board. A display 56 is connected to the video terminal 47 via a video cable. The USB terminal 48 has a USB hub function. Input means such as a keyboard 57 and a mouse 58 are connected to the USB terminal 48, and the multi-reader / writer 2 is further connected.

ROM42には、マルチリーダライタ2へ送信されるデータであって、マルチリーダライタ2のCPU27に所定の処理を実行させる指示データが格納されている。該指示データはテーブルリスト化された状態でHDD44又はROM42に格納されている。また、HDD44のプログラム格納領域には、PC3のオペレーションシステムであるWindows2000のSP3(以下「WIN2000」と称する)や、マルチリーダライタ2へのデータの書き込み及び読み出しを可能とするためのR/Wアプリケーションなどのソフトウェアプログラムが格納されている。これらソフトウェアプログラムがCPU41によって読み出されて所定の演算処理がなされることにより、各アプリケーションがPC3において動作可能となる。また、上記プログラム格納領域には、マルチリーダライタ2との間でSCSIプロトコルに従うデータ通信プログラムが格納されている。本実施形態では、WIN2000が搭載されたPC3を例示して説明するが、Linuxシリーズ、MacOSシリーズなどのOSが搭載されたものであってもよい。もちろん、Windows2000のSP3をSP4や、WindowsXP(登録商標)に代替することも可能である。   The ROM 42 stores data to be transmitted to the multi-reader / writer 2 and instructs the CPU 27 of the multi-reader / writer 2 to execute a predetermined process. The instruction data is stored in the HDD 44 or the ROM 42 in the form of a table list. In the program storage area of the HDD 44, an R / W application for enabling writing and reading of data to / from the Windows 3 SP3 (hereinafter referred to as “WIN2000”), which is an operation system of the PC 3, and the multi-reader / writer 2. Software programs such as are stored. These software programs are read by the CPU 41 and subjected to predetermined calculation processing, whereby each application can operate on the PC 3. The program storage area stores a data communication program in accordance with the SCSI protocol with the multi-reader / writer 2. In this embodiment, the PC 3 on which WIN2000 is installed will be described as an example. However, an OS such as a Linux series or a MacOS series may be installed. Of course, SP3 of Windows 2000 can be replaced with SP4 or Windows XP (registered trademark).

上記R/Wアプリケーション、PC3側のデータ通信プログラム及びリーダライタ2側の制御プログラムは、互いに協働して、以下の各手段を機能的に実現する処理を行なう。   The R / W application, the data communication program on the PC 3 side, and the control program on the reader / writer 2 side cooperate with each other to perform processing for functionally realizing the following means.

調査指示データ送信手段:PC3(ホスト装置)側に設けられ、マルチリーダライタ2(周辺装置)に対し該マルチリーダライタ2(周辺装置)自身に対する調査報告処理を要求する調査要求コマンドを発行するとともに、該調査要求コマンドの発行に伴い、調査報告指示内容を示す予め定められたフレームフォーマットを有するとともに当該フレームの予め定められたフィールドに付加情報が書き込まれた調査指示データを作成する調査指示データ作成手段と、作成された調査指示データをマルチリーダライタ2(周辺装置)に送信する。
・調査報告データ生成手段:マルチリーダライタ2(周辺装置)に設けられ、調査指示データを受けて、予め定められたフレームフォーマットを有する調査報告データを生成する。
・調査報告データ送信手段:マルチリーダライタ2(周辺装置)に設けられ、調査報告データを応答情報としてPC3(ホスト装置)に送信する。
・付加情報抽出手段:マルチリーダライタ2(周辺装置)側に設けられ、受信した該調査指示データの予め定められたフィールドから付加情報を抽出する。以上が、請求項でいう付加情報通信機構を構築する。
Survey instruction data transmission means: provided on the PC 3 (host device) side, issues a survey request command requesting the multi-reader / writer 2 (peripheral device) to perform a survey report process for the multi-reader / writer 2 (peripheral device) itself. In response to issuance of the survey request command, survey command data creation that creates a survey command data having a predetermined frame format indicating the content of the survey report command and in which additional information is written in a predetermined field of the frame The means and the created survey instruction data are transmitted to the multi-reader / writer 2 (peripheral device).
Survey report data generation means: provided in the multi-reader / writer 2 (peripheral device), receives survey instruction data, and generates survey report data having a predetermined frame format.
Survey report data transmission means: provided in the multi-reader / writer 2 (peripheral device), and transmits survey report data to the PC 3 (host device) as response information.
Additional information extraction means: provided on the multi-reader / writer 2 (peripheral device) side, extracts additional information from a predetermined field of the received survey instruction data. The above constructs the additional information communication mechanism referred to in the claims.

付加情報通信機構により実現される機能手段は以下のごとくである。
・セキュリティ参照情報送信手段:PC3(ホスト装置)側で取得されるセキュリティ参照情報を、調査指示データ上の付加情報としてマルチリーダライタ2(周辺装置)に送信する。
The functional means realized by the additional information communication mechanism are as follows.
Security reference information transmission means: transmits security reference information acquired on the PC 3 (host device) side to the multi-reader / writer 2 (peripheral device) as additional information on the investigation instruction data.

これに対応して、以下に説明するごとく、マルチリーダライタ2(周辺装置)には、カード型記憶メディアに書き込まれたセキュリティーマスター情報と、PC3(ホスト装置)から受信するセキュリティ参照情報とを用いて、カード型記憶メディアへのPC3(ホスト装置)側からのアクセス権を認証する認証手段が形成される。
・認証通信手段:認証手段による認証結果を反映した認証結果反映情報をマルチリーダライタ2(周辺装置)に要求する認証結果要求情報を調査指示データ上の付加情報としてマルチリーダライタ2(周辺装置)に送信するとともに、調査報告データの予め定められたフレームにPC3(ホスト装置)側からの付加情報に対応する対応付加情報として認証結果反映情報が書き込まれた調査報告データを、応答情報としてマルチリーダライタ2(周辺装置)からPC3(ホスト装置)に返信する。
Correspondingly, as will be described below, the multi-reader / writer 2 (peripheral device) uses security master information written in the card-type storage medium and security reference information received from the PC 3 (host device). Thus, authentication means for authenticating the access right from the PC 3 (host device) side to the card type storage medium is formed.
Authentication communication means: Multi-reader / writer 2 (peripheral device) using authentication result request information requesting authentication result reflection information reflecting the authentication result of the authentication means to multi-reader / writer 2 (peripheral device) as additional information on the survey instruction data The survey report data in which the authentication result reflection information is written as the corresponding additional information corresponding to the additional information from the PC 3 (host device) side in the predetermined frame of the survey report data is sent as the response information to the multi-reader A reply is sent from the writer 2 (peripheral device) to the PC 3 (host device).

これに対応して、PC3(ホスト装置)には、返信された認証結果反映情報を出力する認証結果反映情報出力手段が形成される。
・アクセスモード報告通信手段:マルチリーダライタ2(周辺装置)に設定されているアクセスモードの種別を該マルチリーダライタ2(周辺装置)に報告させるためのアクセスモード報告指示情報を、調査指示データ上の付加情報としてマルチリーダライタ2(周辺装置)に送信するとともに、調査報告データの予め定められたフレームにPC3(ホスト装置)側からの付加情報に対応する対応付加情報としてアクセスモード設定手段が設定中のアクセスモードを報告するアクセスモード報告情報が書き込まれた調査報告データを、応答情報としてマルチリーダライタ2(周辺装置)側からPC3(ホスト装置)に返信する。
Correspondingly, authentication result reflection information output means for outputting the returned authentication result reflection information is formed in the PC 3 (host device).
Access mode report communication means: Access mode report instruction information for causing the multi reader / writer 2 (peripheral device) to report the type of access mode set in the multi reader / writer 2 (peripheral device) Is transmitted to the multi-reader / writer 2 (peripheral device) as additional information, and the access mode setting means sets corresponding additional information corresponding to the additional information from the PC 3 (host device) side in a predetermined frame of the survey report data. The investigation report data in which the access mode report information for reporting the access mode is written is returned as response information from the multi-reader / writer 2 (peripheral device) side to the PC 3 (host device).

これに対応して、PC3(ホスト装置)には、アクセスモード報告通信手段により取得されたアクセスモードの種別を表示するアクセスモード種別表示手段が形成される。
・ノーマルモード移行指示情報送信手段:PC3(ホスト装置)側でノーマルモードが選択された場合に、該ノーマルモードへの移行をマルチリーダライタ2(周辺装置)に指示するノーマルモード移行指示情報を、調査指示データ上の付加情報としてマルチリーダライタ2(周辺装置)に送信する。
・ノーマルモード設定完了報告情報返信手段:該ノーマルモード移行指示情報を受けたマルチリーダライタ2(周辺装置)が、アクセスモード設定手段がアクセスモードをノーマルモードに設定するに伴い、調査報告データの予め定められたフレームにPC3(ホスト装置)側からの付加情報に対応する対応付加情報として、ノーマルモードへの設定完了を報告するノーマルモード設定完了報告情報を調査報告データとしてPC3(ホスト装置)に返信する。
Correspondingly, an access mode type display means for displaying the type of the access mode acquired by the access mode report communication means is formed in the PC 3 (host device).
Normal mode transition instruction information transmission means: Normal mode transition instruction information for instructing the multi-reader / writer 2 (peripheral device) to transition to the normal mode when the normal mode is selected on the PC 3 (host device) side, It is transmitted to the multi-reader / writer 2 (peripheral device) as additional information on the survey instruction data.
Normal mode setting completion report information return means: The multi-reader / writer 2 (peripheral device) that has received the normal mode shift instruction information sets the access mode to the normal mode in advance as the investigation mode data is set in advance. As the corresponding additional information corresponding to the additional information from the PC 3 (host device) side, the normal mode setting completion report information for reporting the completion of setting to the normal mode is returned to the PC 3 (host device) as the investigation report data in the determined frame. To do.

PC3(ホスト装置)には、また、PC3(ホスト装置)には、アクセスモードとしてノーマルモードとセキュリティモードとのいずれかを選択するためのアクセスモード選択手段と、キュリティー参照情報の入力手段と、セキュリティモードが選択されることにより、該入力手段からのセキュリティ参照情報の入力を受け付ける入力制御手段とが形成される。前述のセキュリティ参照情報送信手段は、入力されたセキュリティ参照情報を、調査指示データ上の付加情報としてマルチリーダライタ2(周辺装置)に送信するものとされる。   The PC 3 (host device) and the PC 3 (host device) have access mode selection means for selecting either the normal mode or the security mode as an access mode, security reference information input means, By selecting the security mode, input control means for receiving input of security reference information from the input means is formed. The above-described security reference information transmitting means transmits the input security reference information to the multi-reader / writer 2 (peripheral device) as additional information on the survey instruction data.

まず、図7を用いて、SCSIコマンドに基づいて、PC3と、USB−I/F78を介して該PC3とUSB接続されたリーダライタ2との間で行われるデータ通信の概略について説明する。OS70は、GUI(Graphical User Interface)71とファイルシステム72とOSカーネル73を備えてその基幹システムが構成されている。GUI71は、コンピュータグラフィックスとマウスなどのポインティングデバイスを用いてユーザーの入力操作を実現するユーザインターフェースであり、ファイルシステム72は、コンピュータ内部でファイルやフォルダを用いてデータを管理する方式及びその管理システムである。また、OSカーネル73はアプリケーションや周辺機器を監視する等の基本機能を実装したソフトウェアである。なお、PC3には、リーダライタ2へのアクセスが可能なようにドライバソフト74が予めインストールされており、該ドライバソフト74はモジュール化された状態でOSカーネル73に実装されている。   First, an outline of data communication performed between the PC 3 and the reader / writer 2 connected to the PC 3 via the USB-I / F 78 based on the SCSI command will be described with reference to FIG. The OS 70 includes a GUI (Graphical User Interface) 71, a file system 72, and an OS kernel 73, and the basic system is configured. The GUI 71 is a user interface that realizes a user input operation using a computer graphics and a pointing device such as a mouse, and the file system 72 is a method and a management system for managing data using files and folders inside the computer. It is. The OS kernel 73 is software that implements basic functions such as monitoring applications and peripheral devices. The PC 3 is preinstalled with driver software 74 so that the reader / writer 2 can be accessed, and the driver software 74 is mounted on the OS kernel 73 in a modular state.

例えば、リーダライタ2へアクセスするためのアプリケーションの一例であるエクスプローラ75とR/Wアプリケーション76とがPC3上で起動されたとする。エクスプローラ75は周知のごとく、ファイルやフォルダを管理するためのものである。エクスプローラ75はOS70のシステムに準拠して作成されており、一般には、OS70の一機能として認識されている。従って、エクスプローラ75はファイルシステム72を介してリーダライタ2と通信する。一方、R/Wアプリケーション76は、例えばリーダライタ2の製造メーカが開発した独自のアプリケーションソフトであって、リーダライタ2に挿入された記録メディアに対してデータを書き込む処理あるいはデータを読み出す処理を行なうものである。一般に、R/Wアプリケーション76は、ファイルシステム72の仕様が公開されていないため、OS70には準拠せずに作成される。   For example, it is assumed that an explorer 75 and an R / W application 76, which are examples of applications for accessing the reader / writer 2, are activated on the PC 3. As is well known, the explorer 75 is for managing files and folders. The explorer 75 is created in conformity with the OS 70 system and is generally recognized as a function of the OS 70. Therefore, the explorer 75 communicates with the reader / writer 2 via the file system 72. On the other hand, the R / W application 76 is unique application software developed by the manufacturer of the reader / writer 2, for example, and performs a process of writing data to a recording medium inserted in the reader / writer 2 or a process of reading data. Is. Generally, the R / W application 76 is created without conforming to the OS 70 because the specification of the file system 72 is not disclosed.

まず、エクスプローラ75からリーダライタ2にアクセスする場合について説明する。OS70が起動され、エクスプローラ75が起動されると、エクスプローラ75によって、Inquiryコマンドがファイルシステム72を介してOSカーネル73に発行される。なお、Inquiryコマンドを含む全てのSCSIコマンドは、OSカーネル73において仮想的に設けられたSCSIコマンド処理入口79に対して発行されるようになっている。上記Inquiryコマンドが発行されると、リーダライタ2へは対応するCDB(ここではCDB(0);表2)が送信され、リーダライタ2は応答情報として、その型式やデバイス名、SCSI−ID、LUN(Logical Unit Number:ロジカルユニット番号)の有無、メモリーカードの種別などの構成情報を含むInquiryデータ(この場合、S/Iデータ(表3))を作成し、PC3に返信する。これにより、リーダライタ2が認識される。   First, a case where the reader / writer 2 is accessed from the explorer 75 will be described. When the OS 70 is activated and the explorer 75 is activated, the explorer 75 issues an inquiry command to the OS kernel 73 via the file system 72. All SCSI commands including the inquiry command are issued to the SCSI command processing entrance 79 virtually provided in the OS kernel 73. When the inquiry command is issued, the corresponding CDB (here, CDB (0); Table 2) is transmitted to the reader / writer 2, and the reader / writer 2 receives the model, device name, SCSI-ID, Inquiry data (in this case, S / I data (Table 3)) including configuration information such as presence / absence of LUN (Logical Unit Number) and memory card type is created and returned to the PC 3. Thereby, the reader / writer 2 is recognized.

リーダライタ2が認識されると、GUI71によってエクスプローラ75上にリーダライタ2のドライブアイコンが生成される。そして、ユーザーがマウスなどを用いて上記ドライブアイコンにアクセスするなどして、データの読出指示が入力されると、エクスプローラ75はファイルシステム72に働きかけて、OSカーネル73に対してReadコマンド(SCSIコマンドの一例)を発行させる。一方、同様に、書込指示を入力すると、OSカーネル73に対してWriteコマンド(SCSIコマンドの一例)を発行させる。これらのコマンドデータがUSBなどのI/Fを介してリーダライタ2に転送され、該コマンドに従った読み出し若しくは書き込みがリーダライタ2側で実行される。なお、上記InquiryコマンドはPC3にリーダライタ2が接続されたときや、リーダライタ2が接続された状態でPC3の電源がリセットされたときにも発行される。   When the reader / writer 2 is recognized, a drive icon of the reader / writer 2 is generated on the explorer 75 by the GUI 71. When a data read instruction is input, for example, when the user accesses the drive icon using a mouse or the like, the explorer 75 works on the file system 72 to read the OS kernel 73 with a Read command (SCSI command). Issue an example). On the other hand, similarly, when a write instruction is input, a write command (an example of a SCSI command) is issued to the OS kernel 73. These command data are transferred to the reader / writer 2 via an I / F such as a USB, and reading or writing according to the command is executed on the reader / writer 2 side. The Inquiry command is also issued when the reader / writer 2 is connected to the PC 3 or when the power of the PC 3 is reset while the reader / writer 2 is connected.

次に、R/Wアプリケーション76からリーダライタ2にアクセスする場合について説明する。R/Wアプリケーション76が起動されると、OSカーネル73に対してR/Wアプリケーションにのみデータバスを開放する要求が出される。OSカーネル73はこの要求を受けてR/Wアプリケーション76にデータバスを占有させる。換言すれば、ファイル72からSCSIコマンド処理入口79に対して発行されたSCSIコマンドを該SCSIコマンド処理入口79で受け入れないようにする。従って、R/Wアプリケーション76の起動中は、ファイルシステム72はリーダライタ2へアクセスできなくなる。また、R/Wアプリケーション76が起動されると、GUI71によってR/Wアプリケーション76でプログラムされた入力画面(ユーザインターフェース画面)がディスプレイ上に表示される。また、ドライバソフト74によって、InquiryコマンドがOSカーネル73に発行されて、その応答情報であるInquiryデータ(この場合、表3のS/Iデータ)の返信により、リーダライタ2の型式やデバイス名などの構成情報が取得される。これにより、リーダライタ2が認識される。その後、ドライバソフト74によってOSカーネル73に対して出されたReadコマンドやWriteコマンドに従って、リーダライタ2側でデータの読み出し若しくは書き込みが実行される。   Next, a case where the reader / writer 2 is accessed from the R / W application 76 will be described. When the R / W application 76 is activated, a request to release the data bus only to the R / W application is issued to the OS kernel 73. In response to this request, the OS kernel 73 makes the R / W application 76 occupy the data bus. In other words, the SCSI command issued from the file 72 to the SCSI command processing entrance 79 is not accepted by the SCSI command processing entrance 79. Therefore, the file system 72 cannot access the reader / writer 2 while the R / W application 76 is activated. When the R / W application 76 is activated, an input screen (user interface screen) programmed by the R / W application 76 is displayed on the display by the GUI 71. Also, the driver software 74 issues an inquiry command to the OS kernel 73, and returns the inquiry data (in this case, S / I data in Table 3) as response information. Configuration information is acquired. Thereby, the reader / writer 2 is recognized. Thereafter, reading or writing of data is executed on the reader / writer 2 side in accordance with a Read command or a Write command issued to the OS kernel 73 by the driver software 74.

リーダライタ2の認識は次のようにして行われる。すなわち、まず、OSカーネル73に対してInquiryコマンドを発行した際に生成されるCDB(0)(表2)をリーダライタ2に送信する。該CDB(0)を受信したリーダライタ2側では、CDB(0)に含まれる種々の情報を参照して、該情報に従った構成情報を生成し、該構成情報を含むS/Iデータ(表3)をPC3へ返信する。この返信されたS/Iデータに基づき、リーダライタ2が認識される。   Recognition of the reader / writer 2 is performed as follows. That is, first, CDB (0) (Table 2) generated when an inquiry command is issued to the OS kernel 73 is transmitted to the reader / writer 2. The reader / writer 2 that has received the CDB (0) refers to various information included in the CDB (0), generates configuration information according to the information, and generates S / I data including the configuration information ( Table 3) is returned to PC3. The reader / writer 2 is recognized based on the returned S / I data.

なお、リーダライタ2(ターゲット:周辺装置)上のいずれかのスロット(あるいは外部メモリ入出力制御部:ロジカルユニット)上で、メモリーカードの交換(つまり、事象や状態の変化)がなされると、PC3(イニシエータ)に通知するためのユニット・アテンション・コンディションが生成される。PC3のファイルシステムは、このユニット・アテンション・コンディションを参照してメモリーカードの交換を認識し、FAT(ファイル・アロケーション・テーブル)等のファイル情報の更新を行なう。このようなユニット・アテンション・コンディションを保留中のロジカルユニットに向けてInquiryコマンドが発行された場合、該ロジカルユニットは保留中のユニット・アテンション・コンディションをクリアせずに、Inquiryコマンドを実行する。つまり、Inquiryコマンドが実行された場合でも、該ユニット・アテンション・コンディションに反映されているメモリーカードの交換通知情報は消去されずに保持されるので、PC3のファイルシステムは、交換後のメモリーカードに対するアクセスを問題なく行なうことができる。   When a memory card is exchanged (that is, an event or a state is changed) on any slot (or external memory input / output control unit: logical unit) on the reader / writer 2 (target: peripheral device), A unit attention condition for notifying the PC 3 (initiator) is generated. The file system of the PC 3 recognizes the exchange of the memory card with reference to the unit attention condition, and updates file information such as FAT (file allocation table). When an inquiry command is issued toward a logical unit that is holding such a unit attention condition, the logical unit executes the inquiry command without clearing the pending unit attention condition. That is, even when the inquiry command is executed, the replacement notification information of the memory card reflected in the unit attention condition is not erased and is retained. Access can be performed without problems.

次に、リーダライタ2のより具体的な動作について、図8のフローチャートを用いて説明する。なお、以下の説明では、1つのスロットに対する処理についてのみ行っている。複数のスロットに対しては、当該処理が割り込み処理により並列して行われる。CPU27は、PC3からUSBケーブルを介して供給される電源(バスパワー)によりONされると(T1)、USBチップ32からの割り込みを許可する状態となる(T2)。USBチップ32では、PC3側からUSBバス上を伝送してきたコマンドを、USBプロトコルエンジン321及びUSBコントロール部331の動作によって送受信部341へ転送する。なお、ここではまだ、コマンドを受け取ったことを示すレスポンスを返さない。   Next, a more specific operation of the reader / writer 2 will be described using the flowchart of FIG. In the following description, only processing for one slot is performed. For a plurality of slots, the processing is performed in parallel by interrupt processing. When the CPU 27 is turned on by the power (bus power) supplied from the PC 3 via the USB cable (T1), the CPU 27 enters a state of permitting an interrupt from the USB chip 32 (T2). In the USB chip 32, the command transmitted from the PC 3 side on the USB bus is transferred to the transmission / reception unit 341 by the operation of the USB protocol engine 321 and the USB control unit 331. Note that no response indicating that a command has been received is returned yet.

送受信部341は、コマンドを受け取ると、ステータスレジスタ82の「コマンド受信完了」bitを1にし、CPU27に割り込みを掛ける。この場合、CPU27は、ステータスレジスタ82を参照することで何のための割り込みなのかを把握することができる。また、受け取ったコマンドは、SCSIコマンドバッファ83に格納される。   When receiving the command, the transmission / reception unit 341 sets the “command reception completion” bit of the status register 82 to 1 and interrupts the CPU 27. In this case, the CPU 27 can grasp what the interrupt is for by referring to the status register 82. The received command is stored in the SCSI command buffer 83.

CPU27は、割り込みがあり(T3:YES)、SCSIコマンドの受信が完了すると(T4:YES)、送受信部341が受け取ったコマンドの解釈を行なう(T5)。すなわち、CPU27は、送受信部341のステータスレジスタ82を参照し、送受信部341がコマンドを受け取ったことを知ると、SCSIコマンドバッファ83からコマンドを取得して、それを解釈する。これにより、CPU27は、SCSIデータの有無や伝送方向、大きさを把握する。   When there is an interrupt (T3: YES) and the reception of the SCSI command is completed (T4: YES), the CPU 27 interprets the command received by the transmission / reception unit 341 (T5). That is, when the CPU 27 refers to the status register 82 of the transmission / reception unit 341 and knows that the transmission / reception unit 341 has received a command, the CPU 27 acquires the command from the SCSI command buffer 83 and interprets it. Thereby, the CPU 27 grasps the presence / absence, transmission direction, and size of the SCSI data.

CPU27は、コマンドの解釈によって、SCSIデータが無いと把握した場合(例えば、InquiryコマンドやTest Unit Readyコマンドの場合)およびSCSIデータの伝送方向がデバイス→PC(送信)であると把握した場合(例えば、Readコマンドの場合)には(T6:YES)、送受信部341のコントロールレジスタ81の「コマンド受付完了」bitと「ステータスレジスタクリア」bitに1を書き込む(T7)。   When the CPU 27 recognizes that there is no SCSI data by interpreting the command (for example, in the case of an inquiry command or a test unit ready command) and when it determines that the transmission direction of the SCSI data is device → PC (transmission) (for example, In the case of a Read command) (T6: YES), 1 is written to the “command acceptance complete” bit and “status register clear” bit of the control register 81 of the transmission / reception unit 341 (T7).

送受信部341は、T7で「コマンド受付完了」bitに1が書き込まれた時点で、PCに対してコマンドを受け取ったことを示すレスポンスを返す。ここで、PC3側は、レスポンスを受け取ると、SCSIデータが無い場合には次がSCSIステータスの受信で、SCSIデータの伝送方向がデバイス→PCである場合には次がSCSIデータの受信であるので、デバイス待ちの状態に遷移する。   The transmission / reception unit 341 returns a response indicating that the command has been received to the PC when 1 is written in the “command acceptance complete” bit in T7. Here, when the response is received, the PC 3 side receives the SCSI status if there is no SCSI data, and if the SCSI data transmission direction is device → PC, the next is reception of the SCSI data. Transition to a device waiting state.

他方、CPU27は、コマンドの解釈によって、SCSIデータの伝送方向がPC→デバイス(受信)であると把握した場合(例えば、Writeコマンドの場合)には(T6:NO)、PC3からのSCSIデータを受信する準備をする(T8)。具体的には、RAM29上に受信に必要な領域を確保し、その先頭アドレスをSCSIデータDMAアドレスレジスタ85に書き込み、受信するバイト数をSCSIデータDMAカウントレジスタ86に書き込む。その後、送受信部341のコントロールレジスタ81の「コマンド受付完了」bitと「ステータスレジスタクリア」bitに1を書き込む(T9)。   On the other hand, when the CPU 27 recognizes that the SCSI data transmission direction is PC → device (reception) by interpreting the command (for example, in the case of the Write command) (T6: NO), the CPU 27 receives the SCSI data from the PC3. Prepare to receive (T8). Specifically, an area necessary for reception is secured on the RAM 29, the head address is written in the SCSI data DMA address register 85, and the number of received bytes is written in the SCSI data DMA count register 86. Thereafter, 1 is written in the “command acceptance complete” bit and “status register clear” bit of the control register 81 of the transmission / reception unit 341 (T9).

送受信部341は、T9で「コマンド受付完了」bitに1が書き込まれた時点で、PC3に対してコマンドを受け取ったことを示すレスポンスを返す。ここで、PC3側は、レスポンスを受け取ると、デバイス側でコマンドを解釈してSCSIデータを受け取る準備が出来たと認識して、SCSIデータの送信を開始する。   The transmission / reception unit 341 returns a response indicating that the command has been received to the PC 3 when 1 is written in the “command acceptance complete” bit in T9. Here, when receiving the response, the PC 3 side interprets the command on the device side and recognizes that it is ready to receive the SCSI data, and starts transmission of the SCSI data.

そして、送受信部341は、SCSIデータDMAカウントレジスタ86が0になった時点で、ステータスレジスタ82の「データ受信完了」bitを1にし、CPU27に割り込みを掛ける。   Then, when the SCSI data DMA count register 86 becomes 0, the transmission / reception unit 341 sets the “data reception completion” bit of the status register 82 to 1 and interrupts the CPU 27.

CPU27は、割り込みがあると(T10:YES)、送受信部341のコントロールレジスタ81の「データ受取完了」bitと「ステータスレジスタクリア」bitに1を書き込んで、SCSIデータの受信を完了する(T11:YES)。ここで、PC3側は、SCSIデータがデバイスに到達されたことが通知され、次がSCSIステータスの受信であるので、デバイス待ちの状態に遷移する。   When there is an interrupt (T10: YES), the CPU 27 writes 1 to the “data reception completion” bit and the “status register clear” bit of the control register 81 of the transmission / reception unit 341 to complete the reception of the SCSI data (T11: YES). Here, the PC 3 side is notified that the SCSI data has arrived at the device, and the next is the reception of the SCSI status.

T7およびT11(YES)の後には、CPU27は、コマンドを実行する(T12)。例えばTest Unit Readyコマンドなら、第1〜第4メモリーカード11〜14が挿入されているか否かを判断する。例えばReadコマンドなら、第1〜第4メモリーカード11〜14からデータを読み出す。例えばWriteコマンドなら、この時点で書き込むべきデータをPC3から受け取っているので(上述のT8〜T11)、それを第1〜第4メモリーカード11〜14に書き込む。   After T7 and T11 (YES), the CPU 27 executes the command (T12). For example, if it is a Test Unit Ready command, it is determined whether or not the first to fourth memory cards 11 to 14 are inserted. For example, in the case of a Read command, data is read from the first to fourth memory cards 11 to 14. For example, in the case of the Write command, since data to be written is received from the PC 3 at this time (T8 to T11 described above), it is written to the first to fourth memory cards 11 to 14.

次に、CPU27は、SCSIデータの伝送方向がデバイス→PC(送信)である場合(例えば、Readコマンドの場合)には(T13:YES)、読み出したデータをPC3へ送信する準備をする(T14)。具体的には、RAM29上に送信に必要な領域を確保して読み出したデータを格納するとともに、その先頭アドレスをSCSIデータDMAアドレスレジスタ85に書き込み、受信するバイト数をSCSIデータDMAカウントレジスタ86に書き込む。そして、送受信部341のコントロールレジスタ81の「データ送信開始」bitに1を書き込む。   Next, when the SCSI data transmission direction is device → PC (transmission) (for example, in the case of a Read command) (T13: YES), the CPU 27 prepares to transmit the read data to the PC 3 (T14). ). Specifically, the read data is stored in the RAM 29 while securing an area necessary for transmission, the head address is written in the SCSI data DMA address register 85, and the number of received bytes is stored in the SCSI data DMA count register 86. Write. Then, 1 is written in the “data transmission start” bit of the control register 81 of the transmission / reception unit 341.

送受信部341は、T14で「データ送信開始」bitに1が書き込まれた時点で、PC3へSCSIデータの転送を開始する。そして、送受信部341は、SCSIデータの転送が終わったら、ステータスレジスタ82の「データ送信完了」bitを1にし、CPU27に割り込みを掛ける。   The transmission / reception unit 341 starts transferring SCSI data to the PC 3 when 1 is written in the “data transmission start” bit in T14. Then, when the transfer of the SCSI data is completed, the transmission / reception unit 341 sets the “data transmission completion” bit of the status register 82 to 1 and interrupts the CPU 27.

CPU27は、割り込みがあると(T15:YES)、SCSIデータの転送が終わったことを把握するので、送受信部341のコントロールレジスタ81の「ステータスレジスタクリア」bitに1を書き込んで、SCSIデータの送信を完了する(T16:YES)。   When there is an interrupt (T15: YES), the CPU 27 grasps that the transfer of the SCSI data is finished, so write 1 in the “status register clear” bit of the control register 81 of the transmission / reception unit 341 to transmit the SCSI data. Is completed (T16: YES).

T13(NO)およびT16(YES)の後には、CPU27は、SCSIステータスの送信を開始する(T17)。具体的には、CPU27は、上記処理の中で、PC3に返すべきステータスを既に決定しているので、そのステータスをSCSIステータスバッファ84に書き込み、送受信部341のコントロールレジスタ81の「ステータス送信開始」bitに1を書き込んで、SCSIステータスの送信を開始する。   After T13 (NO) and T16 (YES), the CPU 27 starts transmission of the SCSI status (T17). Specifically, since the CPU 27 has already determined the status to be returned to the PC 3 in the above processing, the status is written in the SCSI status buffer 84 and “status transmission start” in the control register 81 of the transmission / reception unit 341 is written. Write 1 to bit and start sending SCSI status.

送受信部341は、T17で「ステータス送信開始」bitに1が書き込まれた時点で、PC3へSCSIステータスの送信を開始する。そして、送受信部341は、PC3側からSCSIステータスを受け取ったレスポンスを受けると、ステータスレジスタ82の「ステータス送信完了」bitを1にし、CPU27に割り込みを掛ける。   The transmission / reception unit 341 starts transmission of the SCSI status to the PC 3 when 1 is written in the “status transmission start” bit in T17. Upon receiving the response that received the SCSI status from the PC 3 side, the transmission / reception unit 341 sets the “status transmission completion” bit of the status register 82 to 1 and interrupts the CPU 27.

CPU27は、割り込みがあると(T18:YES)、SCSIステータスの送信が終わったことを把握するので、送受信部341のコントロールレジスタ81の「ステータスレジスタクリア」bitに1を書き込んで、SCSIデータの送信を完了する(T19:YES)。これにより、送受信部341のステータスレジスタ82がクリアされて、元の状態に戻る。   When there is an interrupt (T18: YES), the CPU 27 grasps that the transmission of the SCSI status is finished. Therefore, the CPU 27 writes 1 to the “status register clear” bit of the control register 81 of the transmission / reception unit 341 to transmit the SCSI data. Is completed (T19: YES). As a result, the status register 82 of the transmission / reception unit 341 is cleared, and the original state is restored.

次に、本通信システム1において、Inquiryデータを用いた本発明の主要機能に係るデータ通信処理の流れの一例について説明する。なお、各ステップにおける処理(請求項に記載した機能実現手段)は、PC3のCPU41あるいはマルチリーダライタ2のCPU27によって各構成部が制御されることにより行われる。図9は、主処理の流れを示すフローチャートである。すなわち、PC3にマルチリーダライタ2が接続され、各装置に電源が投入されると、まず、PC3に接続されている不明なデバイスに対してドライブを割り当てるドライブ割当処理(S1)が実行される。本実施形態では、デバイスとしてマルチリーダライタ2だけが接続されているため、これのみにドライブが割り当てられる。   Next, an example of the flow of data communication processing according to the main function of the present invention using inquiry data in the communication system 1 will be described. Note that the processing in each step (function implementation means described in claims) is performed by each component being controlled by the CPU 41 of the PC 3 or the CPU 27 of the multi-reader / writer 2. FIG. 9 is a flowchart showing the flow of main processing. That is, when the multi-reader / writer 2 is connected to the PC 3 and each apparatus is powered on, first, a drive allocation process (S1) for allocating a drive to an unknown device connected to the PC 3 is executed. In this embodiment, since only the multi-reader / writer 2 is connected as a device, a drive is assigned only to this.

次に、ユーザーによって選択されたドライブを通信相手として設定するドライブ設定処理(S2)が行われる。ドライブが設定されると、設定されたドライブに対応するデバイス(本実施形態ではマルチリーダライタ2)が通信相手として認識される。そして、マルチリーダライタ2へのメモリーカード11〜14に対するセキュリティ処理(S3)が実施される。該主処理ルーチンは、起動管理タイマールーチンから定期的に出される起動トリガを用いる等により、一定の時間間隔(例えば100ms〜1000ms:例えば500ms)で繰り返し定常的に実行される。   Next, drive setting processing (S2) for setting the drive selected by the user as the communication partner is performed. When the drive is set, a device (multi-reader / writer 2 in the present embodiment) corresponding to the set drive is recognized as a communication partner. Then, the security processing (S3) for the memory cards 11 to 14 to the multi-reader / writer 2 is performed. The main processing routine is repeatedly and regularly executed at regular time intervals (for example, 100 ms to 1000 ms: 500 ms, for example) by using a start trigger periodically issued from the start management timer routine.

図10は、PC3においてCPU41により実行されるドライブ割当処理(S1)の詳細を示すものである。まず、参照されるドライブ(以下「参照ドライブ」と称する)がAドライブに初期設定される(S101)。該参照ドライブは、PC3側で割り当て可能なドライブのことを意味するものであって、該ドライブが複数存在する場合はドライブの割り当て処理時に昇順で参照される。参照ドライブは、PC3のWIN2000のOSカーネルで管理されている。本実施形態では、割り当て可能なドライブ数をA〜Zの26個としている。   FIG. 10 shows the details of the drive allocation process (S1) executed by the CPU 41 in the PC 3. First, a drive to be referred (hereinafter referred to as “reference drive”) is initialized to A drive (S101). The reference drive means a drive that can be allocated on the PC 3 side, and when there are a plurality of the drives, they are referred to in ascending order during the drive allocation process. The reference drive is managed by the OS kernel of WIN2000 of PC3. In the present embodiment, the number of drives that can be allocated is 26 from A to Z.

参照ドライブが設定されると、次に、CPU41によって、ドライブが割り当てられるデバイスからS/Iデータを返信させるためのInquiryコマンド(以下「Inq(0)コマンド」と称する)が参照ドライブに対して発行される(S102)。実際には、CPU41によって該Inq(0)コマンドがOSカーネルに対して発行され、該OSカーネルにおいて該Inq(0)コマンドが参照ドライブに発行されたものとして取り扱われる。そして、OSカーネルにより、EVPD領域が“0”に設定されたCDB(0)が生成されて、参照ドライブに関連づけられた不明デバイスに送信される。SCSI規格では、EVPD領域が“0”に設定されている場合はS/Iデータを返信するよう定義されている。CDB(0)の具体例は、前述のごとく表2に示している。なお、表2のデータ欄には、各データが16進数表記で示されている。本明細書において特に明示しない限り、データ欄は全て16進数表記で示すものとする。   When the reference drive is set, the CPU 41 issues an inquiry command (hereinafter referred to as “Inq (0) command”) for returning S / I data from the device to which the drive is assigned to the reference drive. (S102). Actually, the CPU 41 issues the Inq (0) command to the OS kernel, and the OS kernel treats the Inq (0) command as being issued to the reference drive. Then, a CDB (0) in which the EVPD area is set to “0” is generated by the OS kernel and transmitted to the unknown device associated with the reference drive. The SCSI standard defines that S / I data is returned when the EVPD area is set to “0”. Specific examples of CDB (0) are shown in Table 2 as described above. In the data column of Table 2, each data is shown in hexadecimal notation. Unless otherwise specified in this specification, all data fields are shown in hexadecimal notation.

参照ドライブに関連づけられたデバイスが存在する場合であって、該デバイスがSCSIコマンドを処理することができるデバイス(SCSIコマンド対応デバイス)である場合は、該デバイスからS/Iデータが返信される。一方、デバイスが存在しない場合、あるいは存在していても該デバイスがSCSIコマンドを処理することができない場合(SCSIコマンド非対応デバイス)は、該デバイスからS/Iデータは返信されない。S103では、S/Iデータの返信の有無に基づいてCPU41によってエラー判定が行われる(S103)。具体的には、S/Iデータの返信がない場合はエラーと判定される(S103のYes側)。この場合、その後の処理はステップS107に進む。また、S/Iデータの返信がある場合はエラーと判定されない(S103のNo側)。すなわち、当該参照ドライブに関連づけられたデバイスが存在すると判定される。この場合、その後の処理はステップS104に進む。   If there is a device associated with the reference drive and the device is a device that can process a SCSI command (a SCSI command compatible device), S / I data is returned from the device. On the other hand, when the device does not exist or when the device cannot process the SCSI command (device that does not support the SCSI command), the S / I data is not returned from the device. In S103, the CPU 41 makes an error determination based on whether or not S / I data is returned (S103). Specifically, when no S / I data is returned, it is determined as an error (Yes in S103). In this case, the subsequent processing proceeds to step S107. Further, when there is a reply of S / I data, it is not determined as an error (No side of S103). That is, it is determined that there is a device associated with the reference drive. In this case, the subsequent processing proceeds to step S104.

S103においてエラーでないと判定されると、返信されたS/Iデータに基づいて、参照ドライブに関連づけられたデバイスが通信対象となり得るデバイスであるかどうか、すなわち、通信可能なデバイスであるかどうかが判定される。本実施形態では、当該ステップは、参照ドライブに関連付けられたデバイスがマルチリーダライタ2であるかどうかを判定するために行われる。また、本実施形態では、マルチリーダライタ2から、表3に示すS/IデータがPC3へ返信されるようになっており、当該ステップにおける判定処理は、返信されたS/Iデータのバイト0の領域やバイト1の領域のデータ、あるいは、バイト8〜15の領域のベンダIDや、バイト16〜31の領域のプロダクトIDなどが、PC3側で予め登録しておいたID情報等と一致しているかどうかによって行われる。当該ステップで、通信可能なデバイスであると判定されると(S104のYes側)、処理はステップS105に進み、通信可能なデバイスではないと判定されると(S104のNo側)、処理はS107に進む。なお、表3中のバイト0領域のデータ「0x00」はダイレクトアクセスデバイスを示し、バイト1の領域のデータ「0x80」は可換カード型記憶メディア(カード型記憶メディア)を示すものである。上述の各バイト領域に記述される内容については、SCSI規格で定義されているため、詳細については、当該規格書を参照されたい。   If it is determined in S103 that there is no error, whether or not the device associated with the reference drive is a device that can be communicated based on the returned S / I data, that is, whether or not it is a communicable device. Determined. In the present embodiment, this step is performed to determine whether or not the device associated with the reference drive is the multi-reader / writer 2. In the present embodiment, the S / I data shown in Table 3 is returned from the multi-reader / writer 2 to the PC 3, and the determination process in this step is byte 0 of the returned S / I data. The data of the area of Byte 1 and the area of Byte 1, the vendor ID of the area of Bytes 8 to 15, the product ID of the area of Bytes 16 to 31 and the like coincide with the ID information registered in advance on the PC 3 side. Done depending on whether or not. If it is determined in this step that the device is communicable (Yes in S104), the process proceeds to step S105. If it is determined that the device is not communicable (No in S104), the process proceeds to S107. Proceed to In Table 3, the data “0x00” in the byte 0 area indicates a direct access device, and the data “0x80” in the byte 1 area indicates a replaceable card type storage medium (card type storage medium). Since the contents described in each byte area are defined in the SCSI standard, refer to the standard for details.

処理がS105に進むと、ここでは、返信されたS/Iデータに基づいて、当該参照ドライブのLUNが“0”であるかどうかがCPU41によって判定される。かかる判定は、S/Iデータにおけるベンダ固有領域のバイト54の領域のデータに基づいて行われる。本実施形態では、上述したように、マルチリーダライタ2から、表3に示すS/IデータがPC3へ返信されるようになっている。また、表3のバイト54領域の備考欄にも記載しているように、マルチリーダライタ2では、S/Iデータを返信する際に、バイト54の領域の上位4ビットに該マルチリーダライタ2の物理的I/Fを示す情報(本実施形態ではUSBであることを示す情報)が格納され、下位4ビットにLUNの番号を格納するようにプログラミングされている。従って、CPU41は、バイト54の領域のデータを参照すれば、LUNの情報を取得することができる。これにより、当該ステップの判定処理を行なうことができる。例えば、バイト54の領域に「0x10」が格納されている場合は、物理的I/FがUSB接続コネクタであって、LUNが0であることが取得され、「0x23」が格納されている場合は、物理的I/FがSCSI接続コネクタであって、LUNが3であることが取得される。   When the process proceeds to S105, the CPU 41 determines whether or not the LUN of the reference drive is “0” based on the returned S / I data. Such a determination is made based on the data in the byte 54 area of the vendor specific area in the S / I data. In the present embodiment, as described above, the S / I data shown in Table 3 is returned from the multi-reader / writer 2 to the PC 3. Further, as described in the remarks column of the byte 54 area in Table 3, when the multi reader / writer 2 returns S / I data, the multi reader / writer 2 is added to the upper 4 bits of the byte 54 area. Information indicating the physical I / F (information indicating USB in this embodiment) is stored, and programming is performed so that the LUN number is stored in the lower 4 bits. Therefore, the CPU 41 can acquire the LUN information by referring to the data in the byte 54 area. Thereby, the determination process of the said step can be performed. For example, when “0x10” is stored in the area of the byte 54, it is acquired that the physical I / F is a USB connector and LUN is 0, and “0x23” is stored. Is obtained that the physical I / F is a SCSI connector and the LUN is 3.

S106では、現在の参照ドライブを対応ドライブリストに追加する処理が実行される。対応ドライブリストは、最終的にドライブが割り当てられる参照ドライブをリストアップしたものである。詳細には、該対応ドライブリストがRAM43の所定の記憶領域に展開されており、該当する参照ドライブが該記憶領域に書き込まれる。その後、処理はS107に進む。   In S106, a process of adding the current reference drive to the corresponding drive list is executed. The corresponding drive list is a list of reference drives to which drives are finally assigned. Specifically, the corresponding drive list is expanded in a predetermined storage area of the RAM 43, and the corresponding reference drive is written in the storage area. Thereafter, the process proceeds to S107.

S107では、参照ドライブがZドライブであるかどうかがCPU41によって判定される。例えば、カウンタメモリなどにドライブの参照順をカウントさせておき、そのカウンタ値をCPU41が監視することにより、現在の参照ドライブがZドライブであるかどうかの判定が可能である。かかる判定は、設定された参照ドライブが最後であるかどうかを判定するために行われる。ここで、参照ドライブがZドライブであると判定されると、参照可能なドライブが存在しないため、続く処理はS109に進む。参照ドライブがZドライブではないと判定されると、参照ドライブを次順のドライブに設定した後に(S108)、S102からの処理がS107においてYesと判定されるまで繰り返し行われる。   In S107, the CPU 41 determines whether or not the reference drive is the Z drive. For example, it is possible to determine whether the current reference drive is the Z drive by causing the counter memory or the like to count the reference order of the drives and monitoring the counter value by the CPU 41. Such determination is performed to determine whether the set reference drive is the last. Here, if it is determined that the reference drive is the Z drive, there is no drive that can be referred to, and therefore the subsequent processing proceeds to S109. If it is determined that the reference drive is not the Z drive, after setting the reference drive as the next drive (S108), the processing from S102 is repeated until it is determined Yes in S107.

処理がS109に進むと、ここでは、対応ドライブリストに基づいてドライブの割り当てがなされる。これにより、一連のドライブ割当処理(S1)が終了する。なお、本実施形態では、外部ストレージデバイスとしてマルチリーダライタ2のみが接続されているため、Aドライブに対してマルチリーダライタ2が割り当てられ、他のドライブには何ら割り当てられないものとする。   When the process proceeds to S109, here, a drive is allocated based on the corresponding drive list. Thereby, a series of drive allocation processes (S1) are complete | finished. In the present embodiment, since only the multi-reader / writer 2 is connected as an external storage device, the multi-reader / writer 2 is assigned to the A drive and is not assigned to any other drive.

続いて、図11は、ドライブ設定処理(S2)の詳細を示すものである。S201では、前記ドライブ割当処理(S1)によって割り当てられたドライブ(以下「対応ドライブ」と称する)が存在するかどうかが判定される(S201)。すなわち、PC3で割当可能なドライブのいずれかに所定のデバイスが割り当てられたかどうかが判定される。本実施形態では、マルチリーダライタ2が割り当てられたAドライブが存在するため、対応ドライブがあると判定される。その後、対応ドライブが1つであるかどうかが判定される(S202)。一方、S201で、対応ドライブが存在しないと判定されると(S201のNo側)、通信対象が存在しないため、処理が終了する。   Next, FIG. 11 shows details of the drive setting process (S2). In S201, it is determined whether there is a drive (hereinafter referred to as “corresponding drive”) allocated by the drive allocation process (S1) (S201). That is, it is determined whether or not a predetermined device is assigned to any of the drives that can be assigned by the PC 3. In the present embodiment, since there is an A drive to which the multi-reader / writer 2 is assigned, it is determined that there is a corresponding drive. Thereafter, it is determined whether there is one corresponding drive (S202). On the other hand, if it is determined in S201 that the corresponding drive does not exist (No side in S201), the process ends because there is no communication target.

S202で対応ドライブが1つであると判定されると(S202のYes側)、当該対応ドライブが通信対象として設定される(S205)。すなわち、当該対応ドライブに関連付けられたデバイスが通信対象に設定される。なお、本実施形態では、Aドライブが通信対象として設定される。換言すれば、マルチリーダライタ2が通信対象のデバイスとして設定される。   If it is determined in S202 that there is one corresponding drive (Yes in S202), the corresponding drive is set as a communication target (S205). That is, a device associated with the corresponding drive is set as a communication target. In the present embodiment, the A drive is set as a communication target. In other words, the multi-reader / writer 2 is set as a communication target device.

一方、対応ドライブが複数存在すると判定された場合は(S202のNo側)、対応ドライブを示すアイコンをダイアログ表示させる(S203)。その後、ユーザーからいずれかのアイコンが選択されることによって所望の対応ドライブが選択されると(S204)、選択された対応ドライブが通信対象として設定される(S205)。なお、いずれのアイコンも選択されない場合であっても、例えば、対応ドライブごとに優先度が設定されている場合は、最も優先度の高い対応ドライブが通信対象に自動的に設定される。これにより、一連のドライブ設定処理(S2)が終了する。   On the other hand, when it is determined that there are a plurality of corresponding drives (No in S202), an icon indicating the corresponding drive is displayed in a dialog (S203). Thereafter, when a desired corresponding drive is selected by selecting any icon from the user (S204), the selected corresponding drive is set as a communication target (S205). Even when no icon is selected, for example, when a priority is set for each corresponding drive, the corresponding drive with the highest priority is automatically set as a communication target. Thereby, a series of drive setting processes (S2) are complete | finished.

次に、セキュリティ処理(S3)について説明する。図2においてマルチリーダライタ2のROM28には、前述の認証手段の機能を実現するための認証ファームウェアが格納されている。図15は、メモリーカードの記憶エリアの構成例を示すものである。該記憶エリアは、認証手段によりアクセス権の認証が棄却された場合でもPC3側からのアクセスが可能なノーマルエリアと、認証手段によりアクセス権の認証が受理された場合にのみPC3側からのアクセスが可能なセキュリティエリアとに分かれている。また、カード型記憶メディアへのアクセスモードは、ノーマルエリアにのみアクセスが可能なノーマルモードと、セキュリティエリアにアクセスが可能なセキュリティモードとのいずれかに設定されるものであり、認証ファームウェアは、認証手段による認証結果が受理認証であった場合にのみ、アクセスモードをセキュリティモードに設定する処理も行なう。   Next, the security process (S3) will be described. In FIG. 2, the ROM 28 of the multi-reader / writer 2 stores authentication firmware for realizing the function of the authentication means described above. FIG. 15 shows a configuration example of the storage area of the memory card. The storage area includes a normal area that can be accessed from the PC 3 side even when the access right authentication is rejected by the authentication means, and an access from the PC 3 side only when the access right authentication is accepted by the authentication means. It is divided into possible security areas. In addition, the access mode to the card-type storage medium is set to either the normal mode that allows access only to the normal area or the security mode that allows access to the security area. Only when the authentication result by the means is acceptance authentication, processing for setting the access mode to the security mode is also performed.

セキュリティ参照情報は暗号化キーとして使用されるパスワードであり、例えば、PC3のキーボード57から入力されるものである。他方、マルチリーダライタ2は照合用元データをセキュリティーマスター情報として保有する。具体的には、照合用元データは、固定データとして例えばROM28に記憶しておくことができる。図15においてメモリーカードには照合用データ格納領域が形成され、ここに上記パスワードを暗号化キーとして上記照合用元データを暗号化した情報が照合用データとして書き込まれる。そして、PC3側から受信した(つまり、PC3側でユーザーが入力したパスワード)暗号化キーで該照合データを復号化した情報を照合対象情報とし、該照合対象情報が、マルチリーダライタ2側の照合用元データ(固定データであるセキュリティーマスター情報)と照合一致した場合に受理認証とし、照合不一致の場合に棄却認証とする処理が行なわれる。受理認証に場合にはセキュリティエリア(あるいはノーマルエリアとセキュリティエリア)のセクタへのアクセスが許可され、棄却認証の場合にはノーマルエリアのセクタへのみアクセスが許可される。なお、パスワードを固定データとなる照合用元データの暗号化キーとして用いず、パスワード自体を照合用データとして直接メモリーカードに書き込む簡便な形態を採用することも可能である。この場合は、正しいパスワードがセキュリティーマスター情報としてROM28に記憶され、照合に供される。しかし、上記のように、マルチリーダライタ2内の固定化された照合用元データを、パスワードをキーとして暗号化したものを照合用データとメモリーカードに書き込み、照認証に供するようにすれば、ユーザーが入力するパスワードがメモリーカードに書き込まれないのでセキュリティ性が高められる。   The security reference information is a password used as an encryption key, and is input from the keyboard 57 of the PC 3, for example. On the other hand, the multi reader / writer 2 holds the original data for verification as security master information. Specifically, the collation original data can be stored in the ROM 28 as fixed data, for example. In FIG. 15, a verification data storage area is formed in the memory card, and information obtained by encrypting the verification original data using the password as an encryption key is written as verification data. The information received by decrypting the verification data with the encryption key received from the PC 3 side (that is, the password input by the user on the PC 3 side) is used as verification target information, and the verification target information is the verification information on the multi-reader / writer 2 side. A process of accepting authentication when matching with original data (security master information, which is fixed data), and rejecting authentication when matching does not match is performed. In the case of acceptance authentication, access to the sector in the security area (or normal area and security area) is permitted, and in the case of rejection authentication, access to only the sector in the normal area is permitted. It is also possible to adopt a simple form in which the password itself is directly written in the memory card as the verification data without using the password as the encryption key of the verification original data that is fixed data. In this case, the correct password is stored as security master information in the ROM 28 and used for verification. However, as described above, if the verification source data fixed in the multi-reader / writer 2 is encrypted using the password as a key, the verification data and the memory card are written and used for verification. Since the password entered by the user is not written to the memory card, security is improved.

図12は、セキュリティ処理のPC3側の流れを、図12Bはマルチリーダライタ2側の流れをそれぞれ示すものである。まず、PC3側において、マルチリーダライタ2から、現在のアクセスモードの設定状態の報告にかかるVPD(Vital Product Data)を該マルチリーダライタ2に返信させるためのInquiryコマンド(以下「Inq(1)コマンド」と称する)(その1)がAドライブに対して発行される(S301)。実際には、該Inq(1)コマンドが、OSカーネル73に対して発行され、該OSカーネル73によってAドライブに対して発行されたものとして取り扱われる。上記Inq(1)コマンドが発行されると、OSカーネル73によって、EVPD領域が“1”に設定されたCDB(1)が生成されて、Aドライブに関連づけられたマルチリーダライタ2にUSBケーブル25を介して送信される。このとき生成されるCDB(1)を表4に示す。すなわち、該CDB(1)のバイト2の領域にはページコード「0xE0」が記述されている。   12 shows the flow on the PC 3 side of the security processing, and FIG. 12B shows the flow on the multi-reader / writer 2 side. First, on the PC 3 side, an inquiry command (hereinafter referred to as an “Inq (1) command) for returning a VPD (Vital Product Data) related to reporting of the current access mode setting state from the multi-reader / writer 2 to the multi-reader / writer 2. (No. 1) is issued to the A drive (S301). Actually, the Inq (1) command is issued to the OS kernel 73 and is treated as being issued to the A drive by the OS kernel 73. When the Inq (1) command is issued, the OS kernel 73 generates a CDB (1) in which the EVPD area is set to “1”, and the USB cable 25 is connected to the multi-reader / writer 2 associated with the A drive. Sent through. Table 4 shows the CDB (1) generated at this time. That is, the page code “0xE0” is described in the byte 2 area of the CDB (1).

CDB(1)のバイト4の領域、すなわちアロケーション長領域には「0x10」(2進数表記では「00010000」)が格納されている。本来、アロケーション長領域には、接続されたデバイスに要求するデータ長が格納される。本実施の形態では、マルチリーダライタ2のアロケーション長の最大値が予め固定長(ここでは、仮に15バイトとしているが、これに限定されるものではない)に設定されている。この“15”という数は下位4ビットで表現できる。SCSI規格に従えば、マルチリーダライタ2において設定された上記最大値以上の数値がアロケーション長として指定されたとしても、マルチリーダライタ2のアロケーション長は上記最大値、すなわち、15バイトに設定される。従って、アロケーション長領域に「0x10」が記述されていても、また、「0x11」以上が記述されていても、アロケーション長は15バイトに設定される。これは、アロケーション長領域のデータのうち、上位4ビットのいずれかのビットが「1」である場合は、該アロケーション長領域のデータを(アロケーション長の設定値に兼用された)任意のデータ(付加情報)として自由に使用することができるということを意味する。すなわち、上位4ビットのいずれかのビットを「1」とすることにより、アロケーション長領域における当該ビット以外のビットを、いわば仮想的な空き領域として確保することができる。このように確保された仮想的な空き領域に任意のデータを付加することで、PC3とマルチリーダライタ2との間で、上記付加情報に係るデータ通信が可能となるのである。   In the area of byte 4 of the CDB (1), that is, the allocation length area, “0x10” (“00010000” in binary notation) is stored. Originally, the data length required for the connected device is stored in the allocation length area. In the present embodiment, the maximum value of the allocation length of the multi-reader / writer 2 is set in advance to a fixed length (here, it is assumed to be 15 bytes, but is not limited to this). This number “15” can be expressed by the lower 4 bits. According to the SCSI standard, the allocation length of the multi-reader / writer 2 is set to the maximum value, that is, 15 bytes even if a numerical value greater than or equal to the maximum value set in the multi-reader / writer 2 is designated as the allocation length. . Therefore, even if “0x10” is described in the allocation length area, or “0x11” or more is described, the allocation length is set to 15 bytes. This means that if any one of the upper 4 bits of the allocation length area data is “1”, the data in the allocation length area is any data (also used as the setting value of the allocation length). It means that it can be used freely as additional information). That is, by setting any one of the upper 4 bits to “1”, bits other than the bit in the allocation length area can be reserved as a virtual free area. By adding arbitrary data to the virtual empty area secured in this way, data communication according to the additional information can be performed between the PC 3 and the multi-reader / writer 2.

なお、上記アロケーション長は常に固定長(ここでは15バイト)に設定されるのではなく、CDB(1)のページコードに応じてその最大値が設定されるようにしてもよい。例えば、ページコード「0xE0」の場合は、アロケーション長の最大値が15バイトの固定長に設定され、ページコード「0xE2」の場合は、9バイトの固定長に設定されてもよい。かかる設定処理は、CDB(1)を受信したマルチリーダライタ2のCPU27によってページコードの内容が読み取られ、読み取られた内容に応じて、予めROM28に格納しておいた固定長対応リストから該当する固定長を選定することにより行われる。もちろん、15バイトあるいは9バイトと定めた上記アロケーション長は任意に設定することができる。   The allocation length is not always set to a fixed length (here, 15 bytes), but may be set to a maximum value according to the page code of CDB (1). For example, in the case of the page code “0xE0”, the maximum value of the allocation length may be set to a fixed length of 15 bytes, and in the case of the page code “0xE2”, it may be set to a fixed length of 9 bytes. The setting process corresponds to the fixed length correspondence list stored in the ROM 28 in advance according to the read content of the page code read by the CPU 27 of the multi-reader / writer 2 that has received the CDB (1). This is done by selecting a fixed length. Of course, the allocation length set to 15 bytes or 9 bytes can be arbitrarily set.

表6に、上記アロケーション長領域に確保された空き領域に付加される通信データを類別して示す。各表のデータ内容欄に示すように、各データには、それ自体が何を意味するものであるのかが定義づけられている。具体的には、データ内容欄の記載を参照されたい。なお、表6はページコードが「0xE0」の場合に送信される通信データである。CDB(調査指示データ)において、このページコード(調査指示データ種別識別情報)を変更すれば、アロケーション長最大値や付加情報内容の異なる別の調査指示データフォーマットを生成することができる。   Table 6 shows the classification of communication data added to the empty area secured in the allocation length area. As shown in the data content column of each table, each data defines what it means. Specifically, refer to the description in the data content column. Table 6 shows communication data transmitted when the page code is “0xE0”. If this page code (investigation instruction data type identification information) is changed in CDB (investigation instruction data), another investigation instruction data format having a different allocation length maximum value and additional information content can be generated.

Figure 2008033906
Figure 2008033906

表6の左欄には、アロケーション長領域に記述されるデータそのものが、右欄にはそのデータの意味する内容が示されている。PC3側からマルチリーダライタ2に上記左欄のデータが送信されると、マルチリーダライタ2側では、CPU27により、受信したCDB(1)からアロケーション長領域のデータが抽出され、抽出されたデータの内容が解析され、そして、解析されたデータの内容に従った処理が実行される。なお、表6に示す内容は、テーブルリスト化されて、PC3のHDD44又はROM42と、マルチリーダライタ2のROM28に予め格納されている。   The left column of Table 6 shows the data itself described in the allocation length area, and the right column shows the meaning of the data. When the data in the left column is transmitted from the PC 3 side to the multi-reader / writer 2, on the multi-reader / writer 2 side, the CPU 27 extracts the allocation length area data from the received CDB (1), and the extracted data The contents are analyzed, and processing according to the contents of the analyzed data is executed. The contents shown in Table 6 are made into a table list and stored in advance in the HDD 44 or ROM 42 of the PC 3 and the ROM 28 of the multi-reader / writer 2.

上記S301でInq(1)コマンドが発行されて生成されたCDB(1)には、表4に示すように、アロケーション長領域に「0x10」(付加情報)が記述されている。Inq(1)コマンド(その1)は、PC3からマルチリーダライタ2に対して、アクセスモードが何であるか(ノーマルモード又はセキュリティモード(後述))を対応付加情報として要求するコマンドであることがわかる。同様に、「0x11」はPC3からマルチリーダライタ2に対してノーマルモードへの移行を要求するコマンドであり、「0x13」は同じくセキュリティモードへの移行を要求するコマンドである。   As shown in Table 4, “0x10” (additional information) is described in the CDB (1) generated by issuing the Inq (1) command in S301. It can be seen that the Inq (1) command (part 1) is a command for requesting the access mode (normal mode or security mode (described later)) from the PC 3 to the multi-reader / writer 2 as corresponding additional information. . Similarly, “0x11” is a command that requests the multi-reader / writer 2 to shift to the normal mode from the PC 3, and “0x13” is a command that similarly requests to shift to the security mode.

一方、マルチリーダライタ2側では、送信されたCDB(1)が受信される。その後、CPU27によって、CDB(1)内のアロケーション長領域のデータ「0x10」(付加情報)が抽出される(付加情報抽出手段)。そして、該データに従って、アクセスモードの設定状態を検出する処理が行われる。   On the other hand, on the multi-reader / writer 2 side, the transmitted CDB (1) is received. Thereafter, the CPU 27 extracts the data “0x10” (additional information) of the allocation length area in the CDB (1) (additional information extraction means). Then, processing for detecting the setting state of the access mode is performed according to the data.

アクセスモードの検出が終了すると、その検出結果がCPU27によってPC3へ返信される。該返信処理は、具体的には、CDB(1)の受信後に生成されてPC3へ返信されるVPDに上記検出結果を書き込むことにより行われる。より詳細には、表8に示すように、バイト7の領域にアクセスモードの報告情報が書き込まれる。本実施形態では、アクセスモードがノーマルモードの場合は「0x00」が書き込まれ、セキュリティモードの場合は「0x01」が書き込まれる。なお、表8はノーマルモードの場合のVPDを示す。同様に、バイト8の領域はノーマルモードへの移行完了報告、バイト9の領域はセキュリティモードへの移行完了報告である(いずれも、「0x00」は未完了、「0x01」は完了)。   When the detection of the access mode is completed, the detection result is returned to the PC 3 by the CPU 27. Specifically, the reply process is performed by writing the detection result in the VPD that is generated after receiving the CDB (1) and returned to the PC 3. More specifically, as shown in Table 8, the access mode report information is written in the byte 7 area. In the present embodiment, “0x00” is written when the access mode is the normal mode, and “0x01” is written when the access mode is the security mode. Table 8 shows the VPD in the normal mode. Similarly, the area of byte 8 is a transfer completion report to normal mode, and the area of byte 9 is a transfer completion report to security mode (both “0x00” is incomplete and “0x01” is complete).

Figure 2008033906
Figure 2008033906

続いて、PC3側では、マルチリーダライタ2から返信される表8のVPDを受信して、対応付加情報を取得する。例えば、該VPDのバイト7の領域を参照することにより、マルチリーダライタ2側に設定されているアクセスモードが判定される。以上説明したごとく、PC3側でのInq(1)コマンドの発行及び付加情報が書き込まれたCDB(1)データのマルチリーダライタ2(周辺装置)への送信と、マルチリーダライタ2(周辺装置)側からの該付加データに応答するための対応付加データ(上記の場合、選択確定操作の有無を報告する情報)を書き込んだVPDを返す本発明特有の一連の通信処理を、Inq(1)/VPD付加情報通信と称する。   Subsequently, the PC 3 receives the VPD in Table 8 returned from the multi-reader / writer 2 and acquires the corresponding additional information. For example, the access mode set on the multi-reader / writer 2 side is determined by referring to the byte 7 area of the VPD. As described above, the issue of the Inq (1) command on the PC 3 side, the transmission of the CDB (1) data in which the additional information is written to the multi-reader / writer 2 (peripheral device), and the multi-reader / writer 2 (peripheral device) A series of communication processes peculiar to the present invention for returning a VPD in which corresponding additional data for responding to the additional data from the side (in this case, information for reporting the presence / absence of the selection confirmation operation) is returned. This is referred to as VPD additional information communication.

PC3側では、図14Aに示すようなダイアログボックスが表示され、取得した現在のアクセスモードが領域501に表示される。また、モード選択のためのソフトボタン503,504も表示され、これをマウス等でクリックすることによりアクセスモードの選択入力がなされる。この入力を図12のS302で行なう。ノーマルモードが選択されると、PC3は、図14Dに示すような確認用のダイアログボックス507を表示し、確定ボタン510がクリックされると、モード設定処理に移行する。すなわち、S303に進み、新たなInq(1)コマンド(その2)が発行され、対応するCDB(1)に書き込んだ付加情報によりマルチリーダライタ2へノーマルモードへの移行を要求する。そして、これを受け取ったマルチリーダライタ2はノーマルモードを設定し、設定完了を示す対応付加情報を書き込んだVPDを返す。PC3は、これを受け取り、S304に進んで、図14Aのダイアログボックス507の領域501表示状態を対応するモードのものに更新する。   On the PC 3 side, a dialog box as shown in FIG. 14A is displayed, and the acquired current access mode is displayed in the area 501. Further, soft buttons 503 and 504 for mode selection are also displayed, and an access mode selection input is made by clicking these buttons with a mouse or the like. This input is performed in S302 of FIG. When the normal mode is selected, the PC 3 displays a confirmation dialog box 507 as shown in FIG. 14D. When the confirmation button 510 is clicked, the PC 3 proceeds to the mode setting process. That is, in S303, a new Inq (1) command (part 2) is issued, and the multi-reader / writer 2 is requested to shift to the normal mode by the additional information written in the corresponding CDB (1). Upon receiving this, the multi-reader / writer 2 sets the normal mode and returns a VPD in which the corresponding additional information indicating the completion of setting is written. The PC 3 receives this, advances to S304, and updates the display state of the area 501 in the dialog box 507 of FIG. 14A to that of the corresponding mode.

一方、S302でセキュリティモードを選択する場合、ユーザーはキーボード57等から図14Aのダイアログボックス507のパスワード入力ウィンドウ502にパスワードを入力し、セキュリティボタン504を押す。すると、新たなInq(1)コマンド(その2)が発行され、対応するCDB(1)にパスワードを付加情報として書き込んでマルチリーダライタ2へ送信する。このパスワードは文字列データとしてマルチリーダライタ2へ送信する必要がある。文字列データは、表示対象となる文字に一対一に対応したビットコードデータ(文字コード)であり、JISコード、シフトJISコードあるいはASCIIコードなどの既製のコードをそのまま使用してもよいし、独自のコードを使用してもよい。ただし、周辺装置側の表示用文字データテーブル(例えばROM28内:表示用データ自体は、ビットマップ型あるいはアウトライン型のフォントデータである)が上記既製コードを用いて作成されたものである場合、上記独自コードとの対応関係を示すテーブルを別途周辺装置側にて用意しておき(例えばROM28内)、このテーブルを参照して該独自コードを上記既製コードに変換してから表示に用いるとよい。   On the other hand, when the security mode is selected in S302, the user inputs a password in the password input window 502 of the dialog box 507 in FIG. Then, a new Inq (1) command (part 2) is issued, and the password is written as additional information in the corresponding CDB (1) and transmitted to the multi-reader / writer 2. This password needs to be transmitted to the multi-reader / writer 2 as character string data. The character string data is bit code data (character code) corresponding to the character to be displayed on a one-to-one basis, and an off-the-shelf code such as a JIS code, a shift JIS code, or an ASCII code may be used as it is. May be used. However, if the display character data table on the peripheral device side (for example, in the ROM 28: the display data itself is bitmap type or outline type font data) is created using the off-the-shelf code, A table indicating the correspondence with the unique code may be separately prepared on the peripheral device side (for example, in the ROM 28), and the unique code may be converted into the ready-made code with reference to this table and used for display.

文字列データの送信処理は、以下の処理手順に従って行われる。まず、文字列の先端文字の文字コードアロケーション長として表4のInq(1)コマンドが発行される。このInq(1)コマンドが発行されることにより生成されたCDB(1)データはマルチリーダライタ2へ送信される。なお、Inq(1)コマンドの発行によりマルチリーダライタ2から表8のVPDが返信されてくるが、PC側はこれを受けるだけで特に処理はしない。そして、入力されたパスワード文字列の文字数分だけInq(1)を繰り返す。   Transmission processing of character string data is performed according to the following processing procedure. First, the Inq (1) command shown in Table 4 is issued as the character code allocation length of the leading character of the character string. The CDB (1) data generated by issuing this Inq (1) command is transmitted to the multi-reader / writer 2. Note that the VPD shown in Table 8 is returned from the multi-reader / writer 2 when the Inq (1) command is issued. Then, Inq (1) is repeated for the number of characters of the input password character string.

送信された文字列データはマルチリーダライタ2側で受信され、該受信されたデータがRAM29に格納される。実際には、上記ステップS305(図8参照)で切り出された文字が一つずつ送信される毎に、その文字データが順次RAM29に格納される。   The transmitted character string data is received by the multi-reader / writer 2, and the received data is stored in the RAM 29. Actually, each time the characters cut out in step S305 (see FIG. 8) are transmitted one by one, the character data is sequentially stored in the RAM 29.

S306では、再度、PC3側でInq(1)コマンドが発行され、これにより生成されたCDB(1)データがマルチリーダライタ2へ送信される。このとき生成されるCDB(1)データを表9に示す。表9に示すように、バイト2の領域に「0xE0」が、アロケーション長領域に「0x13」が記述されているため、表6に基づけば、このとき発行されたInq(1)コマンドは、受信したパスワードに基づくセキュリティモードへの移行指令であることが理解できる。   In S306, the Inq (1) command is issued again on the PC 3 side, and the CDB (1) data generated thereby is transmitted to the multi-reader / writer 2. Table 9 shows the CDB (1) data generated at this time. As shown in Table 9, since “0xE0” is described in the byte 2 area and “0x13” is described in the allocation length area, the Inq (1) command issued at this time is It can be understood that this is a command to shift to the security mode based on the password.

Figure 2008033906
Figure 2008033906

マルチリーダライタ2側では、既に説明した方式により認証処理がなされ、受理認証であればアクセスモードをセキュリティモードに設定し、その結果をVPDに書き込んでPC3に返す。PC3は、これを受け取り、S307に進んで、図14Aのダイアログボックス507の領域501表示状態を対応するモードのものに更新する。他方、棄却認証の結果が返ってきた場合は、図14Cのようなセキュリティモードへの移行失敗を報知するダイアログボックス506を表示する。   On the multi-reader / writer 2 side, the authentication process is performed by the method already described. If the authentication is acceptance, the access mode is set to the security mode, and the result is written in the VPD and returned to the PC 3. The PC 3 receives this, advances to S307, and updates the display state of the area 501 in the dialog box 507 of FIG. 14A to that of the corresponding mode. On the other hand, when the result of rejection authentication is returned, a dialog box 506 for notifying the failure to shift to the security mode as shown in FIG. 14C is displayed.

図13は、図12に対応する、マルチリーダライタ2側でのSCSIプロトコルに従う状態遷移タスクの流れを示すものである。S1401ではアクセスモードをノーマルモードに設定する。S1402では、PC3側からセキュリティモードへの移行指示があるかどうかを確認する。YesであればS1403でメモリーカードの装着があるかどうかを確認し、装着がなければS1404に進んでPC3にメモリーカードなしを通知し、S1402に戻る。また、メモリーカードが装着されていればS1405に進み、そのメモリーカードにセキュリティエリアがあるかどうかを判定する。セキュリティエリアなしであればS1406に進んでPC3にセキュリティエリアなしを通知し、S1402に戻る。   FIG. 13 shows a flow of a state transition task according to the SCSI protocol on the multi-reader / writer 2 side corresponding to FIG. In S1401, the access mode is set to the normal mode. In S1402, it is confirmed whether there is an instruction to shift to the security mode from the PC3 side. If Yes, it is checked in step S1403 if a memory card is installed. If not, the process advances to step S1404 to notify the PC 3 that there is no memory card, and the process returns to step S1402. If a memory card is loaded, the process advances to step S1405 to determine whether the memory card has a security area. If there is no security area, the process proceeds to S1406 to notify the PC 3 that there is no security area, and the process returns to S1402.

他方、セキュリティエリアがあればS1407に進み、PC3から受信したパスワードをキーとして照会用データ格納領域の復号化を行い、S1408でこれを照合用元データと照合して、照合不一致であれば棄却認証とし、S1409に進んでPC3にパスワード間違いを通知し、S1402に戻る。他方、照合一致であれば受理認証とし、S1410に進んでPC3にパスワード正解を通知し、S1411でセキュリティモードを設定する。S1412では、PC3からのノーマルモードへの移行指示があるかどうかを確認し、移行指示があればS1401へ返る。移行指示がない場合はS1413へ進み、メモリーカードが抜かれたかどうかの確認を行なう。抜かれていなければS1412へ返る。また、抜かれていればS1401へ返る。   On the other hand, if there is a security area, the process proceeds to S1407, and the inquiry data storage area is decrypted using the password received from PC3 as a key. In S1408, this is compared with the original data for verification. In step S1409, the PC 3 is notified of the password error, and the process returns to step S1402. On the other hand, if it is a match, the authentication is accepted, the process proceeds to S1410, the password correct answer is notified to the PC 3, and the security mode is set in S1411. In S1412, it is confirmed whether or not there is an instruction to shift to the normal mode from the PC 3, and if there is a transition instruction, the process returns to S1401. If there is no transfer instruction, the process advances to step S1413 to check whether the memory card has been removed. If not removed, the process returns to S1412. If it has been removed, the process returns to S1401.

なお、上述した実施形態は本発明の一例にすぎず、本発明の要旨を変更しない範囲で、実施形態を適宜変更することができる。   In addition, embodiment mentioned above is only an example of this invention and can change embodiment suitably in the range which does not change the summary of this invention.

本発明の通信システムに適用されるマルチリーダライタの一例を正面側から見た斜視図。The perspective view which looked at an example of the multi reader / writer applied to the communication system of this invention from the front side. 同じく背面側から見た斜視図。The perspective view similarly seen from the back side. マルチリーダライタの電気的構成の一例を示すブロック図。FIG. 3 is a block diagram illustrating an example of an electrical configuration of a multi-reader / writer. マルチリーダライタのSCSIコマンド・データ・ステータス送受信部の説明図。Explanatory drawing of the SCSI command data data status transmission / reception part of a multi reader / writer. コントロールレジスタの説明図。Explanatory drawing of a control register. ステータスレジスタの説明図。Explanatory drawing of a status register. 本発明の通信システムに適用されるPCの概略構成を示すブロック図。The block diagram which shows schematic structure of PC applied to the communication system of this invention. PC上で動作するOSと、該OS上で動作するアプリケーションを説明するための概念図。The conceptual diagram for demonstrating OS which operate | moves on PC, and the application which operate | moves on this OS. マルチリーダライタのSCSIコマンド・データ・ステータス送受信部が行なう処理の流れを表すフローチャート。The flowchart showing the flow of the process which the SCSI command data data status transmission / reception part of a multi reader / writer performs. 本発明の通信システムにおいて実行されるデータ通信処理の処理の流れを表すフローチャート。The flowchart showing the flow of the process of the data communication process performed in the communication system of this invention. 図9のドライブ割当処理の流れを表すフローチャート。10 is a flowchart showing the flow of drive allocation processing in FIG. 9. 図9のドライブ設定処理の流れを表すフローチャート。10 is a flowchart showing the flow of drive setting processing in FIG. 9. 図9のセキュリティ処理のPC側の流れを表すフローチャート。10 is a flowchart showing a flow on the PC side of the security processing of FIG. 9. 図12に対応するマルチリーダライタがわの状態遷移タスクの流れを示すフローチャート。FIG. 13 is a flowchart showing a flow of a state transition task of the multi-reader / writer corresponding to FIG. 12; PC側のダイアログボックスの第一表示例を示す図。The figure which shows the example of a 1st display of the dialog box by the side of PC. PC側のダイアログボックスの第二表示例を示す図。The figure which shows the 2nd example of a display of the dialog box by the side of PC. PC側のダイアログボックスの第三表示例を示す図。The figure which shows the 3rd display example of the dialog box by the side of PC. PC側のダイアログボックスの第四表示例を示す図。The figure which shows the 4th example of a display of the dialog box by the side of PC. メモリーカードのエリア構造の概念図。The conceptual diagram of the area structure of a memory card.

符号の説明Explanation of symbols

1 通信システム
2 マルチリーダライタ(周辺装置)
3 PC(ホスト装置)
11 第1メモリーカード(カード型記憶メディア)
12 第2メモリーカード(カード型記憶メディア)
13 第3メモリーカード(カード型記憶メディア)
14 第4メモリーカード(カード型記憶メディア)
21 液晶ディスプレイ(表示部)
27 CPU(調査報告データ生成手段、トリガ発生報告情報書き込み手段、調査報告データ送信手段、交換通知情報保持手段、交換通知情報保持制御手段、付加情報抽出手段、認証手段、認証通信手段、アクセスモード設定手段、アクセスモード設定制御手段、アクセスモード報告通信手段、ノーマルモード設定完了報告情報返信手段)
41 CPU(報告情報受領手段、調査指示データ作成手段、調査指示データ送信手段、セキュリティ参照情報送信手段、認証通信手段、認証結果反映情報出力手段、ノーマルモード移行指示情報送信手段)
51〜54 入出力制御部
56 ディスプレイ(認証結果反映情報出力手段、アクセスモード種別表示手段)
1 Communication system 2 Multi reader / writer (peripheral device)
3 PC (host device)
11 First memory card (card-type storage media)
12 Second memory card (card-type storage media)
13 Third memory card (card-type storage media)
14 Fourth memory card (card-type storage media)
21 Liquid crystal display (display unit)
27 CPU (investigation report data generation means, trigger generation report information writing means, investigation report data transmission means, exchange notification information holding means, exchange notification information holding control means, additional information extraction means, authentication means, authentication communication means, access mode setting Means, access mode setting control means, access mode report communication means, normal mode setting completion report information return means)
41 CPU (report information receiving means, investigation instruction data creation means, investigation instruction data transmission means, security reference information transmission means, authentication communication means, authentication result reflection information output means, normal mode transition instruction information transmission means)
51-54 Input / output control unit 56 Display (authentication result reflection information output means, access mode type display means)

Claims (14)

通信イベントの起動決定権を有したホスト装置と、該ホスト装置に接続される該ホスト装置の通信対象となる周辺装置とを含み、前記通信イベントを実行命令するためのコマンドを前記ホスト装置から前記周辺装置に向けて順次発行する一方、発行されたコマンドを受領した前記周辺装置が当該コマンドに対応するデータ処理を逐次実行し、その実行結果に応じた応答情報を前記ホスト装置側に返信するようになっており、かつ、前記コマンドの発行方向が前記ホスト装置側から前記周辺装置側への一方向に規制された主通信プロトコルを有する通信システムにおいて、
前記ホスト装置側に設けられ、前記周辺装置に対し該周辺装置自身に対する調査報告処理を要求する調査要求コマンドを発行するとともに、該調査要求コマンドの発行に伴い、調査報告指示内容を示す予め定められたフレームフォーマットを有するとともに当該フレームの予め定められたフィールドに付加情報が書き込まれた調査指示データを作成する調査指示データ作成手段と、
作成された前記調査指示データを前記周辺装置に送信する調査指示データ送信手段と、
前記周辺装置に設けられ、前記調査指示データを受けて、予め定められたフレームフォーマットを有する調査報告データを生成する調査報告データ生成手段と、
前記周辺装置に設けられ、前記調査報告データを応答情報として前記ホスト装置に送信する調査報告データ送信手段と、
前記周辺装置側に設けられ、受信した該調査指示データの前記予め定められたフィールドから前記付加情報を抽出する付加情報抽出手段とを有する付加情報通信機構が構築され、
前記周辺装置が、データの読出し及び書き込みに係るデータアクセスが可能とされた不揮発性メモリからなるカード型記憶メディアがスロットに着脱可能に装着され、前記通信イベントにより該カード型記憶メディアに対してデータアクセスを行なう記憶装置として構成されるとともに、
前記付加情報通信機構により実現される機能手段として、
前記ホスト装置側で取得される前記セキュリティ参照情報を、前記調査指示データ上の前記付加情報として前記周辺装置に送信するセキュリティ参照情報送信手段が設けられ、
前記周辺装置には、カード型記憶メディアに書き込まれたセキュリティーマスター情報と、前記ホスト装置から受信するセキュリティ参照情報とを用いて、前記カード型記憶メディアへの前記ホスト装置側からのアクセス権を認証する認証手段が設けられていることを特徴とする通信システム。
A host device having a communication event activation decision right and a peripheral device to be communicated with the host device connected to the host device, and a command for instructing execution of the communication event from the host device While sequentially issuing to the peripheral device, the peripheral device that has received the issued command sequentially executes data processing corresponding to the command, and returns response information corresponding to the execution result to the host device side. In the communication system having a main communication protocol in which the command issuance direction is restricted in one direction from the host device side to the peripheral device side,
Provided on the host device side, issues a survey request command for requesting the peripheral device itself to perform a survey report process on the peripheral device, and is accompanied by a predetermined search report instruction content accompanying the issuance of the survey request command. Survey instruction data creating means for creating survey instruction data having additional frame format and additional information written in a predetermined field of the frame;
Investigation instruction data transmission means for transmitting the created investigation instruction data to the peripheral device;
Survey report data generating means provided in the peripheral device, receiving the survey instruction data, and generating survey report data having a predetermined frame format;
Provided in the peripheral device, a survey report data transmitting means for transmitting the survey report data as response information to the host device;
An additional information communication mechanism provided on the peripheral device side and having additional information extracting means for extracting the additional information from the predetermined field of the received survey instruction data;
A card-type storage medium comprising a non-volatile memory in which the peripheral device can access data related to reading and writing of data is detachably attached to the slot, and data is transferred to the card-type storage medium by the communication event. As a storage device to access,
As functional means realized by the additional information communication mechanism,
Security reference information transmitting means for transmitting the security reference information acquired on the host device side as the additional information on the investigation instruction data to the peripheral device is provided,
The peripheral device authenticates the access right from the host device side to the card type storage medium using the security master information written in the card type storage medium and the security reference information received from the host device. A communication system, characterized in that authentication means is provided.
前記周辺装置と前記ホスト装置とは、前記ホスト装置側からの前記周辺装置のポーリングは可能であって、該周辺装置側からの前記ホスト装置の逆ポーリングが不能なシリアル通信機構を介して接続され、前記通信イベントを実行するための前記ホスト装置と前記周辺装置との間における情報転送が、前記ホスト装置が前記周辺装置をポーリングする形式にてシリアル通信により実行されるようになっている請求項1記載の通信システム。   The peripheral device and the host device are connected via a serial communication mechanism in which the peripheral device can be polled from the host device side and the host device cannot be reversely polled from the peripheral device side. The information transfer between the host device and the peripheral device for executing the communication event is executed by serial communication in a format in which the host device polls the peripheral device. The communication system according to 1. 前記シリアル通信機構はUSBプロトコルに従うものである請求項2記載の通信システム。   The communication system according to claim 2, wherein the serial communication mechanism conforms to a USB protocol. 前記付加情報通信機構により実現される機能手段として、
前記認証手段による認証結果を反映した認証結果反映情報を前記周辺装置に要求する認証結果要求情報を前記調査指示データ上の前記付加情報として前記周辺装置に送信するとともに、前記調査報告データの予め定められたフレームに前記ホスト装置側からの付加情報に対応する対応付加情報として前記認証結果反映情報が書き込まれた前記調査報告データを、応答情報として前記周辺装置から前記ホスト装置に返信する認証通信手段が設けられ、前記ホスト装置には、返信された前記認証結果反映情報を出力する認証結果反映情報出力手段が設けられている請求項1ないし請求項3のいずれか1項に記載の通信システム。
As functional means realized by the additional information communication mechanism,
Authentication result request information for requesting authentication result reflection information reflecting the authentication result by the authentication means to the peripheral device is transmitted to the peripheral device as the additional information on the investigation instruction data, and the investigation report data is predetermined. Authentication communication means for returning the investigation report data in which the authentication result reflection information is written as the corresponding additional information corresponding to the additional information from the host device side to the frame as a response information from the peripheral device to the host device The communication system according to any one of claims 1 to 3, wherein an authentication result reflection information output unit that outputs the returned authentication result reflection information is provided in the host device.
前記カード型記憶メディアの記憶エリアが、前記認証手段により前記アクセス権の認証が棄却された場合でも前記ホスト装置側からのアクセスが可能なノーマルエリアと、前記認証手段により前記アクセス権の認証が受理された場合にのみ前記ホスト装置側からのアクセスが可能なセキュリティエリアとに分かれており、
前記周辺装置には、前記カード型記憶メディアへのアクセスモードを、前記ノーマルエリアにのみアクセスが可能なノーマルモードと、前記セキュリティエリアにアクセスが可能なセキュリティモードとのいずれかに設定するアクセスモード設定手段と、
前記認証手段による認証結果が受理認証であった場合にのみ、前記アクセスモード設定手段に対し前記アクセスモードを前記セキュリティモードに設定させるアクセスモード設定制御手段が設けられている請求項1ないし請求項4のいずれか1項に記載の通信システム。
The storage area of the card-type storage medium is a normal area that can be accessed from the host device even if the authentication of the access right is rejected by the authentication means, and the authentication of the access right is accepted by the authentication means. Is divided into security areas that can be accessed from the host device side only when
In the peripheral device, an access mode setting for setting the access mode to the card-type storage medium to one of a normal mode in which only the normal area can be accessed and a security mode in which the security area can be accessed Means,
5. An access mode setting control means for causing the access mode setting means to set the access mode to the security mode only when an authentication result by the authentication means is acceptance authentication. The communication system according to any one of the above.
前記付加情報通信機構により実現される機能手段として、
前記周辺装置に設定されている前記アクセスモードの種別を該周辺装置に報告させるためのアクセスモード報告指示情報を、前記調査指示データ上の前記付加情報として前記周辺装置に送信するとともに、前記調査報告データの予め定められたフレームに前記ホスト装置側からの付加情報に対応する対応付加情報として前記アクセスモード設定手段が設定中のアクセスモードを報告するアクセスモード報告情報が書き込まれた前記調査報告データを、応答情報として前記周辺装置側から前記ホスト装置に返信するアクセスモード報告通信手段が設けられ、
前記ホスト装置には、前記アクセスモード報告通信手段により取得された前記アクセスモードの種別を表示するアクセスモード種別表示手段が設けられてなる請求項5記載の通信システム。
As functional means realized by the additional information communication mechanism,
The access mode report instruction information for causing the peripheral device to report the type of the access mode set in the peripheral device is transmitted to the peripheral device as the additional information on the investigation instruction data, and the investigation report The investigation report data in which access mode report information for reporting the access mode being set by the access mode setting means is written as corresponding additional information corresponding to additional information from the host device side in a predetermined frame of data. , An access mode report communication means is provided for returning response information from the peripheral device side to the host device,
6. The communication system according to claim 5, wherein the host device is provided with an access mode type display means for displaying the type of the access mode acquired by the access mode report communication means.
前記ホスト装置には、前記アクセスモードとして前記ノーマルモードと前記セキュリティモードとのいずれかを選択するためのアクセスモード選択手段が設けられ、
前記付加情報通信機構により実現される機能手段として、
前記ホスト装置側で前記ノーマルモードが選択された場合に、該ノーマルモードへの移行を前記周辺装置に指示するノーマルモード移行指示情報を、前記調査指示データ上の前記付加情報として前記周辺装置に送信するノーマルモード移行指示情報送信手段と、
該ノーマルモード移行指示情報を受けた前記周辺装置が、前記アクセスモード設定手段が前記アクセスモードを前記ノーマルモードに設定するに伴い、前記調査報告データの予め定められたフレームに前記ホスト装置側からの付加情報に対応する対応付加情報として、ノーマルモードへの設定完了を報告する前記ノーマルモード設定完了報告情報を前記調査報告データとして前記ホスト装置に返信するノーマルモード設定完了報告情報返信手段が設けられ、
前記ホスト装置は、前記セキュリティ参照情報の入力手段とを有し、
前記セキュリティ参照情報送信手段は、前記入力された前記セキュリティ参照情報を、前記調査指示データ上の前記付加情報として前記周辺装置に送信する請求項4又は請求項6記載の通信システム。
The host device is provided with an access mode selection means for selecting either the normal mode or the security mode as the access mode,
As functional means realized by the additional information communication mechanism,
When the normal mode is selected on the host device side, normal mode shift instruction information for instructing the peripheral device to shift to the normal mode is transmitted to the peripheral device as the additional information on the survey instruction data Normal mode transition instruction information transmitting means to perform,
When the access mode setting means sets the access mode to the normal mode, the peripheral device that has received the normal mode transition instruction information receives a predetermined frame of the investigation report data from the host device side. As the additional information corresponding to the additional information, provided is a normal mode setting completion report information return means for returning the normal mode setting completion report information reporting the completion of setting to the normal mode to the host device as the investigation report data.
The host device has input means for the security reference information;
The communication system according to claim 4 or 6, wherein the security reference information transmitting unit transmits the input security reference information to the peripheral device as the additional information on the investigation instruction data.
前記調査指示データ作成手段は前記調査指示データにおいて、格納するべき主格納情報として前記付加情報以外の情報が格納されるよう前記主通信プロトコルに規定されたフィールドに、前記付加情報を前記主格納情報に兼用させる形で書き込むものである請求項1ないし請求項7のいずれか1項に記載の通信システム。   The survey instruction data creating means stores the additional information in the main storage information in a field defined in the main communication protocol so that information other than the additional information is stored as main storage information to be stored in the survey instruction data. The communication system according to any one of claims 1 to 7, wherein the communication system is written in a form that is commonly used by a computer. 前記調査指示データにおいて、前記主通信プロトコルに従い前記カード型記憶メディアに対するデータの読み出し又は書き込みに係る通信イベントを実行する際に、該読み出し処理又は書き込み処理に割り当てられる当該カード型記憶メディア上のメモリ領域のアロケーション長情報を格納するためのフィールドがアロケーション長設定フィールドとして確保されてなり、該アロケーション長設定フィールドにおいて前記アロケーション長情報を前記主格納情報とする形で、該アロケーション長情報に兼用される前記付加情報を書き込む請求項8記載の通信システム。   A memory area on the card-type storage medium assigned to the read process or the write process when executing a communication event related to reading or writing of data to the card-type storage medium according to the main communication protocol in the survey instruction data A field for storing the allocation length information is secured as an allocation length setting field, and the allocation length information is used as the main storage information in the allocation length setting field. The communication system according to claim 8, wherein additional information is written. 前記主通信プロトコルにおいて、前記アロケーション長設定フィールドのサイズが一定ビット長に定められるとともに、前記アロケーション長として設定可能な最大値をバイト単位にて表わしたときのビット数を、前記アロケーション長設定フィールドの総ビット数未満に設定し、前記最大値を超えるアロケーション長が前記アロケーション長設定フィールドに記述された場合には、記述されたアロケーション長値とは無関係に前記最大値を前記アロケーション長の実設定値として定める一方、該最大値を超える冗長なアロケーション長記述値に一義的に対応付ける形で互いに異なる付加情報内容が定義されてなる請求項9記載の通信システム。   In the main communication protocol, the size of the allocation length setting field is determined to be a constant bit length, and the number of bits when the maximum value that can be set as the allocation length is expressed in bytes is expressed in the allocation length setting field. When the allocation length is set to less than the total number of bits and an allocation length exceeding the maximum value is described in the allocation length setting field, the maximum value is set to the actual setting value of the allocation length regardless of the described allocation length value. 10. The communication system according to claim 9, wherein different additional information contents are defined so as to uniquely correspond to redundant allocation length description values exceeding the maximum value. 前記周辺装置には、前記カード型記憶メディアの交換がなされた場合に当該カード型記憶メディアの交換を前記ホスト装置に通知するための交換通知情報を保持する交換通知情報保持手段と、前記ホスト装置から予め定められた第一種コマンドを受信した場合には、該コマンドの実行後に前記交換通知情報保持手段に保持されている前記交換通知情報をクリアし、同じく前記第一種コマンド以外の第二種コマンドを受信した場合は、該コマンドの実行後においても前記交換通知情報保持手段による前記交換通知情報の保持状態を保留する交換通知情報保持制御手段とを有し、
前記調査要求コマンドとして前記第二種コマンドが使用される請求項1ないし請求項10のいずれか1項に記載の通信システム。
In the peripheral device, when the card type storage medium is exchanged, exchange notification information holding means for holding exchange notification information for notifying the host device of exchange of the card type storage medium, and the host device When the predetermined first type command is received from the command, the exchange notification information held in the exchange notification information holding unit is cleared after the execution of the command, and the second type other than the first type command is also cleared. An exchange notification information holding control means for holding the exchange notification information holding state by the exchange notification information holding means even after execution of the command when the seed command is received;
The communication system according to any one of claims 1 to 10, wherein the second type command is used as the investigation request command.
前記調査要求コマンドが、前記周辺装置に対し該周辺装置自身の構成及び属性を特定する情報である構成/属性特定情報の報告を指示するための、前記第二種コマンドをなす構成/属性調査要求コマンドである請求項11記載の通信システム。   Configuration / attribute survey request that constitutes the second type command for the survey request command to instruct the peripheral device to report configuration / attribute identification information that is information identifying the configuration and attributes of the peripheral device itself. The communication system according to claim 11, wherein the communication system is a command. 前記主通信プロトコルがSCSIプロトコルであり、前記調査要求コマンドとしてInquiryコマンドが使用される請求項12記載の通信システム。   The communication system according to claim 12, wherein the main communication protocol is a SCSI protocol, and an inquiry command is used as the investigation request command. 請求項1ないし請求項13のいずれか1項に記載の通信システムを構成する前記周辺装置であって、データの読出し及び書き込みに係るデータアクセスが可能とされた不揮発性メモリからなるカード型記憶メディアがスロットに着脱可能に装着され、前記通信イベントにより該カード型記憶メディアに対してデータアクセスを行なう記憶装置として構成されるとともに、
前記調査指示データを受けて、予め定められたフレームフォーマットを有する前記調査報告データを生成する前記調査報告データ生成手段と、
前記調査報告データを前記応答情報として前記ホスト装置に送信する前記調査報告データ送信手段と、
受信した前記調査指示データの予め定められたフィールドから前記付加情報を抽出する前記付加情報抽出手段と、
前記カード型記憶メディアに書き込まれた前記セキュリティーマスター情報と、前記ホスト装置から受信する前記セキュリティ参照情報とを用いて、前記カード型記憶メディアへの前記ホスト装置側からのアクセス権を認証する前記認証手段と、
を有してなることを特徴とする周辺装置。
14. The peripheral device constituting the communication system according to any one of claims 1 to 13, wherein the card type storage medium comprises a non-volatile memory capable of data access for reading and writing data. Is detachably mounted in the slot, and is configured as a storage device that performs data access to the card-type storage medium by the communication event,
Receiving the survey instruction data and generating the survey report data having a predetermined frame format;
The survey report data transmitting means for transmitting the survey report data as the response information to the host device;
The additional information extracting means for extracting the additional information from a predetermined field of the received survey instruction data;
The authentication for authenticating the access right from the host device side to the card-type storage medium using the security master information written in the card-type storage medium and the security reference information received from the host device Means,
A peripheral device comprising:
JP2007163464A 2006-06-30 2007-06-21 Communication system and peripheral device used therefor Pending JP2008033906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007163464A JP2008033906A (en) 2006-06-30 2007-06-21 Communication system and peripheral device used therefor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2006181982 2006-06-30
JP2007163464A JP2008033906A (en) 2006-06-30 2007-06-21 Communication system and peripheral device used therefor

Publications (1)

Publication Number Publication Date
JP2008033906A true JP2008033906A (en) 2008-02-14

Family

ID=39123200

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007163464A Pending JP2008033906A (en) 2006-06-30 2007-06-21 Communication system and peripheral device used therefor

Country Status (1)

Country Link
JP (1) JP2008033906A (en)

Similar Documents

Publication Publication Date Title
US7941579B2 (en) Communication system for authenticating authority of host device for accessing storage medium set to periphery device
US7797398B2 (en) Communication system, and peripheral device having trigger generating device and computer program product that monitors whether a trigger has been generated
US7725628B1 (en) Direct secondary device interface by a host
US6757783B2 (en) Portable storage medium based on universal serial bus standard and UFI standard
TWI393009B (en) Data sharing and transfer systems and methods
US7159065B1 (en) Method for issuing vendor specific requests for accessing ASIC configuration and descriptor memory while still using a mass storage class driver
JP2003526863A (en) Method of communication between smart card and host station
CN102422256A (en) Method for accessing a portable storage data carrier with additional modules and portable storage data carrier
CN105868615B (en) The authentication method of storage device, information processing system and storage device
US20040221130A1 (en) Method and device for a accessing non-volatile memory by PC and X-BOX
US7869074B2 (en) Communication system, information processing device, peripheral device and communication method
JP4663572B2 (en) Universal serial bus data transmission method and device implementing the method
JP2005266934A (en) Usb storage device and controller therefor
CN109753311B (en) Semiconductor equipment and related systems including command priority policy management
KR20030059773A (en) Information processing device
JP4807667B2 (en) Communication system and peripheral device used therefor
JP2008033906A (en) Communication system and peripheral device used therefor
JP4622770B2 (en) COMMUNICATION SYSTEM, INFORMATION PROCESSING DEVICE, PERIPHERAL DEVICE, AND COMMUNICATION METHOD
JP2008033451A (en) Removable storage media
JP4618560B2 (en) Communication system and peripheral device used therefor
JP4618559B2 (en) Communication system and peripheral device used therefor
JP2007265300A (en) Communication system and peripheral device used therefor
JP2007265305A (en) Communication system and peripheral device used therefor
JP2007265303A (en) Computer program
JP2006059201A (en) Data transfer system and interface