JP2008009659A - Device connecting method, host equipment, and program for connecting device equipment - Google Patents

Device connecting method, host equipment, and program for connecting device equipment Download PDF

Info

Publication number
JP2008009659A
JP2008009659A JP2006178812A JP2006178812A JP2008009659A JP 2008009659 A JP2008009659 A JP 2008009659A JP 2006178812 A JP2006178812 A JP 2006178812A JP 2006178812 A JP2006178812 A JP 2006178812A JP 2008009659 A JP2008009659 A JP 2008009659A
Authority
JP
Japan
Prior art keywords
information
host
identification information
stored
read
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
JP2006178812A
Other languages
Japanese (ja)
Inventor
Tomoyuki Nonoyama
朋幸 野々山
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2006178812A priority Critical patent/JP2008009659A/en
Publication of JP2008009659A publication Critical patent/JP2008009659A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a device connecting method that can complete use preparation in a short time in reconnecting device equipment used once. <P>SOLUTION: When host equipment 1 reads device specification information from the device equipment 2, identification information of the device equipment 2 and device specification information are correspondingly stored in a storage part 8 of a storage device 6. At a point of time when the host equipment 1 detects reconnection of the device equipment 2 to an interface 10, the host equipment 1 reads identification information of the device equipment 2 and determines whether the identification information is stored in the storage part 8, and if stored, mounts the device equipment 2 applying the device specification information stored in the storage part 8 corresponding to the identification information. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、ホスト機器がデバイス機器から読み込んだデバイス規定情報に基づいてホスト機器側の処理で自動的にデバイス機器をマウントするようにしたデバイス接続方法いわゆるPlug and Play方式を適用したデバイス接続方法の改良に関する。   The present invention relates to a device connection method in which a device device is automatically mounted by processing on the host device side based on device definition information read from the device device by the host device. Regarding improvement.

Plug and Play方式を適用したデバイス接続方法に適したUSB接続およびUSBデバイス機器が既に公知である。   USB connections and USB device devices suitable for device connection methods to which the Plug and Play method is applied are already known.

USBホスト機器にUSBデバイス機器を接続する際の従来処理の概略について図4のフローチャートを参照して簡単に説明する。   An outline of conventional processing when a USB device is connected to a USB host device will be briefly described with reference to the flowchart of FIG.

ホスト機器のインターフェイスにデバイス機器が接続されたことがホスト機器によって検知されると(ステップC1)、まず、ホスト機器がデバイス機器にバス電圧を供給してデバイス機器にリセットを要求する(ステップC2)。   When the host device detects that the device device is connected to the interface of the host device (step C1), the host device first supplies the bus voltage to the device device and requests the device device to reset (step C2). .

そして、デバイス機器がリセットされて転送準備が整い次第、ホスト機器がデバイス機器から、デバイス規定情報となるディスクリプタ情報のうち必要最小限度のディスクリプタ情報、即ち、USBバージョンやプロトコル・コード等を規定したデバイス・ディスクリプタ情報を取得する(ステップC3)。   Then, as soon as the device device is reset and ready for transfer, the host device from the device device specifies the minimum required descriptor information among the descriptor information that becomes the device specification information, that is, a device that specifies the USB version, protocol code, etc. Descriptor information is acquired (step C3).

次いで、このデバイス・ディスクリプタ情報に基づいてホスト機器がデバイス機器にSetAddressコマンドを送信し、該デバイス機器に固有の識別情報であるアドレスを当該デバイス機器に割り当て、このデバイス機器をAddressed状態(識別情報を割り当てられた状態)とする(ステップC4)。   Next, the host device transmits a SetAddress command to the device device based on the device descriptor information, assigns an address, which is identification information unique to the device device, to the device device, and sets the device device to the Addressed state (identification information is changed). Assigned state) (step C4).

その後、ホスト機器が、デバイス規定情報の他部を構成するディスクリプタ情報、例えば、コンフィギュレーション・ディスクリプタ情報やインターフェイス・ディスクリプタ情報およびエンドポイント・ディスクリプタ情報等をデバイス機器から取得した後(ステップC5)、該ホスト機器が備えるハードディスクドライブ等の記憶装置から当該デバイス機器に適したデバイスドライバを探し出し、RAM等のワークメモリにロードして常駐させ(ステップC6)、デバイス機器に対してSetConfigurationコマンドを送信する(ステップC7)。   Thereafter, after the host device obtains descriptor information constituting the other part of the device definition information, for example, configuration descriptor information, interface descriptor information, and endpoint descriptor information from the device device (step C5), A device driver suitable for the device device is searched from a storage device such as a hard disk drive provided in the host device, loaded into a work memory such as a RAM (step C6), and a SetConfiguration command is transmitted to the device device (step C6). C7).

デバイス機器がストレージ機器の場合には、更に、ファイルシステムに対してデバイス機器の使用準備が完了したことを通知し、ディスクパラメータや管理情報等の取得等のマウント処理を行い(ステップC8)、ストレージデバイスへのアクセス準備が完了する。   If the device device is a storage device, it further notifies the file system that the device device is ready for use, and performs mount processing such as acquisition of disk parameters, management information, etc. (step C8), and storage. The device is ready for access.

しかしながら、従来のデバイス接続方法においては、どのようなデバイス機器をどのような状況下で接続した場合であっても、毎回必ず上記と同様の認識処理やイニシャライズ処理を行わなければならず、特に、デバイスアクセス速度が遅く、また、デバイス管理情報やフォーマット情報など一連の情報取得量が多く、大量のデータを扱うストレージ機器等の場合においては、デバイス機器さらにはファイルシステムの使用準備が整うまでにかなりの時間を要するケースもあり使い勝手を損なっていた。   However, in the conventional device connection method, no matter what device device is connected under any circumstances, the same recognition process and initialization process as described above must be performed every time. The device access speed is slow, and a large amount of information is acquired, such as device management information and format information. In the case of storage devices that handle large amounts of data, the device device and the file system are considerably ready for use. In some cases, it took a long time, and the usability was impaired.

デバイス機器の再接続を容易化するための技術としては、デバイス機器の一時的な取り外しと所定時間内における再接続とを検知し、ドライバを初期化せずに通信切断状態から通信接続状態に復帰するようにした通信復帰方法が特許文献1として開示されている。   The technology for facilitating the reconnection of device equipment is to detect the temporary removal of the device equipment and the reconnection within a predetermined time, and return from the communication disconnected state to the communication connected state without initializing the driver. A communication recovery method that is configured to do so is disclosed as Patent Document 1.

しかしながら、このものは、予め決められた時間内でデバイス機器が再接続されることを前提としたものであり、デバイス機器を其れ以上に長い時間に亘って取り外したままにしておくと、改めて最初から接続シーケンスを実行しなければならない。
また、同じデバイス機器が所定時間内に接続されることを前提としたものであるため、別のデバイス機器が再接続された場合には改めて最初から全ての接続シーケンスを実行しなければならず、USB接続のように複雑な手続でデバイス・ディスクリプタ情報,コンフィギュレーション・ディスクリプタ情報,インターフェイス・ディスクリプタ情報,エンドポイント・ディスクリプタ情報等のデバイス規定情報を取得する必要があるものでは、デバイス規定情報の取得だけでも時間が掛かってしまう。
However, this is based on the premise that the device equipment will be reconnected within a predetermined time, and if the device equipment is removed for a longer period of time, it will be renewed. The connection sequence must be executed from the beginning.
In addition, since it is assumed that the same device device is connected within a predetermined time, when another device device is reconnected, all connection sequences must be executed again from the beginning, For devices that require device definition information such as device descriptor information, configuration descriptor information, interface descriptor information, and endpoint descriptor information in complicated procedures such as USB connection, only device specification information is acquired. But it takes time.

特開2003−8683号公報JP 2003-8683 A

本発明の課題は、前記従来技術の不都合を改善し、一度使用したデバイス機器の再接続に際して短時間で使用準備を完了することのできるデバイス接続方法とホスト機器およびデバイス機器接続用プログラムを提供することにある。   An object of the present invention is to provide a device connection method, a host device, and a device device connection program capable of improving the disadvantages of the prior art and completing the preparation for use in a short time when reconnecting a device device once used. There is.

本発明のデバイス接続方法は、ホスト機器とデバイス機器をインターフェイスを介して接続する際にホスト機器がデバイス機器のデバイス規定情報を参照して自動的にデバイス機器をマウントするようにしたデバイス接続方法であり、前記課題を達成するため、
前記インターフェイスに対するデバイス機器の接続を前記ホスト機器が検知した時点で、該デバイス機器の識別情報を前記ホスト機器が読み込み、
該読み込まれた識別情報が前記ホスト機器に記憶されていれば、該ホスト機器が当該識別情報に対応して記憶しているデバイス規定情報を適用して前記デバイス機器をマウントする一方、
前記読み込まれた識別情報が前記ホスト機器に記憶されていなければ、該デバイス機器からデバイス規定情報を改めて読み込み、該デバイス機器から読み込んだデバイス規定情報を該デバイス機器の識別情報に対応させて前記ホスト機器に記憶し、該デバイス規定情報を適用して前記デバイス機器をマウントすることを特徴とした構成を有する。
The device connection method of the present invention is a device connection method in which when a host device and a device device are connected via an interface, the host device automatically mounts the device device with reference to device definition information of the device device. Yes, in order to achieve the above-mentioned problem,
When the host device detects the connection of the device device to the interface, the host device reads the identification information of the device device,
If the read identification information is stored in the host device, the host device mounts the device device by applying device definition information stored corresponding to the identification information,
If the read identification information is not stored in the host device, the device definition information is read again from the device device, and the device definition information read from the device device is associated with the identification information of the device device and the host device The device is stored in a device, and the device device is mounted by applying the device definition information.

ホスト機器がデバイス機器からデバイス規定情報を読み込んだ際に、デバイス機器の識別情報とデバイス規定情報とを対応させて、ホスト機器に記憶しておく。
ホスト機器は、インターフェイスに対するデバイス機器の再接続を検知した時点でデバイス機器から識別情報を読み込み、この識別情報がホスト機器に記憶されているか否かを判定し、記憶されている場合には、この識別情報に対応してホスト機器が記憶しているデバイス規定情報を適用してデバイス機器をマウントする。
従って、このホスト機器に接続された経歴のあるデバイス機器が改めて該ホスト機器に接続された場合、当該デバイス機器の取り外し後の経過時間に関わりなく、ホスト機器は、デバイス機器からデバイス規定情報を読み込むことなく当該デバイス機器をマウントすることが可能となり、デバイス機器のマウントに要する所要時間を大幅に短縮することができる。
また、このホスト機器に接続された経歴のないデバイス機器が接続された場合には、ホスト機器が、該デバイス機器からデバイス規定情報を改めて読み込み、このデバイス規定情報を適用してデバイス機器をマウントすることになるので、新たに接続されるデバイス機器に対して不適当なデバイス規定情報が適用されるといった弊害も生じない。
When the host device reads the device specification information from the device device, the device device identification information and the device specification information are associated with each other and stored in the host device.
When the host device detects reconnection of the device device to the interface, the host device reads the identification information from the device device, determines whether or not this identification information is stored in the host device, and if it is stored, The device device is mounted by applying the device definition information stored in the host device corresponding to the identification information.
Therefore, when a device device with a history connected to the host device is connected to the host device again, the host device reads the device specification information from the device device regardless of the elapsed time after the removal of the device device. This device device can be mounted without any problem, and the time required for mounting the device device can be greatly reduced.
Further, when a device device having no history connected to the host device is connected, the host device reads the device specification information from the device device again, and mounts the device device by applying the device specification information. Therefore, there is no adverse effect that inappropriate device definition information is applied to a newly connected device device.

また、前記ホスト機器が、識別情報とデバイス規定情報を更新して記憶し、デバイス機器から前記ホスト機器にデバイス規定情報が改めて読み込まれるまでの間、前記ホスト機器が前記デバイス機器をマウントする際にロードしたデバイスドライバを実行可能状態で保持するようにしてもよい。   Further, when the host device mounts the device device until the host device updates and stores the identification information and the device specification information and the device specification information is read again from the device device to the host device. The loaded device driver may be held in an executable state.

このような構成を適用した場合、ホスト機器には、最も最近に当該ホスト機器に接続されたデバイス機器の識別情報とデバイス規定情報との対応関係のみが記憶され、このデバイス機器が取り外された場合であっても、当該デバイス機器をマウントする際にロードしたデバイスドライバが其のままホスト機器に保持される。
従って、ホスト機器から一旦取り外したデバイス機器そのものを改めて再接続するような場合において、デバイス機器からのデバイス規定情報の読み込みに加え、デバイスドライバのロードも不要となり、デバイス機器のマウントに要する所要時間を更に短縮することができる。
When such a configuration is applied, the host device stores only the correspondence between the identification information of the device device most recently connected to the host device and the device specification information, and the device device is removed. Even so, the device driver loaded when mounting the device is retained in the host device.
Therefore, in the case of reconnecting the device device itself once removed from the host device, in addition to reading the device specification information from the device device, it is not necessary to load the device driver, and the time required for mounting the device device is reduced. Further shortening is possible.

前記ホスト機器には、識別情報とデバイス規定情報との対応関係を複数記憶させることができる。   The host device can store a plurality of correspondence relationships between the identification information and the device definition information.

前述した通り、ホスト機器に接続された経歴のあるデバイス機器が改めて該ホスト機器に接続された場合において、デバイス機器からデバイス規定情報を読み込むことなく当該デバイス機器をマウントすることが可能となるので、デバイス機器のマウントに要する所要時間を大幅に短縮することができる。   As described above, when a device device with a history connected to the host device is connected to the host device again, it becomes possible to mount the device device without reading the device specification information from the device device. The time required to mount the device can be significantly reduced.

識別情報とデバイス規定情報との対応関係をホスト機器に複数組記憶させる場合においては、更に、前記ホスト機器が、前記各デバイス機器をマウントする際にロードしたデバイスドライバと各識別情報との対応関係を保持した状態で複数のデバイスドライバを実行可能状態で保持し、読み込まれた識別情報に応じて選択的にデバイスドライバを使用するようにしてもよい。   When storing a plurality of correspondence relationships between identification information and device specification information in the host device, the correspondence relationship between the device driver loaded when the host device mounts each device device and each identification information A plurality of device drivers may be held in an executable state while the device driver is held, and the device drivers may be selectively used according to the read identification information.

デバイスドライバをロードするRAM等のワークメモリの記憶容量に余裕があれば、複数のデバイスドライバをワークメモリに常駐させることができる。
従って、デバイス機器毎の識別情報に対応させてデバイス規定情報とデバイスドライバを保持することで、比較的最近に当該ホスト機器に接続された経歴のある幾つかのデバイス機器が改めて再接続された場合において、デバイス機器からのデバイス規定情報の読み込みに加えてデバイスドライバのロードを不要とし、デバイス機器のマウントに要する所要時間を更に短縮することができる。
If the storage capacity of a work memory such as a RAM for loading a device driver is sufficient, a plurality of device drivers can be made resident in the work memory.
Therefore, when device definition information and device drivers are held in correspondence with the identification information for each device device, and some device devices with a history of connection to the host device have recently been reconnected again In this case, in addition to reading the device definition information from the device device, it is not necessary to load the device driver, and the time required for mounting the device device can be further shortened.

デバイス機器がUSBデバイスの場合、デバイス規定情報は、デバイス,コンフィギュレーション,インターフェイス,エンドポイントの各ディスクリプタ情報によって構成される。   When the device device is a USB device, the device definition information is constituted by descriptor information of a device, a configuration, an interface, and an endpoint.

USBデバイスでは、USBバージョンやプロトコル・コード等を規定したデバイス・ディスクリプタ情報、インターフェイス数やディスクリプタの長さ及びバス電流消費量等を規定するコンフィギュレーション・ディスクリプタ情報、エンドポイント数等を規定するインターフェイス・ディスクリプタ情報、エンドポイントアドレスやエンドポイントの転送方法およびポーリング間隔等を規定するエンドポイント・ディスクリプタ情報といった複雑なディスクリプタ情報をデバイス規定情報として利用しているので、デバイス機器の認識処理やイニシャライズ処理に比較的時間を要するが、前記各構成により、デバイス規定情報の読み込み、更には、デバイスドライバのロードに関わる処理を高速化することで短時間のうちにデバイス機器のマウント作業を完了させることができる。   For USB devices, device descriptor information specifying the USB version, protocol code, etc., configuration descriptor information specifying the number of interfaces, descriptor length, bus current consumption, etc., interface specifying the number of endpoints, etc. Since complex descriptor information such as descriptor information, endpoint address, endpoint transfer method, and endpoint descriptor information that defines polling intervals, etc. is used as device specification information, it is compared with device device recognition processing and initialization processing. It takes a long time, but with each of the above-mentioned configurations, the device equipment can be read in a short time by speeding up the processing related to the reading of the device definition information and the loading of the device driver. It is possible to complete the mount operation.

本発明のホスト機器は、インターフェイスを介してデバイス機器を接続する際にデバイス機器のデバイス規定情報を参照して自動的にデバイス機器をマウントするようにしたホスト機器であり、前記と同様の課題を達成するため、
前記インターフェイスに対するデバイス機器の接続を検知した時点で該デバイス機器の識別情報を読み込む識別情報読込手段と、
前記読み込まれた識別情報が該ホスト機器の記憶手段に記憶されているか否かを判定する判定手段と、
前記判定手段による判定結果が真となった場合に、当該識別情報に対応して前記記憶手段に記憶されているデバイス規定情報を適用して前記デバイス機器をマウントする再マウント手段と、
前記判定手段による判定結果が偽となった場合に、該デバイス機器からデバイス規定情報を改めて読み込み、該デバイス機器から読み込んだデバイス規定情報を該デバイス機器の識別情報に対応させて前記記憶手段に記憶させ、該デバイス規定情報を適用して前記デバイス機器をマウントする新規マウント手段とを備えたことを特徴とした構成を有する。
The host device of the present invention is a host device that automatically mounts a device device by referring to the device definition information of the device device when connecting the device device via an interface, and has the same problems as described above. To achieve
Identification information reading means for reading identification information of the device device at the time of detecting connection of the device device to the interface;
Determination means for determining whether or not the read identification information is stored in the storage means of the host device;
When the determination result by the determination unit is true, a remount unit that mounts the device device by applying the device definition information stored in the storage unit corresponding to the identification information;
When the determination result by the determination unit becomes false, the device definition information is read from the device device again, and the device definition information read from the device device is stored in the storage unit in association with the identification information of the device device. And a new mounting means for mounting the device device by applying the device definition information.

以上の構成において、インターフェイスに対するデバイス機器の接続が検知されると、まず、識別情報読込手段が当該デバイス機器の識別情報を読み、この識別情報が該ホスト機器の記憶手段に記憶されているか否かが判定手段によって判定される。
そして、この識別情報が記憶手段に記憶されている場合には、再マウント手段が作動し、この識別情報に対応して記憶手段に記憶されているデバイス規定情報を適用して該デバイス機器をホスト機器にマウントする。
一方、識別情報が記憶手段に記憶されていないと判定された場合には、新規マウント手段が作動して該デバイス機器からデバイス規定情報を改めて読み込み、このデバイス規定情報を当該デバイス機器の識別情報に対応させて記憶手段に記憶させ、このデバイス規定情報を適用してデバイス機器をホスト機器にマウントする。
従って、ホスト機器に接続された経歴のあるデバイス機器が改めて該ホスト機器に接続された場合において、当該デバイス機器の取り外し後の経過時間に関わりなく、デバイス機器からデバイス規定情報を読み込まずにデバイス機器をマウントすることができる。
また、このホスト機器に接続された経歴のないデバイス機器が接続された場合には、当該デバイス機器の識別情報がホスト機器に記憶されておらず、判定手段による判定結果が偽となる。従って、新規マウント手段により、該デバイス機器からデバイス規定情報が改めて読み込まれ、このデバイス規定情報を適用してデバイス機器がマウントされることになる。このため、新たに接続されるデバイス機器に対して不適当なデバイス規定情報が適用されるといった弊害が未然に防止される。
In the above configuration, when the connection of the device device to the interface is detected, first, the identification information reading unit reads the identification information of the device device, and whether or not this identification information is stored in the storage unit of the host device. Is determined by the determining means.
When this identification information is stored in the storage means, the remount means is activated, and the device specification information stored in the storage means in response to the identification information is applied to host the device device. Mount on the device.
On the other hand, if it is determined that the identification information is not stored in the storage means, the new mounting means is activated to read the device definition information from the device device again, and this device definition information is used as the identification information of the device device. Corresponding data is stored in the storage means, and the device specification information is applied to mount the device device on the host device.
Therefore, when a device device with a history connected to the host device is connected to the host device again, the device device is not read from the device device regardless of the elapsed time after the removal of the device device. Can be mounted.
Further, when a device device having no history connected to the host device is connected, the identification information of the device device is not stored in the host device, and the determination result by the determination unit becomes false. Therefore, the device definition information is newly read from the device device by the new mounting means, and the device device is mounted by applying the device definition information. For this reason, the bad effect that inappropriate device prescription information is applied with respect to the newly connected device apparatus is prevented beforehand.

本発明のデバイス機器接続用プログラムは、インターフェイスを介してデバイス機器を接続する際にデバイス機器のデバイス規定情報に基づいて自動的にデバイス機器をマウントするようにしたデバイス機器接続用プログラムであり、前記と同様の課題を達成するため、デバイス機器の接続対象となるホスト機器のマイクロプロセッサを、
前記インターフェイスに対するデバイス機器の接続を検知した時点で該デバイス機器の識別情報を読み込む識別情報読込手段、
前記読み込まれた識別情報が該ホスト機器の記憶手段に記憶されているか否かを判定する判定手段、
前記判定手段による判定結果が真となった場合に、当該識別情報に対応して前記記憶手段に記憶されているデバイス規定情報を適用して前記デバイス機器をマウントする再マウント手段、および、
前記判定手段による判定結果が偽となった場合に、該デバイス機器からデバイス規定情報を改めて読み込み、該デバイス機器から読み込んだデバイス規定情報を該デバイス機器の識別情報に対応させて前記記憶手段に記憶させ、該デバイス規定情報を適用して前記デバイス機器をマウントする新規マウント手段として機能させることを特徴とした構成を有する。
The device device connection program of the present invention is a device device connection program that automatically mounts a device device based on device definition information of the device device when connecting the device device via an interface, In order to achieve the same problem as above, the microprocessor of the host device to which the device device is connected,
Identification information reading means for reading identification information of the device device at the time of detecting connection of the device device to the interface;
Determination means for determining whether or not the read identification information is stored in the storage means of the host device;
When the determination result by the determination unit becomes true, a remount unit that mounts the device device by applying the device definition information stored in the storage unit corresponding to the identification information, and
When the determination result by the determination unit becomes false, the device definition information is read from the device device again, and the device definition information read from the device device is stored in the storage unit in association with the identification information of the device device. And the device defining information is applied to function as new mounting means for mounting the device device.

このデバイス機器接続用プログラムをインストールしたホスト機器は、前述の識別情報読込手段,判定手段,再マウント手段,新規マウント手段を備えたホスト機器として機能する。   The host device in which the device device connection program is installed functions as a host device having the above-described identification information reading means, determination means, remount means, and new mount means.

本発明のデバイス接続方法とホスト機器およびデバイス機器接続用プログラムは、ホスト機器がデバイス機器からデバイス規定情報を読み込んだ際に、デバイス機器の識別情報とデバイス規定情報とを対応させてホスト機器に記憶し、インターフェイスに対するデバイス機器の再接続をホスト機器が検知した時点で、ホスト機器がデバイス機器から識別情報を読み込み、この識別情報がホスト機器に記憶されているか否かを判定し、記憶されている場合には当該識別情報に対応してホスト機器が記憶しているデバイス規定情報を其のまま適用してデバイス機器をマウントするようにしているので、当該デバイス機器の取り外し後の経過時間に関わりなく、デバイス機器からのデバイス規定情報の読み込みを省略し、当該デバイス機器を短時間でホスト機器にマウントすることができる。
また、ホスト機器に接続された経歴のないデバイス機器が接続された場合においては、ホスト機器がデバイス機器からデバイス規定情報を改めて読み込み、このデバイス規定情報を適用してデバイス機器をマウントすることになるので、新たに接続されるデバイス機器に対して不適当なデバイス規定情報が適用されるといった弊害の発生も未然に防止される。
The device connection method, the host device, and the device device connection program of the present invention store the device device identification information and the device specification information in association with each other when the host device reads the device specification information from the device device. When the host device detects reconnection of the device device to the interface, the host device reads the identification information from the device device, determines whether or not this identification information is stored in the host device, and is stored. In this case, the device specification information stored in the host device corresponding to the identification information is applied as it is, and the device device is mounted, so regardless of the elapsed time after removal of the device device. , Skip reading device specification information from device devices, It can be mounted on the host device.
When a device device with no history connected to the host device is connected, the host device reads the device specification information from the device device again, and mounts the device device by applying the device specification information. Therefore, it is possible to prevent an adverse effect such that inappropriate device definition information is applied to a newly connected device device.

次に、本発明を実施するための最良の形態について一実施形態を挙げて具体的に説明する。   Next, the best mode for carrying out the present invention will be specifically described with reference to one embodiment.

図1は本発明のデバイス接続方法を適用した一実施形態のホスト機器1と該ホスト機器1に接続されたデバイス機器2との接続状態の一例を示した機能ブロック図である。   FIG. 1 is a functional block diagram showing an example of a connection state between a host device 1 according to an embodiment to which a device connection method of the present invention is applied and a device device 2 connected to the host device 1.

この実施形態のホスト機器1はUSB接続に対応したパーソナルコンピュータによって構成され、また、デバイス機器2はUSB接続に対応したストレージ機器によって構成されている。   The host device 1 of this embodiment is configured by a personal computer that supports USB connection, and the device device 2 is configured by a storage device that supports USB connection.

ホスト機器1とデバイス機器2との間は各々のインターフェイス10,20とUSBケーブル3を介して接続され、相互間で様々な情報の送受信が行われるようになっている。   The host device 1 and the device device 2 are connected to each other via the interfaces 10 and 20 and the USB cable 3 so that various information can be transmitted and received between them.

ホスト機器1はUSB通信装置4と演算装置5および記憶装置6を備えている。   The host device 1 includes a USB communication device 4, an arithmetic device 5, and a storage device 6.

USB通信装置4は、USB規格のデバイス・フレームワークに対応した通信装置である。   The USB communication device 4 is a communication device compatible with a USB standard device framework.

演算装置5は、マイクロプロセッサ7およびその周辺回路を含む装置であり、各種のプログラム処理を実行すると共にホスト機器1の各部およびデバイス機器2を制御する。   The arithmetic device 5 is a device including a microprocessor 7 and its peripheral circuits, and executes various program processes and controls each part of the host device 1 and the device device 2.

記憶手段として機能する記憶装置6は、アプリケーションプログラムやデバイスドライバおよび各種のデータ等を格納するためのハードディスク等からなる格納部8と、該格納部8から実行対象としてロードされたアプリケーションプログラムやデバイスドライバ等を常駐させるためのRAM等からなるワークメモリ部9とを備える。ワークメモリ部9は演算過程にあるデータの一時記憶等にも利用される。デバイス機器2から取得したデバイス規定情報は記憶装置6の格納部8に保存されるようになっている。   The storage device 6 functioning as a storage means includes a storage unit 8 composed of a hard disk or the like for storing application programs, device drivers, and various data, and application programs and device drivers loaded from the storage unit 8 as execution targets. And a work memory unit 9 comprising a RAM or the like for resident and the like. The work memory unit 9 is also used for temporary storage of data in the process of computation. The device definition information acquired from the device device 2 is stored in the storage unit 8 of the storage device 6.

この実施形態ではUSB接続を前提としているので、デバイス機器2をマウントするために必要とされるデバイス規定情報は、基本的に、デバイス,コンフィギュレーション,インターフェイス,エンドポイントの各ディスクリプタ情報である。   Since this embodiment is premised on USB connection, the device definition information required for mounting the device device 2 is basically device, configuration, interface, and endpoint descriptor information.

ホスト機器1は通常のパーソナルコンピュータであり、データ入力用のキーボードやマウスおよびディスプレイ装置等を備えるが、これらの点に関しては周知であるので説明を省略する。   The host device 1 is an ordinary personal computer, and includes a keyboard, a mouse, a display device, and the like for data input. However, these points are well-known and will not be described.

図2はホスト機器1からデバイス機器2を取り外す際の処理の概略を示したフローチャート、また、図3はホスト機器1にデバイス機器2を接続する際の処理の概略を示したフローチャートである。   FIG. 2 is a flowchart showing an outline of a process when the device apparatus 2 is removed from the host apparatus 1, and FIG. 3 is a flowchart showing an outline of a process when the device apparatus 2 is connected to the host apparatus 1.

ホスト機器1のマイクロプロセッサ7によって図2および図3の処理を実行させるために必要とされるデバイス機器接続用プログラムは記憶装置6の格納部8に予め保存されているものとする。   It is assumed that a device device connection program required for causing the microprocessor 7 of the host device 1 to execute the processes of FIGS. 2 and 3 is stored in the storage unit 8 of the storage device 6 in advance.

次に、図2および図3を参照して識別情報読込手段,判定手段,再マウント手段,新規マウント手段として機能するホスト機器1のマイクロプロセッサ7の処理動作と本実施形態におけるデバイス接続方法について具体的に説明する。   Next, referring to FIG. 2 and FIG. 3, the processing operation of the microprocessor 7 of the host device 1 functioning as identification information reading means, determination means, remount means, and new mount means and the device connection method in this embodiment will be described in detail. I will explain it.

まず、図2を参照してホスト機器1からデバイス機器2を取り外す際の処理について説明する。   First, with reference to FIG. 2, a process when the device device 2 is removed from the host device 1 will be described.

まず、GUI(グラフィカル・ユーザー・インターフェイス)等を介してユーザがホスト機器1にデバイス取り外し宣言を入力すると、マイクロプロセッサ7は、デバイス機器2を「休止状態にする」のかホスト機器1から「完全に取り外す」のかを問うガイダンスメッセージを図示しないディスプレイ装置の画面に表示して、ユーザによる選択結果を判定する(ステップA1)。   First, when a user inputs a device removal declaration to the host device 1 via a GUI (graphical user interface) or the like, the microprocessor 7 determines whether the device device 2 is “paused” or “completely” A guidance message asking whether to “remove” is displayed on the screen of a display device (not shown), and the selection result by the user is determined (step A1).

ユーザが「完全に取り外す」を選択した場合、マイクロプロセッサ7は、このデバイス機器2に割り当てていた固有のアドレス即ち識別情報と、当該識別情報に対応して記憶していたデバイス・ディスクリプタ情報,コンフィギュレーション・ディスクリプタ情報,インターフェイス・ディスクリプタ情報,エンドポイント・ディスクリプタ情報等のデバイス規定情報を格納部8の記憶領域から削除して此れらのデータをクリアし、通常のアンマウント処理を実行した上で(ステップA2)、実行中のアプリケーションプログラムに対してデバイス機器2との間の通信が切断されたことを通知し(ステップA5)、デバイス機器2の取り外しに関わる処理を完了する。   When the user selects “completely remove”, the microprocessor 7 assigns a unique address assigned to the device device 2, that is, identification information, and device descriptor information and configuration stored in correspondence with the identification information. The device definition information such as the application descriptor information, interface descriptor information, and endpoint descriptor information is deleted from the storage area of the storage unit 8 to clear these data, and after performing a normal unmount process ( Step A2) notifies the application program being executed that the communication with the device device 2 has been disconnected (Step A5), and the processing related to the removal of the device device 2 is completed.

一方、ユーザが「休止状態にする」を選択してステップA1の判定結果が真となった場合においては、マイクロプロセッサ7は、デバイス機器2が一時的な取り外し状態にあることを意味する休止フラグを記憶装置6のワークメモリ部9にセットする(ステップA3)。   On the other hand, when the user selects “put hibernation” and the determination result in step A1 becomes true, the microprocessor 7 sets the hibernation flag indicating that the device device 2 is in the temporary removal state. Is set in the work memory unit 9 of the storage device 6 (step A3).

そして、マイクロプロセッサ7は、このデバイス機器2に割り当てていた識別情報と当該識別情報に対応するデバイス規定情報を格納部8に其のままの状態で保持し、また、この時点でワークメモリ部9にロードされているデバイスドライバ、つまり、現時点で取り外しの対象となっているデバイス機器2を制御するためのデバイスドライバをワークメモリ部9に保持したままの状態で、当該デバイス機器2の動作休止処理を行う(ステップA4)。   The microprocessor 7 holds the identification information assigned to the device device 2 and the device definition information corresponding to the identification information in the storage unit 8 as it is, and at this time, the work memory unit 9 In the state where the device driver loaded on the device, that is, the device driver for controlling the device device 2 that is currently being removed is held in the work memory unit 9, the operation suspension process of the device device 2 is performed. (Step A4).

その後、マイクロプロセッサ7が実行中のアプリケーションプログラムに対してデバイス機器2との間の通信が切断されたことを通知する(ステップA5)。
この場合、ワークメモリ部9にデバイスドライバが実行可能状態で保持されるので、ドライバレベルでは接続時の状態を維持したままでデバイス機器2の切断処理が完了することになる。
Thereafter, the microprocessor 7 notifies the application program being executed that the communication with the device device 2 has been disconnected (step A5).
In this case, since the device driver is held in the work memory unit 9 in an executable state, the disconnection process of the device device 2 is completed while maintaining the connection state at the driver level.

ユーザーからのデバイス取り外し宣言を受け付けるためのGUIは必ずしも必要というわけではないが、ストレージ機器等を始めとするデバイス機器2においては、アクセス中の取り外し操作によってデバイス機器2に誤動作を生じる可能性があるので、休止状態と完全な取り外しに応じた処理を明確に区別して実行する必要上、ステップA1の判定処理やGUIは用意した方が好ましい。
なお、アクセス中の取り外し操作による誤動作を考慮する必要のないデバイス機器2においては此れらの判定処理やGUIは必要でないから、一般論として、これらの判定処理やGUIは必須の要件とはならない。
A GUI for accepting a device removal declaration from a user is not always necessary, but in the device device 2 such as a storage device, malfunction may occur in the device device 2 due to a removal operation during access. Therefore, it is preferable to prepare the determination process and the GUI in step A1 because it is necessary to clearly distinguish and execute the process according to the hibernation state and complete removal.
In the device device 2 that does not need to consider malfunction due to the removal operation during access, these determination processing and GUI are not necessary, and as a general rule, these determination processing and GUI are not essential requirements. .

アクセス中の取り外し操作による誤動作を考慮する必要のないデバイス機器2のみを取り扱うような状況下では、GUIやステップA1の処理を省略し、ホスト機器1からのデバイス機器2の取り外しを直接的に検知することによって直ちにステップA3,ステップA4,ステップA5の処理を実行するようにしても構わない。   In the situation where only the device device 2 that does not need to consider the malfunction due to the removal operation during access is handled, the processing of the GUI and step A1 is omitted, and the removal of the device device 2 from the host device 1 is directly detected. By doing so, the processing of step A3, step A4, and step A5 may be executed immediately.

次に、図3を参照してホスト機器1にデバイス機器2を接続する際の処理について説明する。   Next, processing when the device device 2 is connected to the host device 1 will be described with reference to FIG.

ホスト機器1のインターフェイス10にデバイス機器2が接続されたことが検知されると(ステップB1)、マイクロプロセッサ7は、まず、デバイス機器2にバス電圧を供給することでデバイス機器2にリセットを要求する(ステップB2)。   When it is detected that the device device 2 is connected to the interface 10 of the host device 1 (step B1), the microprocessor 7 first requests the device device 2 to reset by supplying a bus voltage to the device device 2. (Step B2).

そして、デバイス機器2がリセットされて転送準備が整い次第、識別情報読込手段として機能するマイクロプロセッサ7が、デバイス規定情報となるディスクリプタ情報のうち必要最小限度のディスクリプタ情報、即ち、USBバージョンやプロトコル・コード等を規定したデバイス・ディスクリプタ情報と、当該デバイス機器2に設定されている固有のアドレス即ち識別情報をデバイス機器2から取得する(ステップB3)。   Then, as soon as the device device 2 is reset and ready for transfer, the microprocessor 7 functioning as the identification information reading means performs the minimum necessary descriptor information among the descriptor information serving as the device definition information, that is, the USB version, the protocol The device descriptor information defining the code and the like, and the unique address set to the device device 2, that is, the identification information are acquired from the device device 2 (step B3).

次いで、マイクロプロセッサ7は、このデバイス・ディスクリプタ情報に基づいて従来と同様にしてデバイス機器2にSetAddressコマンドを送信し、デバイス機器2をAddressed状態とする(ステップB4)。   Next, the microprocessor 7 transmits a SetAddress command to the device device 2 based on the device descriptor information in the same manner as in the past, and sets the device device 2 to the Addressed state (step B4).

その後、マイクロプロセッサ7は、ワークメモリ部9に休止フラグがセットされているか否か、即ち、最も最近に該ホスト機器1から取り外されたデバイス機器2の取り外し操作が、一時的な取り外しを前提として行われたものであるのか再接続の予定のない完全な取り外しを前提として行われたものであるのかを判定する(ステップB5)。   Thereafter, the microprocessor 7 presupposes whether or not the suspension flag is set in the work memory unit 9, that is, the removal operation of the device device 2 most recently removed from the host device 1 is temporarily removed. It is determined whether it has been performed or it has been performed on the premise of complete removal without a reconnection plan (step B5).

休止フラグのセットが確認されてステップB5の判定結果が真となった場合、つまり、前回のデバイス機器2の取り外し操作が一時的な取り外しを前提として行われたものである場合には、今回の処理で改めて接続を検知されたデバイス機器2が直前の取り外し操作で取り外されたデバイス機器2と同じものである確率が高いので、判定手段として機能するマイクロプロセッサ7は、更に、今回の処理で改めて接続を検知されたデバイス機器2からステップB3の処理で読み込んだ識別情報が、記憶手段である記憶装置6の格納部8に既に記憶されているか否か、要するに、このデバイス機器2が実際に直前の取り外し操作で取り外されたデバイス機器2と同じものであるか否かを判定する(ステップB6)。   If the set stop flag is confirmed and the determination result in step B5 is true, that is, if the previous removal operation of the device 2 is performed on the premise of temporary removal, Since there is a high probability that the device device 2 whose connection has been detected again in the process is the same as the device device 2 removed in the previous removal operation, the microprocessor 7 functioning as a determination unit further renews this process. Whether or not the identification information read in the process of step B3 from the device device 2 whose connection has been detected has already been stored in the storage unit 8 of the storage device 6 as a storage means. It is determined whether or not it is the same as the device device 2 removed by the removal operation (step B6).

ステップB6の判定結果が真となり、このデバイス機器2の識別情報が既に格納部8に記憶されていることが明らかとなった場合には、このデバイス機器2が直前の取り外し操作で取り外されたデバイス機器2と同じものであることを意味する。
しかも、このデバイス機器2のデバイス規定情報が格納部8に記憶されていること、および、このデバイス機器2に対応したデバイスドライバがワークメモリ部9に実行可能状態で保持されていることは既に保証済みであるから(ステップA3,ステップA4,ステップB5参照)、再マウント手段として機能するマイクロプロセッサ7は、格納部8に現時点で記憶されているデバイス規定情報であるコンフィギュレーション・ディスクリプタ情報,インターフェイス・ディスクリプタ情報,エンドポイント・ディスクリプタ情報を再利用することによって、デバイス機器2からの各種ディスクリプタ情報の取得処理やデバイスドライバのロード等に関わる処理を省略する(ステップB7)。
If the determination result of step B6 is true and it is clear that the identification information of the device device 2 is already stored in the storage unit 8, the device device 2 has been removed by the last removal operation. It means that it is the same as the device 2.
Moreover, it is already guaranteed that the device definition information of the device device 2 is stored in the storage unit 8 and that the device driver corresponding to the device device 2 is held in the work memory unit 9 in an executable state. (See step A3, step A4, and step B5), the microprocessor 7 functioning as the remounting means has configuration descriptor information, interface interface information, and device definition information currently stored in the storage unit 8. By reusing the descriptor information and the endpoint descriptor information, the processing related to the acquisition of various descriptor information from the device device 2 and the loading of the device driver is omitted (step B7).

これにより、図4に示した従来技術とは相違し、デバイス・ディスクリプタ情報以外のデバイス規定情報であるコンフィギュレーション・ディスクリプタ情報やインターフェイス・ディスクリプタ情報およびエンドポイント・ディスクリプタ情報等をデバイス機器2から取得するための処理(ステップC5参照)、更には、記憶装置6の格納部8からデバイス規定情報に見合ったデバイスドライバを探し出してワークメモリ部9にロードするための処理(ステップC6参照)が不要となる。   Thus, unlike the prior art shown in FIG. 4, configuration descriptor information, interface descriptor information, endpoint descriptor information, and the like, which are device definition information other than device descriptor information, are acquired from the device device 2. Processing (see step C5), and further, a process for searching for a device driver corresponding to the device definition information from the storage unit 8 of the storage device 6 and loading it into the work memory unit 9 (see step C6) become unnecessary. .

次いで、再マウント手段として機能するマイクロプロセッサ7は、デバイス機器2に対してSetConfigurationコマンドを送信し(ステップB8)、デバイス機器2をConfigured状態(初期設定完了状態)とすることで、デバイス機器2の使用準備を完了させる。   Next, the microprocessor 7 functioning as a remount unit transmits a SetConfiguration command to the device device 2 (step B8), and sets the device device 2 in the Configured state (initial setting completion state), thereby Complete preparation for use.

デバイス機器2がストレージ機器の場合には、更に、再マウント手段として機能するマイクロプロセッサ7が、ファイルシステムに対してデバイス機器2の使用準備が完了したことを通知し、ディスクパラメータや管理情報等の取得等に関わるマウント処理を行う必要があるが、デバイス機器2のディスクパラメータや管理情報等はデバイス規定情報の一部であり、これらの情報が記憶装置6の格納部8に前回の取り外し操作時点と同様にして保持されているため、デバイス機器2へのアクセスを行うことなくマウント処理を完了することができ、マウント処理が高速化される(ステップB9)。   When the device device 2 is a storage device, the microprocessor 7 functioning as a remount unit notifies the file system that the preparation for use of the device device 2 has been completed, and the disk parameters, management information, etc. Although it is necessary to perform mounting processing related to acquisition, the disk parameters and management information of the device device 2 are part of the device definition information, and these information are stored in the storage unit 8 of the storage device 6 at the time of the previous removal operation. Therefore, the mounting process can be completed without accessing the device device 2, and the mounting process is speeded up (step B9).

一方、ステップB5の判定結果が偽となってワークメモリ部9に休止フラグがセットされていないことが確認された場合、つまり、最も最近に行われたデバイス機器2の取り外し操作が完全な取り外しを前提としたものであって、識別情報や此れに対応するデバイス規定情報が既に格納部8の記憶領域から削除されていることが明らかとなった場合においては、格納部8のデバイス規定情報の再利用は不可能である。   On the other hand, when it is confirmed that the determination result in step B5 is false and the hibernation flag is not set in the work memory unit 9, that is, the most recent removal operation of the device 2 is completely removed. In the case where it is clear that the identification information and the device definition information corresponding thereto are already deleted from the storage area of the storage unit 8, the device definition information of the storage unit 8 Reuse is impossible.

また、ステップB6の判定結果が偽となり、今回の処理で改めて接続を検知されたデバイス機器2が直前の取り外し操作で取り外されたデバイス機器2と相違するものであることが明らかとなった場合には、格納部8にデバイス規定情報が存在し、ワークメモリ部9にデバイスドライバがロードされているとしても、これらのものが今回の処理で改めて接続を検知されたデバイス機器2のデバイス規定情報やデバイスドライバとして不適当なものであることは明らかである。   In addition, when the determination result of step B6 is false, and it is clear that the device device 2 whose connection has been detected again in this process is different from the device device 2 removed by the previous removal operation. Even if device definition information exists in the storage unit 8 and a device driver is loaded in the work memory unit 9, the device definition information and the device definition information of the device device 2 whose connection is detected again in the current process Obviously, it is inappropriate as a device driver.

従って、ステップB5もしくはステップB6の判定結果が偽となった場合、新規マウント手段として機能するマイクロプロセッサ7は、前述のステップB3の処理でデバイス機器2から取得した必要最小限度のディスクリプタ情報、即ち、USBバージョンやプロトコル・コード等を規定したデバイス・ディスクリプタ情報に基づいて、デバイス規定情報の他部を構成するディスクリプタ情報であるコンフィギュレーション・ディスクリプタ情報やインターフェイス・ディスクリプタ情報およびエンドポイント・ディスクリプタ情報等を改めてデバイス機器2から取得し、これらのデバイス規定情報を当該デバイス機器2の識別情報に対応させ、改めて記憶装置6の格納部8に上書きするかたちで更新して記憶させる(ステップB10)。
そして、更に、このデバイス規定情報に見合ったデバイスドライバを記憶装置6の格納部8から探し出してワークメモリ部9に上書きするかたちでロードして常駐させ(ステップB11)、デバイス機器2に対してSetConfigurationコマンドを送信し(ステップB12)、デバイス機器2の使用準備を完了させる。
Therefore, when the determination result in step B5 or step B6 is false, the microprocessor 7 functioning as a new mounting means, the minimum necessary descriptor information acquired from the device device 2 in the process of step B3 described above, that is, Based on the device descriptor information that defines the USB version, protocol code, etc., the configuration descriptor information, interface descriptor information, and endpoint descriptor information that are the descriptor information that constitutes the other part of the device specification information are revised. Obtained from the device device 2, the device definition information is made to correspond to the identification information of the device device 2, updated and stored in the storage unit 8 of the storage device 6 again (step B 10).
Further, a device driver corresponding to the device definition information is retrieved from the storage unit 8 of the storage device 6 and overwritten into the work memory unit 9 to be resident (step B11). A command is transmitted (step B12), and preparation for use of the device device 2 is completed.

デバイス機器2がストレージ機器の場合には、更に、ファイルシステムに対してデバイス機器2の使用準備が完了したことを通知し、ディスクパラメータや管理情報等の取得等のマウント処理を行う必要があるが、この場合は、デバイス機器2にアクセスしてデバイス機器2のディスクパラメータや管理情報等を取得する必要があるので、従来と同等の作業時間が必要である(ステップB13)。   When the device device 2 is a storage device, it is necessary to notify the file system that preparation for use of the device device 2 has been completed and to perform mount processing such as acquisition of disk parameters and management information. In this case, since it is necessary to access the device device 2 and acquire the disk parameters, management information, and the like of the device device 2, a work time equivalent to the conventional one is required (step B13).

なお、図3に示したステップB5の処理は、前述したステップA1の処理と同様、必ずしも必須の要件ではない。
アクセス中の取り外し操作による誤動作を考慮する必要のないデバイス機器2のみを取り扱うことを前提としてステップA1の処理を省略し、ホスト機器1からのデバイス機器2の取り外しを検知することで直ちにステップA3,ステップA4,ステップA5の処理を実行するようにした場合においては、休止フラグの設定状態を確認するためのステップB6の処理に意味はない。従って、ステップA1の処理を省略した構成においては、図3の処理からステップB6の処理を取り除き、ステップB4の処理を実行した後、直ちにステップB6の処理を実行し、その判定結果が真である場合にはステップB7の処理に移行し、また、判定結果が偽である場合にはステップB10の処理に移行するようにする。
In addition, the process of step B5 shown in FIG. 3 is not necessarily an indispensable requirement like the process of step A1 mentioned above.
The processing of step A1 is omitted on the assumption that only the device device 2 that does not need to consider malfunction due to the removal operation during access is performed, and step A3 is immediately detected by detecting the removal of the device device 2 from the host device 1. When the processing of step A4 and step A5 is executed, the processing of step B6 for confirming the setting state of the pause flag is meaningless. Therefore, in the configuration in which the process of step A1 is omitted, the process of step B6 is removed from the process of FIG. 3, the process of step B4 is executed, and then the process of step B6 is executed immediately, and the determination result is true. If so, the process proceeds to step B7. If the determination result is false, the process proceeds to step B10.

以上に述べたとおり、この実施形態では、デバイス機器2の取り外しを行う際に、デバイス機器2に関連するデバイス規定情報をホスト機器1側の記憶手段である記憶装置6の格納部8に保持し、かつ、当該デバイス機器2に対応するデバイスドライバをワークメモリ部9に常駐させたままの状態で通信の切断を許可するようにしているので、同じデバイス機器2が再接続された際の認識処理やイニシャライズ処理を最小限の処理にとどめることができ、デバイス機器2を接続してから使用準備が整うまでの待ち時間を短縮することができる。   As described above, in this embodiment, when the device device 2 is removed, the device definition information related to the device device 2 is held in the storage unit 8 of the storage device 6 that is a storage unit on the host device 1 side. In addition, since the disconnection of the communication is permitted while the device driver corresponding to the device device 2 remains resident in the work memory unit 9, the recognition process when the same device device 2 is reconnected And the initialization process can be kept to a minimum, and the waiting time until the device device 2 is connected and ready for use can be shortened.

この実施形態では、記憶装置6の格納部8に識別情報とデバイス規定情報の対応関係を常に1組だけ記憶し、新たなデバイス機器2の接続が検知される度に新たな識別情報とデバイス規定情報の対応関係を上書きするかたちで格納部8に更新記憶させ、また、記憶装置6のワークメモリ部9には、他のデバイス機器2からデバイス規定情報が改めて読み込まれるまでの間だけ直前の取り外し操作で取り外されたデバイス機器2に対応してロードされたデバイスドライバを1つだけ実行可能状態で常駐させるようにしているので、デバイス機器2の使用準備が整うまでの待ち時間を実際に短縮することができるのは、直前に接続されていたデバイス機器2が再接続された場合だけである。   In this embodiment, only one set of correspondence between the identification information and the device definition information is always stored in the storage unit 8 of the storage device 6, and new identification information and device definition each time a connection of a new device device 2 is detected. The storage unit 8 is updated and stored in the form of overwriting the correspondence of information, and the work memory unit 9 of the storage device 6 is removed immediately before the device definition information is read again from another device device 2. Since only one device driver loaded corresponding to the device device 2 removed by the operation is made resident in an executable state, the waiting time until the device device 2 is ready for use is actually shortened. It is possible only when the device device 2 connected immediately before is reconnected.

これに対し、記憶装置6の格納部8に識別情報とデバイス規定情報の対応関係を複数組み記憶させるようにした場合では、ホスト機器1に接続された経歴のある他のデバイス機器2が改めて該ホスト機器1に接続された場合を含め、デバイス機器2からデバイス規定情報を読み込むことなく当該デバイス機器2をマウントすることが可能となる。
この際、格納部8に記憶させることが可能な識別情報とデバイス規定情報の数には限界があるので、格納部8に記憶させる識別情報とデバイス規定情報の対応関係の組は、直前に接続の対象とされた幾つかのデバイス機器2に関連したものに制限し、古いものから順に削除するようにする。
記憶装置6の格納部8に識別情報とデバイス規定情報の対応関係を複数組記憶させるようにしただけでは、直前に接続されていたデバイス機器2が再接続された場合を除き、新たに接続されたデバイス機器2のデバイスドライバのロードが常に必要となるが、識別情報とデバイス規定情報の対応関係を複数組記憶させるだけでも、図4に示した従来技術とは相違し、デバイス・ディスクリプタ情報以外のデバイス規定情報であるコンフィギュレーション・ディスクリプタ情報やインターフェイス・ディスクリプタ情報およびエンドポイント・ディスクリプタ情報等をデバイス機器2から取得するための処理(ステップC5参照)が不要となることから、デバイス機器2を接続してから使用準備が整うまでの待ち時間の大幅な短縮が期待できる。
On the other hand, when a plurality of sets of correspondences between the identification information and the device definition information are stored in the storage unit 8 of the storage device 6, the other device device 2 with a history connected to the host device 1 reappears. The device device 2 can be mounted without reading the device definition information from the device device 2 including the case where it is connected to the host device 1.
At this time, since there is a limit to the number of identification information and device definition information that can be stored in the storage unit 8, the pair of correspondence relationships between the identification information and device definition information stored in the storage unit 8 is connected immediately before. Are limited to those related to several device devices 2 that are the targets of, and are deleted in order from the oldest.
By simply storing a plurality of sets of correspondences between the identification information and the device definition information in the storage unit 8 of the storage device 6, it is newly connected except when the device device 2 connected immediately before is reconnected. Although it is always necessary to load the device driver of the device device 2, it is different from the prior art shown in FIG. 4 only by storing a plurality of correspondence relationships between the identification information and the device definition information. Since the processing (refer to Step C5) for acquiring the configuration descriptor information, the interface descriptor information, the endpoint descriptor information, etc., which are the device definition information of the device, is not necessary, the device device 2 is connected. Can be expected to drastically shorten the waiting time from when it is ready to use.

また、デバイスドライバをロードするRAM等のワークメモリ部9の記憶容量に余裕があれば、複数のデバイスドライバをワークメモリ部9に常駐させるようにしてもよい。
デバイス機器2毎の識別情報に対応させて幾つかのデバイス規定情報を格納部8に保持し、更に、デバイス機器2毎の識別情報に対応する幾つかのデバイスドライバをワークメモリ部9に常駐させ、デバイス機器2から読み込まれた識別情報に応じて選択的にデバイス規定情報とデバイスドライバを使用することにより、比較的最近にホスト機器1に接続された経歴のある幾つかのデバイス機器2が改めて再接続された場合において、デバイス機器2からのデバイス規定情報の読み込みに加え、デバイスドライバのロードに関わる処理(ステップC5,ステップC6参照)を不要とし、デバイス機器2のマウントに要する所要時間を更に短縮することができる。
In addition, a plurality of device drivers may be resident in the work memory unit 9 as long as the storage capacity of the work memory unit 9 such as a RAM for loading the device driver is sufficient.
Some device definition information is held in the storage unit 8 in correspondence with the identification information for each device device 2, and some device drivers corresponding to the identification information for each device device 2 are made resident in the work memory unit 9. By selectively using the device definition information and the device driver according to the identification information read from the device device 2, some device devices 2 having a history of connection to the host device 1 relatively recently are renewed. In the case of reconnection, in addition to reading the device definition information from the device device 2, processing related to loading of the device driver (see Step C5 and Step C6) is unnecessary, and the time required for mounting the device device 2 is further increased. It can be shortened.

本発明のデバイス接続方法を適用した一実施形態のホスト機器と該ホスト機器に接続されたデバイス機器との接続状態の一例を示した機能ブロック図である。It is a functional block diagram showing an example of a connection state between a host device of an embodiment to which the device connection method of the present invention is applied and a device device connected to the host device. ホスト機器からデバイス機器を取り外す際の処理の概略を示したフローチャートである。It is the flowchart which showed the outline | summary of the process at the time of removing a device apparatus from a host apparatus. ホスト機器にデバイス機器を接続する際の処理の概略を示したフローチャートである。It is the flowchart which showed the outline of the process at the time of connecting a device apparatus to a host apparatus. USBホスト機器にUSBデバイス機器を接続する際の従来処理の概略について示したフローチャートである。It is the flowchart shown about the outline of the conventional process at the time of connecting a USB device apparatus to a USB host apparatus.

符号の説明Explanation of symbols

1 ホスト機器(USB接続に対応したパーソナルコンピュータ)
2 デバイス機器(USB接続に対応したストレージ機器)
3 USBケーブル
4 USB通信装置
5 演算装置
6 記憶装置(記憶手段)
7 マイクロプロセッサ(識別情報読込手段,判定手段,再マウント手段,新規マウント手段)
8 格納部(ハードディスク)
9 ワークメモリ部(RAM)
1 Host device (personal computer that supports USB connection)
2 Device devices (storage devices that support USB connection)
3 USB cable 4 USB communication device 5 arithmetic device 6 storage device (storage means)
7 Microprocessor (identification information reading means, judgment means, remount means, new mount means)
8 Storage (hard disk)
9 Work memory (RAM)

Claims (7)

ホスト機器とデバイス機器をインターフェイスを介して接続する際にホスト機器がデバイス機器のデバイス規定情報を参照して自動的にデバイス機器をマウントするようにしたデバイス接続方法であって、
前記インターフェイスに対するデバイス機器の接続を前記ホスト機器が検知した時点で、該デバイス機器の識別情報を前記ホスト機器が読み込み、
該読み込まれた識別情報が前記ホスト機器に記憶されていれば、該ホスト機器が当該識別情報に対応して記憶しているデバイス規定情報を適用して前記デバイス機器をマウントする一方、
前記読み込まれた識別情報が前記ホスト機器に記憶されていなければ、該デバイス機器からデバイス規定情報を改めて読み込み、該デバイス機器から読み込んだデバイス規定情報を該デバイス機器の識別情報に対応させて前記ホスト機器に記憶し、該デバイス規定情報を適用して前記デバイス機器をマウントすることを特徴としたデバイス接続方法。
A device connection method in which when a host device and a device device are connected via an interface, the host device automatically mounts the device device with reference to the device specification information of the device device,
When the host device detects the connection of the device device to the interface, the host device reads the identification information of the device device,
If the read identification information is stored in the host device, the host device mounts the device device by applying device definition information stored corresponding to the identification information,
If the read identification information is not stored in the host device, the device definition information is read again from the device device, and the device definition information read from the device device is associated with the identification information of the device device and the host device A device connection method characterized by storing in a device and mounting the device device by applying the device definition information.
前記ホスト機器が、識別情報とデバイス規定情報を更新して記憶し、デバイス機器から前記ホスト機器にデバイス規定情報が改めて読み込まれるまでの間、前記ホスト機器が前記デバイス機器をマウントする際にロードしたデバイスドライバを実行可能状態で保持することを特徴とした請求項1記載のデバイス接続方法。   The host device updates and stores the identification information and device definition information, and the host device loads the device device until the device specification information is read again from the device device to the host device. The device connection method according to claim 1, wherein the device driver is held in an executable state. 前記ホスト機器が、識別情報とデバイス規定情報との対応関係を複数組記憶することを特徴とした請求項1記載のデバイス接続方法。   The device connection method according to claim 1, wherein the host device stores a plurality of sets of correspondence relationships between identification information and device definition information. 前記ホスト機器が、前記各デバイス機器をマウントする際にロードしたデバイスドライバと各識別情報との対応関係を保持して、複数のデバイスドライバを実行可能状態で保持し、前記ホスト機器が、読み込まれた識別情報に応じて選択的に前記デバイスドライバを使用することを特徴とした請求項3記載のデバイス接続方法。   The host device holds the correspondence between the device driver loaded when mounting each device device and each identification information, holds a plurality of device drivers in an executable state, and the host device is read. 4. The device connection method according to claim 3, wherein the device driver is selectively used according to the identification information. 前記デバイス機器がUSBデバイスであって、前記デバイス規定情報が、デバイス,コンフィギュレーション,インターフェイス,エンドポイントの各ディスクリプタ情報によって構成されていることを特徴とする請求項1,請求項2,請求項3または請求項4記載のデバイス接続方法。   The device device is a USB device, and the device specification information is constituted by descriptor information of a device, a configuration, an interface, and an endpoint. Or the device connection method of Claim 4. インターフェイスを介してデバイス機器を接続する際にデバイス機器のデバイス規定情報を参照して自動的にデバイス機器をマウントするようにしたホスト機器であって、
前記インターフェイスに対するデバイス機器の接続を検知した時点で該デバイス機器の識別情報を読み込む識別情報読込手段と、
前記読み込まれた識別情報が該ホスト機器の記憶手段に記憶されているか否かを判定する判定手段と、
前記判定手段による判定結果が真となった場合に、当該識別情報に対応して前記記憶手段に記憶されているデバイス規定情報を適用して前記デバイス機器をマウントする再マウント手段と、
前記判定手段による判定結果が偽となった場合に、該デバイス機器からデバイス規定情報を改めて読み込み、該デバイス機器から読み込んだデバイス規定情報を該デバイス機器の識別情報に対応させて前記記憶手段に記憶させ、該デバイス規定情報を適用して前記デバイス機器をマウントする新規マウント手段とを備えたことを特徴としたホスト機器。
A host device that automatically mounts a device device by referring to the device specification information of the device device when connecting the device device via an interface,
Identification information reading means for reading identification information of the device device at the time of detecting connection of the device device to the interface;
Determination means for determining whether or not the read identification information is stored in the storage means of the host device;
When the determination result by the determination unit is true, a remount unit that mounts the device device by applying the device definition information stored in the storage unit corresponding to the identification information;
When the determination result by the determination unit becomes false, the device definition information is read from the device device again, and the device definition information read from the device device is stored in the storage unit in association with the identification information of the device device. And a new mounting means for mounting the device device by applying the device definition information.
インターフェイスを介してデバイス機器を接続する際にデバイス機器のデバイス規定情報に基づいて自動的にデバイス機器をマウントするようにしたデバイス機器接続用プログラムであって、
デバイス機器の接続対象となるホスト機器のマイクロプロセッサを、
前記インターフェイスに対するデバイス機器の接続を検知した時点で該デバイス機器の識別情報を読み込む識別情報読込手段、
前記読み込まれた識別情報が該ホスト機器の記憶手段に記憶されているか否かを判定する判定手段、
前記判定手段による判定結果が真となった場合に、当該識別情報に対応して前記記憶手段に記憶されているデバイス規定情報を適用して前記デバイス機器をマウントする再マウント手段、および、
前記判定手段による判定結果が偽となった場合に、該デバイス機器からデバイス規定情報を改めて読み込み、該デバイス機器から読み込んだデバイス規定情報を該デバイス機器の識別情報に対応させて前記記憶手段に記憶させ、該デバイス規定情報を適用して前記デバイス機器をマウントする新規マウント手段として機能させることを特徴としたデバイス機器接続用プログラム。
A device device connection program that automatically mounts a device device based on device specification information of the device device when the device device is connected through an interface,
The microprocessor of the host device to which the device device is connected
Identification information reading means for reading identification information of the device device at the time of detecting connection of the device device to the interface;
Determination means for determining whether or not the read identification information is stored in the storage means of the host device;
When the determination result by the determination unit becomes true, a remount unit that mounts the device device by applying the device definition information stored in the storage unit corresponding to the identification information, and
When the determination result by the determination unit becomes false, the device definition information is read from the device device again, and the device definition information read from the device device is stored in the storage unit in association with the identification information of the device device. And a device device connection program that functions as new mounting means for mounting the device device by applying the device definition information.
JP2006178812A 2006-06-28 2006-06-28 Device connecting method, host equipment, and program for connecting device equipment Pending JP2008009659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006178812A JP2008009659A (en) 2006-06-28 2006-06-28 Device connecting method, host equipment, and program for connecting device equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006178812A JP2008009659A (en) 2006-06-28 2006-06-28 Device connecting method, host equipment, and program for connecting device equipment

Publications (1)

Publication Number Publication Date
JP2008009659A true JP2008009659A (en) 2008-01-17

Family

ID=39067827

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006178812A Pending JP2008009659A (en) 2006-06-28 2006-06-28 Device connecting method, host equipment, and program for connecting device equipment

Country Status (1)

Country Link
JP (1) JP2008009659A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101349807B1 (en) 2012-08-24 2014-01-09 주식회사 포멀웍스 Security system for mobile storage and method thereof
US9179014B2 (en) 2009-06-24 2015-11-03 Canon Kabushiki Kaisha Information processing apparatus, and method for controlling the same
US9529761B2 (en) 2014-02-26 2016-12-27 Panasonic Corporation Data transfer apparatus, host apparatus, data transfer system, and communication mode setting method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004252936A (en) * 2002-12-27 2004-09-09 Canon Sales Co Inc Information processing device, control method for the same, program, and recording medium
JP2005050064A (en) * 2003-07-31 2005-02-24 Ricoh Co Ltd Coordinate input device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004252936A (en) * 2002-12-27 2004-09-09 Canon Sales Co Inc Information processing device, control method for the same, program, and recording medium
JP2005050064A (en) * 2003-07-31 2005-02-24 Ricoh Co Ltd Coordinate input device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9179014B2 (en) 2009-06-24 2015-11-03 Canon Kabushiki Kaisha Information processing apparatus, and method for controlling the same
KR101349807B1 (en) 2012-08-24 2014-01-09 주식회사 포멀웍스 Security system for mobile storage and method thereof
WO2014030978A1 (en) * 2012-08-24 2014-02-27 주식회사 포멀웍스 Mobile storage medium safety system and method thereof
US9529761B2 (en) 2014-02-26 2016-12-27 Panasonic Corporation Data transfer apparatus, host apparatus, data transfer system, and communication mode setting method

Similar Documents

Publication Publication Date Title
US10019253B2 (en) Systems and methods of updating hot-pluggable devices
US20140122851A1 (en) Transferring files to a baseboard management controller (&#39;bmc&#39;) in a computing system
CN105511936B (en) Test system, method and device
JP2001100983A (en) Control method of computer, computer, and recording medium
JP2010044579A (en) Peripheral device, program, and driver installation system
JP6070360B2 (en) Information processing apparatus and processing method thereof
WO2017185954A1 (en) Method, host, and system for implementing usb device management
JP2007272430A (en) Drive configuration setting program
JP7002358B2 (en) Information processing system, information processing device, BIOS update method of information processing device, and BIOS update program of information processing device
WO2020035061A1 (en) Method and device for identifying type of memory device externally connected to smart television
CN106325563B (en) Data storage device for identifying electronic devices and corresponding method
JP3707410B2 (en) Computer apparatus, expansion device management method, and computer program
JP2008009659A (en) Device connecting method, host equipment, and program for connecting device equipment
US20170199733A1 (en) Method for terminal to update operating system, terminal and system
JP6695942B2 (en) Information processing apparatus, control method, and program
CN114185720B (en) Method, device, equipment and storage medium for dynamic hot backup of server
JP4482044B2 (en) Information processing apparatus and device controller drive control method
CN105511904A (en) Method and apparatus for automatically updating shortcut window
US7979595B2 (en) External apparatus function extension application system and firmware download driver system
US7664128B2 (en) Portable information terminal, IP address setting program, and IP address setting method
JP4141409B2 (en) External peripherals
JP5163180B2 (en) Device controller
US9141565B2 (en) Memory bus attached input/output (‘I/O’) subsystem management in a computing system
JP2007207089A (en) External storage device controller and program
JP2008191957A (en) Computer system, and file system automatic setting and os activation method therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090519

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110614

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110615

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20111108