JP5581836B2 - Communication method and device apparatus - Google Patents
Communication method and device apparatus Download PDFInfo
- Publication number
- JP5581836B2 JP5581836B2 JP2010137213A JP2010137213A JP5581836B2 JP 5581836 B2 JP5581836 B2 JP 5581836B2 JP 2010137213 A JP2010137213 A JP 2010137213A JP 2010137213 A JP2010137213 A JP 2010137213A JP 5581836 B2 JP5581836 B2 JP 5581836B2
- Authority
- JP
- Japan
- Prior art keywords
- class
- host
- usb
- connection
- time
- 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.)
- Active
Links
Images
Landscapes
- Information Transfer Systems (AREA)
- Studio Devices (AREA)
Description
本発明は、通信方法及びデバイス装置に関するものである。 The present invention relates to a communication method and a device apparatus.
近年、ホスト機能を有するコンピュータ(ホスト装置)とそれに接続した周辺機器(デバイス装置)との間で通信を行うためのシリアルインターフェースの一種として、USB(Universal Serial Bus)インターフェース(以下、単にUSBともいう。)が普及している。 In recent years, a USB (Universal Serial Bus) interface (hereinafter also simply referred to as USB) is a kind of serial interface for performing communication between a computer having a host function (host device) and a peripheral device (device device) connected thereto. .) Is popular.
このようなUSBによりホスト装置とデバイス装置とが接続されると、ホスト装置側から接続リクエストが実施される。すなわち、図10に示すように、バスリセット後、ホスト装置はデバイス装置のデバイス種類を確認する(デバイスリクエスト)。デバイス装置からデバイス種類の情報を含むデバイスディスクリプタを受信すると、続いて、ホスト装置はデバイス装置に設定されているデバイスクラスを確認する(コンフィグレーションリクエスト)。デバイス装置からデバイスクラスの情報を含むコンフィグレーションディスクリプタが返送され、そのデバイスクラスがホスト装置の対応しているクラスである場合には、ホスト装置は、そのクラスでデバイス装置と接続するために接続クラスを指定する(セットコンフィグレーション)。その後、デバイス装置から接続結果が返送されると、指定されたデバイスクラスの通信プロトコルで通信が開始される。 When the host device and the device device are connected by such USB, a connection request is executed from the host device side. That is, as shown in FIG. 10, after the bus reset, the host device confirms the device type of the device device (device request). When a device descriptor including device type information is received from the device device, the host device then confirms the device class set in the device device (configuration request). When a configuration descriptor including device class information is returned from the device device, and the device class is a class supported by the host device, the host device connects to the device device with that class. Is specified (set configuration). After that, when the connection result is returned from the device device, communication is started with the communication protocol of the designated device class.
ここで、デバイス装置が複数のデバイスクラスに対応している場合には、ユーザがホスト装置側とデバイス装置側の対応を判断して、複数のデバイスクラスの中から1つのデバイスクラスを事前に選択する必要がある。このようなデバイスクラスの選択には、ホスト装置やデバイス装置の知識のみならず、USBの知識も必要となる。このため、デバイスクラスを選択することは、不慣れなユーザにとっては判断が難しく煩雑な作業となる。 Here, if the device device supports multiple device classes, the user determines the correspondence between the host device side and the device device side, and selects one device class from the multiple device classes in advance. There is a need to. Such device class selection requires not only knowledge of the host device and device device, but also knowledge of USB. For this reason, selecting a device class is difficult and difficult for an unfamiliar user.
そこで、このようなデバイスクラスの選択操作におけるユーザの利便性を向上させる様々な方法が提案されている。
例えば第1の従来例としては、ホスト装置がデバイス装置の対応している複数のデバイスクラスの中から1つのデバイスクラスを自動的に選択する方法が提案されている(例えば、特許文献1参照)。
Therefore, various methods for improving user convenience in such device class selection operations have been proposed.
For example, as a first conventional example, a method is proposed in which a host device automatically selects one device class from a plurality of device classes corresponding to the device device (see, for example, Patent Document 1). .
また、第2の従来例としては、デバイス装置がホスト装置との接続状況を判断して自動的に接続クラスを切り替える方法が提案されている(例えば、特許文献2参照)。 As a second conventional example, a method has been proposed in which the device apparatus determines the connection status with the host apparatus and automatically switches the connection class (see, for example, Patent Document 2).
ところが、上述した第1及び第2の従来例にもそれぞれ以下のような問題点がある。
すなわち、第1の従来例では、ホスト装置の都合で接続クラスが選択されるため、ユーザの意図するデバイスクラスで接続できない場合がある。具体的には、コンピュータにMassStorageClass(MSC)とPictureTransferProtocol(PTP)に対応したデジタルスチルカメラを接続すると、コンピュータ側の都合で常にMSCで接続されることになる。このため、ユーザがPTPで接続したい場合に、ユーザの意図に沿ったデバイスクラスで動作させることができないという問題がある。
However, the first and second conventional examples described above also have the following problems.
That is, in the first conventional example, since the connection class is selected for the convenience of the host device, there are cases where connection cannot be made with the device class intended by the user. Specifically, when a digital still camera compatible with Mass Storage Class (MSC) and Picture Transfer Protocol (PTP) is connected to a computer, it is always connected with MSC for the convenience of the computer. For this reason, when a user wants to connect by PTP, there exists a problem that it cannot be operated by the device class according to a user's intent.
また、第2の従来例では、デバイス装置が当該デバイス装置の対応するデバイスクラスを順番にホスト装置と接続可能か否かを判断し、最初に接続可能と判断された接続クラスで接続を行うため、ユーザの意図するデバイスクラスで接続できない場合がある。具体的には、MSCとPictbridge(登録商標)に対応したプリンタに対して、同様にMSCとPictbridge(登録商標)に対応したデジタルスチルカメラを接続すると、MSCから接続確認が実行されるため、常にMSCで接続されることになる。このため、ユーザがPictbridge(登録商標)で接続したい場合に、ユーザの意図に沿ったデバイスクラスで動作させることができないという問題がある。 In the second conventional example, the device apparatus determines in order whether or not the device class corresponding to the device apparatus can be connected to the host apparatus, and performs connection using the connection class determined to be connectable first. In some cases, connection may not be possible with the device class intended by the user. Specifically, when a digital still camera compatible with MSC and Pictbridge (registered trademark) is connected to a printer compatible with MSC and Pictbridge (registered trademark), connection confirmation is executed from the MSC. It will be connected by MSC. For this reason, when the user wants to connect with Pictbridge (registered trademark), there is a problem that the device class cannot be operated in accordance with the user's intention.
本発明の一観点によれば、デバイス装置が、前記デバイス装置の対応している全てのデバイスクラスについてホスト装置と接続可能か否かを判断する接続確認ステップと、前記接続確認ステップで前記ホスト装置と接続可能と判断されたデバイスクラスを出力部に出力する出力ステップと、前記出力部に出力されたデバイスクラスの中から1つのデバイスクラスが選択されたときに、前記選択されたデバイスクラスでデータ通信を開始するステップと、を含み、前記接続確認ステップは、前記デバイス装置から前記ホスト装置へのデバイスクラスの通知から所定の制限時間内に、前記デバイス装置が前記ホスト装置からの接続クラスの指示を受信できるか否かにより、前記通知したデバイスクラスが前記ホスト装置と接続可能か否かを判断し、前記制限時間は、前記ホスト装置側で前記デバイス装置との物理的な接続を検出した際に発生されるバスリセットから、前記デバイス装置が前記ホスト装置からのデバイスクラスの問い合わせを受信するまでの応答時間に基づいて設定される。 According to one aspect of the present invention, the device apparatus, a connection confirmation step of determining whether or not connectable to the host apparatus for all the device classes corresponding to that of the device apparatus, the host apparatus by the connection confirmation step And outputting the device class determined to be connectable to the output unit, and when one device class is selected from the device classes output to the output unit, the data in the selected device class seen containing a step of starting the communication, wherein the connect confirmation step, from the device unit within a predetermined time limit from the notification of the device class to the host device, wherein the device device connection class from the host device It is determined whether the notified device class can be connected to the host device depending on whether the instruction can be received. The time limit is a response from the bus reset generated when the host device side detects a physical connection with the device device until the device device receives a device class inquiry from the host device. Set based on time .
本発明の一観点によれば、クラス選択におけるユーザの利便性を向上させつつも、ユーザの意図に沿ったデバイスクラスを選択することができる。 According to one aspect of the present invention, it is possible to select a device class in accordance with a user's intention while improving user convenience in class selection.
以下、一実施形態を図1〜図9に従って説明する。
図1に示すように、データ転送システムは、デバイス装置としてのデジタルスチルカメラ(DSC)10と、ホスト装置としてのパーソナルコンピュータ(PC)30と、ホスト装置としてのプリンタ40とを含む。
Hereinafter, an embodiment will be described with reference to FIGS.
As shown in FIG. 1, the data transfer system includes a digital still camera (DSC) 10 as a device device, a personal computer (PC) 30 as a host device, and a
DSC10は、USBケーブル50を介してPC30又はプリンタ40に着脱自在に接続される。このDSC10は、複数のデバイスクラスに対応したUSBデバイスである。また、DSC10は、複数のデバイスクラスのうちの1つのデバイスクラスを選択してPC30又はプリンタ40との間で通信を行うことができる。この複数のデバイスクラスには、例えばMassStorageClass(MSC)と、StillImageClass(SIC)と、UsbVideoClass(UVC)と、UsbAudioClass(UAC)とが含まれる。なお、上記SICは、PictureTransferProtocol(PTP)やPictBridgeが利用するクラスである。
The DSC 10 is detachably connected to the PC 30 or the
ここで、本実施形態では、PC30がMSC、SIC及びUVCに対応しているとともに、プリンタ40がMSC及びSICに対応している。このため、DSC10とPC30との間では、MSC、SIC及びUVCのうちの1つのデバイスクラスの通信プロトコルに基づいて通信が行われる。また、DSC10とプリンタ40との間では、MSC及びSICのうちの1つのデバイスクラスの通信プロトコルに基づいて通信が行われる。
Here, in this embodiment, the PC 30 supports MSC, SIC, and UVC, and the
次に、DSC10の内部構成例を図2に従って説明する。
図2に示すように、DSC10は、撮像部11と、画像処理手段12と、出力制御手段13と、表示部14と、メディア制御手段16と、メモリメディア17と、入力部18と、システム制御手段19と、USB制御手段20と、USB接続解除部22と、USBコネクタ23とを含む。画像処理手段12と、出力制御手段13と、メディア制御手段16と、システム制御手段19とは、バス25によって互いに接続されている。なお、このバス25は、アドレスバス、コントロールバス及びデータバスを含む。
Next, an example of the internal configuration of the
As shown in FIG. 2, the DSC 10 includes an
撮像部11は、対象物を撮像して画像データを生成する。この撮像部11は、撮像センサとA/D変換回路を含む。なお、撮像センサとしては、CCD(Charge Coupled Device)イメージセンサやCMOS(Complementary MOS)イメージセンサなどを用いることができる。
The
画像処理手段12は、撮像部11から入力される画像データに対して、例えばガンマ補正、ホワイトバランス調整、及びRGB−YUV変換処理等の各種画像処理を施す。また、画像処理手段12は、画像処理の施された画像データをJPEG方式やMPEG方式等により符号化する。そして、画像処理手段12は、符号化後の画像データを、メディア制御手段16を介してメモリメディア17に記録する。また、画像処理手段12は、メモリメディア17から読み出される画像データを復号化し、その復号化後の画像データを、出力制御手段13を介して表示部14に出力する。
The
出力制御手段13は、例えば画像処理手段12から入力する画像データを、表示部14が対応し得る形式のデータに変換して該表示部14に出力する。表示部14は、出力制御手段13から入力する画像データに基づく画像や各種設定画面(例えば、図4に示すデバイスクラスの選択画面)を表示する。なお、表示部14としては、例えば液晶ディスプレイ(Liquid Crystal Display:LCD)や有機EL(Electronic Luminescence)などが用いることができる。
The output control means 13 converts, for example, image data input from the image processing means 12 into data in a format that can be supported by the
メディア制御手段16は、メモリメディア17に対するデータの入出力を実行する。メモリメディア17には、画像処理手段12から出力される符号化後の画像データ等がメディア制御手段16を通じて記憶される。このメモリメディア17は、DSC10に挿脱自在に設けられている。なお、メモリメディア17としては、例えばコンパクトフラッシュ(登録商標)やSDメモリカード(登録商標)などの携帯型メモリカードを用いることができる。
The media control means 16 executes data input / output with respect to the
入力部18は、ユーザにより操作される各種ボタンを有し、ユーザの操作情報を入力する。なお、入力部18の各種ボタンとしては、図4(a)に示すように、シャッターボタン18aと、上矢印キー18bと、下矢印キー18cと、左矢印キー18dと、右矢印キー18eと、矢印キー18b〜18eの操作によって選択した項目を実行させるための実行ボタン18fと、メニュー画面を表示させるためのメニューボタン18gと、を含む。
The
図2に示すシステム制御手段19は、画像処理手段12、出力制御手段13、メディア制御手段16及びUSB制御手段20を統括制御するもので、データや画像の解析、解析結果に基づく必要な情報の各回路への設定及びデータの書き込み/読み出し制御等を行う。このシステム制御手段19は、入力部18の各種ボタン18a〜18gにより設定・指定された操作情報に基づいて、各手段12,13,16,20の動作を制御する。なお、システム制御手段19は、タイマ19aを内蔵している。
The system control means 19 shown in FIG. 2 controls the image processing means 12, the output control means 13, the media control means 16 and the USB control means 20, and analyzes necessary data based on data and image analysis and analysis results. Settings for each circuit and data write / read control are performed. This system control means 19 controls the operation of each means 12, 13, 16, 20 based on operation information set and designated by the
USB制御手段20は、システム制御手段19の制御に基づいて、USB接続状態や通信を制御する。具体的には、USB制御手段20は、当該DSC10がホスト装置(PC30又はプリンタ40)と接続された際に、当該DSC10の対応しているデバイスクラスの全てについてホスト装置側が対応しているか否かを判断する。そして、USB制御手段20は、ホスト装置と接続可能(ホスト装置が対応している)と判断されたデバイスクラスをリスト化し、そのリストを上記表示部14に表示させる。
The
また、USB制御手段20は、USBコネクタ23やUSBケーブル50を介して接続されるPC30又はプリンタ40との間でデータの送受信を行うためのUSBインターフェース21を有する。このUSBインターフェース21には、USBケーブル50の接続されるUSBコネクタ23がUSB接続解除部22を介して接続されている。
The
USB接続解除部22は、USB制御手段20から入力する制御信号CSに応じて、USBコネクタ23に接続される信号線(図3に示すVbusラインL1、D+ラインL2及びD−ラインL3)を所定時間だけハイインピーダンス状態とするための回路である。
The USB
ここで、USB接続解除部22の内部構成例を図3に従って説明する。
まず、USBコネクタ23には、ホスト装置(ここでは、PC30)から所定電圧(例えば、+5V)が供給されるVbusラインL1と、データを伝達するD+ラインL2及びD−ラインL3と、基準電位を与えるGNDラインL4との4本の信号線が接続されている。そして、これらの信号線は、USBコネクタ23及びUSBケーブル50を介してPC30内のUSBコネクタ31に接続されている。以下、説明の便宜上、DSC10のUSBコネクタ23に接続される信号線L1〜L3を、PC30のUSBコネクタ31に接続される信号線L1〜L3とも言う。
Here, an example of the internal configuration of the USB
First, the
また、上記信号線L1〜L3は、DSC10内において、USB接続解除部22を介してUSBインターフェース21に接続される信号線L11〜L13と接続されている。このUSB接続解除部22は、NチャネルMOSトランジスタT1〜T7と、抵抗R1〜R3と、インバータ回路22aとを含む。以下、信号線L1〜L4と、USB接続解除部22と、信号線L11〜L13との接続関係について詳述する。
The signal lines L1 to L3 are connected to the signal lines L11 to L13 connected to the
USBコネクタ23に接続されるVbusラインL1は、トランジスタT1を介してVbusラインL11に接続されている。このVbusラインL11は、USBインターフェース21のVbus端子に接続されている。また、上記VbusラインL1は、トランジスタT2を介して抵抗R1の第1端子に接続されている。この抵抗R1の第2端子はGNDラインL4に接続されている。また、USBインターフェース21のVbus端子(VbusラインL11)には、トランジスタT3を介してバイアス電圧VB(例えば、+5V)が供給される。
The Vbus line L1 connected to the
USBコネクタ23に接続されるD+ラインL2は、トランジスタT4を介してD+ラインL12に接続されている。このD+ラインL12は、USBインターフェース21のD+端子に接続されている。また、上記D+ラインL2は、トランジスタT5を介して抵抗R2の第1端子に接続されている。この抵抗R2の第2端子はGNDラインL4に接続されている。
The D + line L2 connected to the
USBコネクタ23のD−端子に接続されるD−ラインL3は、トランジスタT6を介してD−ラインL13に接続されている。このD−ラインL13は、USBインターフェース21のD−端子に接続されている。また、上記D−ラインL3は、トランジスタT7を介して抵抗R3の第1端子に接続されている。この抵抗R3の第2端子はGNDラインL4に接続されている。なお、抵抗R1〜R3の抵抗値は、VbusラインL1、D+ラインL2及びD−ラインL3がそれら抵抗R1〜R3にそれぞれ接続された際に、各信号線L1〜L3をハイインピーダンス状態にすることができる程度の高抵抗値に設定されている。
The D-line L3 connected to the D-terminal of the
USBコネクタ23に接続されるGNDラインL4は、USBインターフェース21のGND端子に接続されている。
上記トランジスタT1,T4,T6のゲートには、USB制御手段20から出力される制御信号CSが供給される。また、トランジスタT2,T3,T5,T7のゲートには、制御信号CSがインバータ回路22aを介してそれぞれ供給される。
The GND line L4 connected to the
A control signal CS output from the USB control means 20 is supplied to the gates of the transistors T1, T4, T6. A control signal CS is supplied to the gates of the transistors T2, T3, T5, and T7 via the inverter circuit 22a.
このため、Hレベルの制御信号CSが入力されると、トランジスタT1,T4,T6がオンされるとともに、トランジスタT2,T3,T5,T7がオフされる。すると、信号線L1〜L3が信号線L11〜L13にそれぞれ接続される。このとき、DSC10とPC30とがUSBケーブル50によって接続されていると、PC30のUSBコネクタ31に接続される信号線L1〜L3が信号線L11〜L13を介してDSC10のUSBインターフェース21に接続されることになる。すなわち、DSC10とPC30とがUSB接続された状態となる。
Therefore, when an H level control signal CS is input, the transistors T1, T4, and T6 are turned on, and the transistors T2, T3, T5, and T7 are turned off. Then, the signal lines L1 to L3 are connected to the signal lines L11 to L13, respectively. At this time, if the
一方、Lレベルの制御信号CSが入力されると、トランジスタT1,T4,T6がオフされるとともに、トランジスタT2,T3,T5,T7がオンされる。すると、信号線L1〜L3が抵抗R1〜R3にそれぞれ接続される。このとき、DSC10とPC30とがUSBケーブル50によって接続されていたとしても、PC30のUSBコネクタ31に接続される信号線L1〜L3が抵抗R1〜R3に接続されることになる。すなわち、PC30のUSBコネクタ31に接続される信号線L1〜L3は、ハイインピーダンス状態となり、USBケーブル50がDSC10と物理的に接続されていない場合と同様の状態となる。このため、PC30側では、DSC10とのUSB接続が解除されたと判断される。このとき、USBインターフェース21のVbus端子(VbusラインL11)には、トランジスタT3を介してバイアス電圧VBが供給される。これにより、DSC10において、PC30とのUSB接続が解除されたと判断されることを防止することができる。
On the other hand, when the L level control signal CS is input, the transistors T1, T4, T6 are turned off, and the transistors T2, T3, T5, T7 are turned on. Then, the signal lines L1 to L3 are connected to the resistors R1 to R3, respectively. At this time, even if the
さらに、制御信号CSがLレベルからHレベルに切り替わると、上述の場合と同様に、PC30のUSBコネクタ31に接続される信号線L1〜L3が信号線L11〜L13を介してDSC10のUSBインターフェース21に接続されることになる。このため、PC30側では、DSC10とのUSB接続が検出される。これにより、上述したPC30側におけるUSB接続の解除状態をリセットすることができる。
Further, when the control signal CS is switched from the L level to the H level, the signal lines L1 to L3 connected to the
このように、このUSB接続解除部22では、DSC10とPC30とがUSBケーブル50によって接続されている状態で、PC30のUSBコネクタ31に接続される信号線L1〜L3をハイインピーダンス状態にすることにより、PC30側でUSB接続が解除されたと認識させる。また、USB接続解除部22では、信号線L1〜L3のハイインピーダンス状態を解除して信号線L1〜L3をDSC10のUSBインターフェース21に接続することにより、PC30側でUSB接続を検出させる。
As described above, the USB
次に、このように構成されたDSC10とホスト装置30との通信方法(とくに、デバイスクラスの選択方法)について図4〜図9に従って説明する。
DSC10とPC30とがUSBケーブル50によって接続されると、DSC10内のUSB制御手段20は、当該DSC10の対応している全てのデバイスクラスについてPC30と接続可能か否かを判断する。ここで、USB制御手段20は、各デバイスクラスについてコンフィグレーションディスクリプタをPC30に返答した後に、所定の制限時間内にPC30からセットコンフィグレーションを受信するか否かにより、当該デバイスクラスがPC30と接続可能か否かを判断する。そこで、USB制御手段20は、まず制限時間TLを求めるために図5に示すステップS1〜S7(ステップS17、S18)の処理を実行する。
Next, a communication method (particularly, a device class selection method) between the
When the
すなわち、DSC10とPC30とがUSBケーブル50によって接続されると、USB制御手段20は、当該USB制御手段20の有する初期値テーブル20aから係数n及びステップ幅St1,St2の値(例えば、n=2,St1=1,St=2)を取得する(ステップS1)。次に、USB制御手段20は、ループ回数Lpを初期値(0回)に設定し、ドライバロード時間TDを初期値(例えば15秒)に設定し、さらに当該USB制御手段20の有する登録リスト20bを初期化する(ステップS2)。その後、USB制御手段20は、制限時間TLを0秒に設定する(ステップS3)。
That is, when the
次に、USB制御手段20は、制限時間TLを設定するためのパケット応答時間TPを計測する(ステップS4)。ここで、パケット応答時間TPの計測方法について説明する。図7に示すように、DSC10とPC30とがUSBケーブル50によって接続されると、PC30側でその物理的な接続(USB接続)が検出され、PC30がバスリセットを発生する。そのバスリセット後に、PC30は、DSC10のデバイス種類を確認するためにデバイスリクエストをDSC10に送信する。すると、DSC10は、デバイスディスクリプタをPC30に返送する。このデバイスディスクリプタを受信すると、PC30は、DSC10に設定されているデバイスクラスを確認するためにコンフィグレーションリクエストをDSC10に送信する。このとき、DSC10では、USB接続時に発生するバスリセットから、最初のコンフィグレーションリクエストの受信までの時間をパケット応答時間TPとして計測する。具体的には、バスリセットの発生時を計測開始時間t1とし、コンフィグレーションリクエストの受信時を計測終了時間t2とし、それらの差分の時間(t2−t1)をシステム制御手段19の内蔵するタイマ19aにより計測することで、パケット応答時間TPを計測する。
Next, the
次に、図5に示すステップS5において、USB制御手段20は、ループ回数Lpが0であるか否かを判断する。ここでは、ループ回数Lpが0であるため、ステップS6に移る。続いて、USB制御手段20は、パケット応答時間TPに係数nを乗算した値を制限時間TLに設定する(ステップS6)。その後、USB制御手段20は、係数nにステップ幅St1を加算した値を新たな係数nとし、ループ回数Lpに「1」を加算する(ステップS7)。
Next, in step S5 shown in FIG. 5, the
次に、USB制御手段20は、上記設定した制限時間TLを利用して、当該DSC10の対応している全てのデバイスクラスについてPC30と接続可能か否かを図6に示すステップS8〜S13の処理により判断する(接続確認)。
Next, the
具体的には、まず、USB制御手段20は、PC30と接続可能か否かを確認していないデバイスクラスを選択する(ステップS8)。なお、ここでは、DSC10に対応している全てのデバイスクラス(MSC、SIC、UVC及びUAC)が未確認クラスであるため、例えばMSCを選択する。
Specifically, the
続いて、USB制御手段20は、上記選択したデバイスクラス(MSC)についてPC30と接続可能なクラスであるか否かを判断する(ステップS9)。ここで、この接続確認の方法について図7に従って説明する。図7に示すように、USB制御手段20は、上述したようにPC30からコンフィグレーションリクエストを受けると、上記選択したデバイスクラス(MSC)の情報を含むコンフィグレーションディスクリプタをPC30に送信する。このとき、PC30がそのデバイスクラスに対応している場合には、PC30からセットコンフィグレーションがDSC10に返送される。このため、USB制御手段20は、コンフィグレーションディスクリプタの送信後、上記設定した制限時間TL内にPC30からのセットコンフィグレーションを受信した場合には、そのデバイスクラスがPC30と接続可能であると判断する。
Subsequently, the
一方、コンフィグレーションディスクリプタの送信後に、
(1)上記設定した制限時間TL内にPC30からのセットコンフィグレーションを受信できない場合
(2)バスリセットが発生した場合
(3)PC30からデバイスリクエストを受信した場合
のいずれかに該当する場合には、USB制御手段20は、そのデバイスクラスがPC30と接続不可であると判断する。
On the other hand, after sending the configuration descriptor,
(1) When the set configuration from the
なお、上記選択したデバイスクラスであるMSCについては、コンフィグレーションディスクリプタの送信後に、制限時間TL内にPC30からセットコンフィグレーションが受信され、PC30と接続可能であると判断されたものとする。
For the MSC that is the selected device class, it is assumed that the set configuration is received from the
次に、USB制御手段20は、PC30と接続可能と判断されたデバイスクラスを、上記登録リスト20bに登録し(ステップS10)、ステップS11に移る。これにより、MSCが登録リスト20bに登録される。一方、上記ステップS9において、デバイスクラスがPC30と接続不可であると判断された場合には、ステップS10を省略してステップS11に移る。
Next, the
続いて、ステップS11において、USB制御手段20は、通常動作時にHレベルに設定されている制御信号CSをLレベルに遷移させる。すると、USB接続解除部22内のトランジスタT1,T4,T6がオフされるとともに、トランジスタT2,T3,T5,T7がオンされる。これにより、PC30のUSBコネクタ31に接続される信号線L1〜L3が抵抗R1〜R3に接続されるため、PC30側の信号線L1〜L3がハイインピーダンス状態となる。これに伴って、PC30側では、DSC10とのUSB接続が解除されたと判断される(図7のステップS11a参照)。一方、DSC10内のUSBインターフェース21のVbus端子には、トランジスタT3を介してバイアス電圧VBが供給される。このため、DSC10において、PC30とのUSB接続が解除されたと判断されることが回避される。これにより、DSC10のUSB制御手段20が次のステップS12の処理を続けることができる。
Subsequently, in step S11, the USB control means 20 causes the control signal CS set to H level during normal operation to transition to L level. Then, the transistors T1, T4, and T6 in the USB
次に、USB制御手段20は、制御信号CSをLレベルに遷移させてから所定時間経過後に、その制御信号CSをLレベルからHレベルに遷移させる(ステップS12)。すると、USB接続解除部22内のトランジスタT1,T4,T6がオンされるとともに、トランジスタT2,T3,T5,T7がオフされる。これにより、PC30側の信号線L1〜L3がDSC10のUSBインターフェース21に接続されることになる。これに伴って、PC30側では、上記ステップS11によるUSB接続の解除状態がリセットされ、DSC10とのUSB接続が再度検出される(図7のステップS12a参照)。
Next, the USB control means 20 changes the control signal CS from the L level to the H level after a predetermined time has elapsed since the control signal CS was changed to the L level (step S12). Then, the transistors T1, T4, and T6 in the USB
次いで、USB制御手段20は、DSC10の対応している全てのデバイスクラスに対して、PC30との接続確認が完了したかを判断する(ステップS13)。ここで、PC30との接続確認が完了していないデバイスクラスが残っている場合には(ステップS13でNO)、ステップS8に戻り、ステップS8〜S13の処理を繰り返す。
Next, the
具体的には、図7に示すように、上記ステップS11の処理によってPC30がUSB接続の解除を検出した後、ステップS12の処理によってPC30がDSC10とのUSB接続を再度検出すると、バスリセットが発生する。その後、DSC10とPC30とをUSBケーブル50により接続した初回と同様に、デバイスリクエスト送信、デバイスディスクリプタ送信、コンフィグレーションリクエスト送信が行われる。なお、この場合には、パケット応答時間TPの計測は行わない。
Specifically, as shown in FIG. 7, after the
次に、図6に示すステップS8において、USB制御手段20は、PC30との接続確認が未確認なデバイスクラス(例えばSIC)を選択する。続いて、USB制御手段20は、制限時間TLを利用して、その選択したデバイスクラスがPC30と接続可能か否かを判断し(ステップS9)、接続可能であれば登録リスト20bに登録する(ステップS10)。そして、DSC10とPC30との間のUSB接続をPC30側だけで擬似的に解除し(ステップS11)、所定時間経過後にDSC10とPC30との間のUSB接続を元の状態に戻す(ステップS12)。このような処理が全てのデバイスクラスに対して実行される。
Next, in step S8 shown in FIG. 6, the
そして、DSC10の対応している全てのデバイスクラスに対して、PC30との接続確認が完了すると(ステップS13でYES)、ステップS14に移る。ここでは、例えばDSC10の対応している全てのデバイスクラスのうちMSC、SIC及びUVCがPC30と接続可能と判断され、登録リスト20bに登録されたものとする。
When the connection confirmation with the
次に、ステップS14において、USB制御手段20は、登録リスト20bに登録されたデバイスクラスを優先順位の高い順に並び替える。ここで、デバイスクラスの優先順位は、USB制御手段20が有するクラステーブル20c(図8参照)に定義されたデバイスクラスの重み付けの重い順とする。以下に、クラステーブル20cに基づく登録リスト20bの並べ替え処理について説明する。
Next, in step S14, the
まず、クラステーブル20cは、図8に示すように、デバイスクラスと重みと優先順位とが対応付けられたテーブルである。ここで、図8(a)は、初期設定時のクラステーブル20cを示す図である。すなわち、初期設定では、UVC、UAC、SIC及びMSCの重みが「10」、「8」、「6」、「4」にそれぞれ設定されている。このため、優先順位は、高い順にUVC、UAC、SIC、MSCの順番となる。なお、上記初期設定時の重みは、想定される使用頻度やクラス定義等を考慮して設定される。また、仮にDSC10に対して新たなデバイスクラスが追加された場合には、そのデバイスクラスに対して適切な重み付けがされてクラステーブル20cに追加される(破線参照)。
First, as shown in FIG. 8, the class table 20c is a table in which device classes, weights, and priorities are associated with each other. Here, FIG. 8A shows the class table 20c at the time of initial setting. That is, in the initial setting, the weights of UVC, UAC, SIC, and MSC are set to “10”, “8”, “6”, and “4”, respectively. Therefore, the priority order is UVC, UAC, SIC, and MSC in descending order. Note that the weight at the time of the initial setting is set in consideration of an assumed use frequency, a class definition, and the like. If a new device class is added to the
この図8(a)に示すクラステーブル20cに基づいて、登録リスト20bに登録されたデバイスクラス(MSC、SIC及びUVC)を並び替えると、UVC→SIC→MSCの順に並び替えられることになる。
When the device classes (MSC, SIC, and UVC) registered in the
ところで、USB制御手段20は、上記クラステーブル20cの重みを、ユーザの使用履歴(使用回数や直前の使用状況)に応じて変更する。例えばUSB制御手段20は、ユーザがクラス選択する度に、その選択されたデバイスクラスの重みに「1」を加算する。この場合、例えばユーザによってSICが5回連続で選択されると、図8(b)に示すように、SICの重みが「6」から「11」に変更される。このため、このときの優先順位は、高い順にSIC、UVC、UAC、MSCの順番に変更されることになる。
By the way, the
この図8(b)に示すクラステーブル20cに基づいて、登録リスト20bに登録されたデバイスクラス(MSC、SIC及びUVC)を並び替えると、SIC→UVC→MSCの順に並び替えられる。なお、以下の説明では、上記ステップS14において、図8(b)に示すクラステーブル20cに基づいて登録リスト20bが並べ替えられたものとする。
When the device classes (MSC, SIC, and UVC) registered in the
次に、図6に示すステップS15において、USB制御手段20は、登録リスト20bの内容をクラス選択画面として表示部14に表示させる(図4参照)。ここで、この表示方法について図4に従って説明する。
Next, in step S15 shown in FIG. 6, the
図4(a)は、クラス選択画面の最初の画面が表示部14に表示されたときのDSC10の背面図である。この図4(a)に示すように、クラス選択画面の上部には、登録リスト20bの最初のデバイスクラス(登録リスト20bの中で最も優先順位の高いデバイスクラス)の名前、すなわち「StillImageClass」が選択候補として表示されている。このデバイスクラスの名前の隣(図4(a)では左側)には、「登録リスト20b内の番号/全体数」、ここでは「1/3」が表示されている。この表示によって、ユーザは選択候補の全体数と、現在表示されている選択候補が何番目の選択候補(何番目に優先順位の高い選択候補)であるかを確認することができる。
FIG. 4A is a rear view of the
また、クラス選択画面には、デバイスクラスの名前の下部に下方向を指す矢印が表示され、デバイスクラスの名前の上部に上方向を指す矢印が表示されている。これらの表示は、下矢印キー18cを操作することによって登録リスト20bの内容(デバイスクラスの選択候補)の表示を順送りに変更することができることを示し、上矢印キー18bを操作することによって登録リスト20bの内容の表示を逆戻しに変更することができることを示している。
Further, on the class selection screen, an arrow pointing downward is displayed below the name of the device class, and an arrow pointing upward is displayed above the name of the device class. These displays indicate that the display of the contents (device class selection candidates) of the
ここで、ユーザによって下矢印キー18cが操作されると、図4(b)に示すようなクラス選択画面に切り替わる。すなわち、選択候補として表示されるデバイスクラスの名前が登録リスト20bの2番目のデバイスクラスである「UsbVideoClass」に切り替わり、そのデバイスクラスの名前の左側には「2/3」が表示される。さらに、図4(b)に示すクラス選択画面において、ユーザによって下矢印キー18cが操作されると、図4(c)に示すようなクラス選択画面に切り替わる。すなわち、選択候補として表示されるデバイスクラスの名前が登録リスト20bの3番目のデバイスクラスである「MassStorageClass」に切り替わり、そのデバイスクラスの名前の左側には「3/3」が表示される。なお、図4(a)に示すクラス選択画面において、ユーザによって上矢印キー18bが操作された場合には、図4(c)に示すクラス選択画面に切り替わる。このように、登録リスト20bに登録されたデバイスクラスの名前は、サイクリックリストとして1行ずつで表示され、且つステップS14で並び替えられた順で表示される。このため、ユーザは、上矢印キー18bと下矢印キー18cとの操作によって登録リスト20bの内容(デバイスクラスの選択候補)の表示を順送り又は逆戻しして1行ずつずらすことによって、PC30と接続可能なデバイスクラスの内容を確認することができる。
Here, when the user operates the
そして、図4(a)〜(c)のいずれかのクラス選択画面において、実行ボタン18fが操作されると、その選択画面に表示されているデバイスクラスが接続クラスとして選択される。
When the
また、図4(a)〜(c)に示すように、クラス選択画面の下部には、デバイスクラスの選択候補の表示変更に関わらず固定的に、PC30との接続確認の再実行に対応した文字列「リトライ」とその文字列の右隣に右方向を指す矢印が表示されている。さらに、その「リトライ」の下部には、デバイスクラスの選択候補の表示変更に関わらず固定的に、通信接続の中止に対応した文字列「中止」とその文字列の右隣に左方向を指す矢印が表示されている。これらの表示は、右矢印キー18eを操作することによって「リトライ」が選択されることを示し、左矢印キー18dを操作することによって「中止」が選択されることを示している。
Also, as shown in FIGS. 4A to 4C, the lower part of the class selection screen corresponds to the re-execution of the connection confirmation with the
なお、上記ステップS1〜S14の処理によって作成された登録リスト20bにデバイスクラスが1つも登録されていない場合には、表示部14には図4(d)に示すようなクラス選択画面が表示される。すなわち、このときのクラス選択画面には、PC30と接続可能なデバイスクラスが1つもないことを示す文字列「接続できません」が表示される。この場合にも、図4(a)〜(c)と同様に、「リトライ」及び「中止」等が表示される。
If no device class is registered in the
そして、図6に示すステップS16において、当該DSC10のユーザは、上述したクラス選択画面を用いて、「接続クラスの選択」、「リトライ」又は「通信接続の中止」のいずれかの処理を選択する。以下に、それぞれの処理が選択された場合の以後の処理を説明する。
In step S <b> 16 shown in FIG. 6, the user of the
第1に、ステップS16において、「リトライ」が選択された場合の以後の処理について説明する。
例えばユーザは、接続したい所望のデバイスクラスが登録リスト20bに入っていないことを上記クラス選択画面で確認した場合に、他に接続可能なデバイスクラスがないかを確認するために、右矢印キー18eを操作して「リトライ」を選択する。このようにユーザによって右矢印キー18eが操作されて「リトライ」が選択された場合には、図5のステップS3に戻る。すると、USB制御手段20は、制限時間TLを0(ゼロ)にリセットし(ステップS3)、上記説明と同様にパケット応答時間TPを計測する(ステップS4)。なお、上記ステップS12の処理によってPC30側でDSC10とのUSB接続が再検出されると、バスリセットが発生するため、そのバスリセットからコンフィグレーションリクエストまでの時間をパケット応答時間TPとして計測すればよい。
First, the subsequent processing when “retry” is selected in step S16 will be described.
For example, when the user confirms on the class selection screen that the desired device class to be connected is not in the
次に、USB制御手段20は、ループ回数Lpが1以上であるため(ステップS5でYES)、パケット応答時間TPに係数n(=n+St1)を乗算した値にドライバロード時間TDを加算した値を、制限時間TLとして設定する(ステップS17)。続いて、USB制御手段20は、ドライバロード時間TDにステップ幅St2を加算した値を新たなドライバロード時間TDとする(ステップS18)。さらに、USB制御手段20は、係数nにステップ幅St1を加算した値を新たな係数nとし、ループ回数Lpに「1」を加算する(ステップS7)。
Next, since the loop count Lp is 1 or more (YES in step S5), the
これらの処理(ステップS5〜S7及びステップS17,S18参照)によって、リトライが実行される度に制限時間TLが徐々に長くなるように設定される。具体的には、図9に示すように、初回の接続確認(Lp=0)では、ドライバロード時間TDを計算に入れずに、パケット応答時間TPに係数nが乗算された時間のみに基づいて制限時間TLが設定される。また、最初のリトライ(2回目の接続確認:Lp=1)では、ステップ幅St1の加算された係数nがパケット応答時間TPに乗算され、さらにドライバロード時間TDが加味されて制限時間TLが設定される。さらに、2回目のリトライ(3回目の接続確認)以降では、ステップ幅St1の加算された係数nがパケット応答時間TPに乗算され、さらにステップ幅St2の加算されたドライバロード時間TDが加味されて制限時間TLが設定される。このように、2回目のリトライ以降では、リトライの回数が増加するたびに、パケット応答時間TPに乗算される係数nがステップ幅St1ずつ増加し、ドライバロード時間TDがステップ幅St2ずつ増加する。 By these processes (see steps S5 to S7 and steps S17 and S18), the time limit TL is set to be gradually increased each time a retry is executed. Specifically, as shown in FIG. 9, in the first connection confirmation (Lp = 0), the driver load time TD is not included in the calculation, and only based on the time obtained by multiplying the packet response time TP by the coefficient n. A time limit TL is set. In the first retry (second connection confirmation: Lp = 1), the packet response time TP is multiplied by the coefficient n added with the step width St1, and the driver load time TD is added to set the time limit TL. Is done. Further, after the second retry (third connection check), the packet response time TP is multiplied by the coefficient n added with the step width St1, and the driver load time TD added with the step width St2 is further added. A time limit TL is set. Thus, after the second retry, the coefficient n multiplied by the packet response time TP increases by the step width St1 and the driver load time TD increases by the step width St2 each time the number of retries increases.
次に、図6のステップS8において、USB制御手段20は、登録リスト20bを参照して、登録リスト20bに登録されていないデバイスクラス、すなわち前回の接続確認でPC30と接続不可と判断されたデバイスクラスを選択する。続いて、USB制御手段20は、その選択したデバイスクラスについてPC30と接続可能か否かを判断し(ステップS9)、接続可能であれば登録リスト20bに登録する(ステップS10)。
Next, in step S8 of FIG. 6, the USB control means 20 refers to the
ここで、1回目の接続確認ではPC30と接続不可と判断されたにも関わらず、2回目の接続確認でPC30と接続可能と判断される理由について以下に説明する。1回目の接続確認では、制限時間TLにドライバロード時間TDが考慮されていない。このため、例えばコンフィグレーションディスクリプタの送信後にドライバのロードが発生すると、そのドライバロード時間が制限時間TLよりも長い場合には、制限時間TL内にPC30からのセットコンフィグレーションを受信することができない。これに対し、2回目の接続確認では、制限時間TLがドライバロード時間TDを加味して設定される。このため、コンフィグレーションディスクリプタの送信後にドライバのロードが発生しても、制限時間TL内にPC30からのセットコンフィグレーションを受信できるようになる場合がある。
Here, the reason why it is determined that the connection with the
続いて、上述と同様にステップS11〜S13が実行され、さらに前回の接続確認で登録リストに登録されなかったデバイスクラスの全てについての接続確認が完了されるまでステップS8〜S13が繰り返し実行される。その後、登録リスト20bの並び替え(ステップS14)とその並び替え後の登録リスト20bの表示部14への表示(ステップS15)が実行され、再びステップS16に戻る。このように、ステップS16において「リトライ」が選択されるたびにステップS3〜S15,S17,S18の処理が実行される。換言すると、ステップS16において「リトライ」が選択されるたびに、前回の接続確認でPC30と接続不可と判断されたデバイスクラスについて、制限時間TLを増加させた上で接続確認が実行される。
Subsequently, steps S11 to S13 are executed in the same manner as described above, and steps S8 to S13 are repeatedly executed until connection confirmation is completed for all device classes that are not registered in the registration list in the previous connection confirmation. . Thereafter, rearrangement of the
第2に、ステップS16において、「接続クラスの選択」が選択された場合の以後の処理を説明する。
例えばユーザは、PC30と接続したいデバイスクラス(例えばSIC)が登録リスト20b内にあることを確認した場合に、その名前「StillImageClass」が表示された状態(図4(a)参照)で実行ボタン18fを操作して該デバイスクラスを選択する。このようにユーザによってPC30と接続するデバイスクラス(接続クラス)が選択された場合には、ステップS19に移る。すると、USB制御手段20は、クラステーブル20cの更新を実行する。具体的には、USB制御手段20は、ステップS16で選択されたデバイスクラス(ここではSIC)の重みに「1」を加算し、その重みの変化に伴う優先順位の変更を実行する。
Second, the subsequent processing when “select connection class” is selected in step S16 will be described.
For example, when the user confirms that a device class (for example, SIC) to be connected to the
その後、選択されたデバイスクラスに基づく通信接続が確立される(ステップS20)。具体的には、図7に示すように、上記ステップS12の処理によってPC30側でDSC10とのUSB接続が再検出されると(ステップS12a)、バスリセットの発生からコンフィグレーションリクエストまでの一連の処理が実行される。ここで、接続クラスが確定しているため(ステップS20aでYES)、USB制御手段20は、上記ステップS16で選択したSICの情報を含むコンフィグレーションディスクリプタをPC30に送信する。その後、PC30からのセットコンフィグレーションを受信すると、USB制御手段20は、接続結果をPC30に送信する。そして、USB制御手段20は、ステップS16で選択したSICの通信プロトコルでPC30との間で通信を開始する。なお、ステップS16で選択されるデバイスクラスは、登録リスト20bに登録されたデバイスクラス、すなわちPC30と接続可能と判断されたデバイスクラスであるため、本ステップS20では確実に通信接続を確立することができる。
Thereafter, a communication connection based on the selected device class is established (step S20). Specifically, as shown in FIG. 7, when the USB connection with the
第3に、ステップS16において、ユーザによって「中止」が選択された場合には、デバイスクラスの選択処理が強制的に中止される。なお、例えば「リトライ」を実行しても所望のデバイスクラスが登録リスト20bに入っていない場合や図4(d)に示すように「接続できません」が表示された場合などに、上記「中止」が選択される。
Third, if “stop” is selected by the user in step S16, the device class selection process is forcibly stopped. For example, when the “retry” is executed and the desired device class is not in the
以上説明した本実施形態によれば、以下の効果を奏することができる。
(1)DSC10のUSB制御手段20が、自装置の対応している全てのデバイスクラスについてPC30と接続可能か否かを判断し、PC30と接続可能と判断されたデバイスクラスを表示部14に表示させるようにした。そして、その表示部14に表示させたデバイスクラスの中から1つのデバイスクラスをユーザに選択させるようにした。このようにユーザが所望のデバイスクラスを選択するため、ユーザの意図に沿ったデバイスクラスを選択することができる。
According to this embodiment described above, the following effects can be obtained.
(1) The
さらに、ユーザが接続クラスを選択するときに、PC30と接続可能なデバイスクラスのみが表示部14に表示されるため、クラス選択におけるユーザの利便性が向上する。すなわち、ユーザは、DSC10の対応している全てのデバイスクラスが表示部14に表示される場合よりも簡単に所望のデバイスクラスを選択することができる。また、USB等の知識が乏しい不慣れなユーザであっても、表示部14に表示されたデバイスクラスのいずれかを選択すれば、PC30との間で通信接続を必ず確立することができ、PC30との間で接続エラーとなることを防止できる。
Furthermore, when the user selects a connection class, only the device class that can be connected to the
(2)DSC10の対応している全てのデバイスクラスについてPC30と接続可能か否かという判断をDSC10(デバイス装置)側で行うようにした。このため、PC30やプリンタ40に対してアプリケーション等を追加する必要がない。
(2) The DSC 10 (device device) side determines whether all device classes supported by the
とくに、プリンタ40のようにアプリケーション等の手段を後から追加することのできないホスト装置とDSC10とを接続する場合には、上述した効果はより顕著なものとなる。
In particular, when the
(3)DSC10がコンフィグレーションディスクリプタを送信してから制限時間TL内に、PC30からのセットコンフィグレーションをDSC10が受信できるか否かにより、PC30側に通知したデバイスクラスがPC30と接続可能か否かを判断するようにした。さらに、DSC10とPC30との間の実際のパケット応答時間TPに基づいて制限時間TLを設定するようにした。このため、例えばハブをはさんで他装置が接続されている場合に、この他装置との応答によりPC30からDSC10へのリクエストが遅延すると、その応答遅延に伴ってパケット応答時間TPも長くなる。従って、この場合の制限時間TLは上記応答遅延が反映されて設定されることになる。また、480Mbpsでデータ転送を行うハイスピード(High-Speed)モードと、5Gbpsでデータ転送を行うスーパースピード(SuperSpeed)モードとでは転送スピードが約10倍も異なるが、計測されるパケット応答時間TPは転送スピードに応じた時間となる。従って、この場合の制限時間TLは転送スピードが反映されて設定されることになる。このように転送スピードや応答遅延が反映されて制限時間TLが設定されるため、PC30と接続可能か否かの判定精度を向上させることができる。
(3) Whether the device class notified to the
(4)1回目の接続確認ではドライバロード時間TDを加味せずに制限時間TLを設定し、2回目以降の接続確認ではドライバロード時間TDを加味して制限時間TLを設定するようにした。これにより、ドライバのロードが発生しないデバイスクラスについては迅速に接続確認を行うことができる。例えばDSC10をプリンタ40に接続した場合には、基本的にドライバのロードが発生しないため、この効果はより顕著なものとなる。
(4) The time limit TL is set without considering the driver load time TD in the first connection check, and the time limit TL is set in consideration of the driver load time TD in the second and subsequent connection checks. As a result, it is possible to quickly confirm connection for a device class in which no driver is loaded. For example, when the
具体的には、1回目の接続確認では、係数nをマージンをとった値(例えばn=10)に設定しても、実際のパケット応答時間TPが遅くとも数十ミリ秒である。このため、プリンタ40側が対応していないデバイスクラスの接続確認であっても1秒以下で完了する。従って、本実施形態の例のようにDSC10が4つのデバイスクラスに対応している場合であれば、4秒以下で全てのデバイスクラスの接続確認を完了することができる。
Specifically, in the first connection check, even if the coefficient n is set to a value with a margin (for example, n = 10), the actual packet response time TP is several tens of milliseconds at the latest. For this reason, even if the device class connection confirmation is not supported by the
これに対し、1回目の接続確認からドライバロード時間TD(例えば15秒)を加味して制限時間TLに設定する場合には、プリンタ40の対応しているMSC及びSICについては各々1秒以下で接続確認が終了するものの、プリンタ40の対応していないUVC及びUACの接続確認には各々15秒以上かかる。このため、全てのデバイスクラスの接続確認が完了するには、30秒以上の時間がかかってしまう。
On the other hand, when the limit time TL is set in consideration of the driver load time TD (for example, 15 seconds) from the first connection check, the corresponding MSC and SIC of the
さらに言えば、上述したようにDSC10をプリンタ40に接続する場合にはドライバのロードが発生しないため、ドライバロード時間TDを加味するか否かに関わらず、登録リスト20bに登録されるデバイスクラスはほとんど変わらない。換言すると、本実施形態のように制限時間TLを設定することにより、ホスト装置が対応していないデバイスクラスを接続不可と判定するための1回目の確認時間を短くすることができる。
Furthermore, as described above, when the
(5)登録リスト20bに登録されたデバイスクラスを、重みによる優先順位の高い順に並び替えて表示部14に表示させるようにした。これにより、優先度の高いデバイスクラス(選択候補)を優先して表示部14に表示させることができる。また、ユーザの選択回数に応じて重みを加重することで優先順位が変更されるため、利用頻度の高いデバイスクラスほど優先順位が高くなり、表示部14に優先して表示されることになる。このため、利用頻度の高いデバイスクラスを選択するための操作ボタンの操作回数を少なくすることができる。
(5) The device classes registered in the
(6)登録リスト20bの内容をサイクリックリストとして1行ずつ表示部14に表示するようにした。これにより、DSC10が小型であっても、そのDSC10の表示部14に無理なく表示することができ、1行ずつ表示をずらしていくことで登録リスト20bの全ての内容を確認することができる。また、デバイスリストの名前と併せて「登録リスト20b内の番号/全体数」を表示するようにしたため、ユーザは選択候補の全体数と、現在表示されている選択候補が何番目の選択候補であるかを把握することができる。
(6) The contents of the
(7)ステップS16において「リトライ」を選択できるようにした。このため、ユーザの判断でデバイスクラスの接続確認を繰り返し実行することができる。これにより、ユーザの意図に沿った接続確認を実行することができる。なお、リトライが実行されるたびに制限時間TLが長くなるように変更されるため、登録リスト20bに登録されるデバイスクラスが徐々に増える可能性がある。
(7) “Retry” can be selected in step S16. Therefore, the device class connection confirmation can be repeatedly executed at the user's discretion. Thereby, the connection confirmation according to a user's intention can be performed. Since the time limit TL is changed every time a retry is executed, the device classes registered in the
(8)1つのデバイスクラスについての接続確認が終了すると、PC30に接続される信号線L1〜L3をハイインピーダンス状態に設定し、所定時間経過後にそのハイインピーダンス状態を解除するようにした。これにより、DSC10とPC30とをUSBケーブル50によって接続した状態で、PC30側でUSB接続の解除検出とUSB接続の再検出をさせることができ、バスリセットを発生させることができる。その後に、次の未確認のデバイスクラスについての接続確認を開始することができる。これによって、DSC10の対応する全てのデバイスクラスについての接続確認を実行することができる。
(8) When the connection confirmation for one device class is completed, the signal lines L1 to L3 connected to the
(9)登録リスト20bにデバイスクラスが1つも登録されていない場合には、表示部14に「接続できません」と表示するようにした。これにより、PC30と接続可能なクラスが1つも無いことを明示することができる。
(9) When no device class is registered in the
(他の実施形態)
なお、上記実施形態は、これを適宜変更した以下の態様にて実施することもできる。
・上記実施形態におけるパケット応答時間TPの計測期間を適宜変更してもよい。例えばホスト装置へのデバイスディスクリプタの送信から、ホスト装置からのコンフィグレーションリクエストの受信までの時間をパケット応答時間TPとして計測するようにしてもよい。
(Other embodiments)
In addition, the said embodiment can also be implemented in the following aspects which changed this suitably.
-You may change suitably the measurement period of the packet response time TP in the said embodiment. For example, the time from the transmission of the device descriptor to the host device to the reception of the configuration request from the host device may be measured as the packet response time TP.
・上記実施形態では、図6のステップS16で「リトライ」が選択されると、ステップS3に戻った後にパケット応答時間TPを再度計測する(ステップS4)ようにしたが、このパケット応答時間TPの再計測を省略してもよい。すなわち、この場合には、1回目の接続確認の際に計測したパケット応答時間TPを、2回目以降の接続確認でも利用する。 In the above embodiment, when “retry” is selected in step S16 of FIG. 6, the packet response time TP is measured again after returning to step S3 (step S4). Re-measurement may be omitted. That is, in this case, the packet response time TP measured at the first connection confirmation is also used for the second and subsequent connection confirmations.
・上記実施形態では、ユーザの選択回数に応じてクラステーブル20c内の重みを加重するようにしたが、例えばユーザの直前の使用状況に応じてクラステーブル20c内の重みを変更するようにしてもよい。この場合には、例えばユーザが直前に使用したデバイスクラスの優先順位が一番高くなるようにクラステーブル20c内の重みを変更するようにしてもよい。 In the above embodiment, the weight in the class table 20c is weighted according to the number of times the user has selected, but for example, the weight in the class table 20c may be changed according to the usage situation immediately before the user. Good. In this case, for example, the weight in the class table 20c may be changed so that the priority of the device class used immediately before by the user is the highest.
・上記実施形態のクラステーブル20cにおける重み付けの初期設定をユーザが設定するようにしてもよい。
・上記実施形態における制限時間TLの設定方法を適宜変更してもよい。すなわち、リトライ回数が増えるたびに制限時間TLが長くなるように設定されれば、その設定方法は特に制限されない。例えば2回目の接続確認における制限時間TLを、1回目の接続確認時の制限時間TLに対して単にドライバロード時間TDを加算するだけにしてもよい。
-The user may set the initial setting of weighting in the class table 20c of the above embodiment.
-You may change suitably the setting method of the time limit TL in the said embodiment. That is, the setting method is not particularly limited as long as the time limit TL is set to be longer each time the number of retries increases. For example, the time limit TL for the second connection confirmation may be simply added to the time limit TL for the first connection confirmation with the driver load time TD.
あるいは、1回目の接続確認からドライバロード時間TDを加味して制限時間TLを設定するようにしてもよい。
・上記実施形態では、登録リスト20bに登録されたデバイスクラスの名前を1行ずつ表示部14に表示するようにした。これに限らず、登録リスト20bに登録されたデバイスクラスの名前を2行以上ずつ表示部14に表示するようにしてもよい。なお、デバイスクラスの名前を1行〜3行程度ずつ表示部14に表示させることにより、上記実施形態の(6)の作用効果を奏することができる。
Alternatively, the time limit TL may be set in consideration of the driver load time TD from the first connection confirmation.
In the above embodiment, the names of the device classes registered in the
・上記実施形態では、デバイスクラスの選択操作を、DSC10とPC30とがUSBケーブル50によって接続されたときに実行するようにした。これだけに限らず、例えばDSC10とPC30とがUSBケーブル50によって接続された状態で、ユーザが接続クラスを変更したい等の場合にメニューボタン18gなどの操作ボタンを操作することによってデバイスクラスの選択が指示された場合に、図5及び図6のフローチャートに示す処理を実行するようにしてもよい。
In the above embodiment, the device class selection operation is executed when the
・上記実施形態におけるデバイス装置はDSC10に特に制限されない。また、デバイス装置が対応するデバイスクラスも特に制限されない。
・上記実施形態におけるホスト装置はPC30及びプリンタ40に特に制限されない。また、ホスト装置が対応するクラスも特に制限されない。
The device apparatus in the above embodiment is not particularly limited to the
The host device in the above embodiment is not particularly limited to the
上記各実施形態に関し、以下の付記を開示する。
(付記1)
ホスト装置と複数のデバイスクラスに対応しているデバイス装置とがシリアルバスを介してデータ通信を行う通信方法であって、
前記デバイス装置が、該デバイス装置の対応している全てのデバイスクラスについて前記ホスト装置と接続可能か否かを判断する接続確認ステップと、
前記接続確認ステップで前記ホスト装置と接続可能と判断されたデバイスクラスを出力部に出力する出力ステップと、
前記出力部に出力されたデバイスクラスの中から1つのデバイスクラスが選択されたときに、そのデバイスクラスでデータ通信を開始するステップと、
を含むことを特徴とする通信方法。
(付記2)
前記接続確認ステップは、
前記デバイス装置から前記ホスト装置へのデバイスクラスの通知から所定の制限時間内に、前記デバイス装置が前記ホスト装置からの接続クラスの指示を受信できるか否かにより、前記通知したデバイスクラスが前記ホスト装置と接続可能か否かを判断することを特徴とする付記1に記載の通信方法。
(付記3)
前記制限時間は、前記デバイス装置と前記ホスト装置との間における応答時間に基づいて設定されることを特徴とする付記2に記載の通信方法。
(付記4)
前記制限時間は、前記ホスト装置側で前記デバイス装置との物理的な接続を検出した際に発生されるバスリセットから、前記デバイス装置が前記ホスト装置からのデバイスクラスの問い合わせを受信するまでの応答時間に基づいて設定されることを特徴とする付記2又は3に記載の通信方法。
(付記5)
前記制限時間は、1回目の接続確認ステップではドライバのロード時間を加味せずに設定され、2回目以降の接続確認ステップではドライバのロード時間を加味して設定されることを特徴とする付記3又は4に記載の通信方法。
(付記6)
前記制限時間は、前記接続確認ステップが再実行されるたびに長くなるように設定されることを特徴とする付記2〜5のいずれか1つに記載の通信方法。
(付記7)
前記接続確認ステップは、
前記各デバイスクラスについて前記ホスト装置と接続可能か否かの判断が終了した後に、前記ホスト装置と前記デバイス装置とが前記シリアルバスによって接続された状態で、前記デバイス装置が、前記ホスト装置に接続されるVbusラインをハイインピーダンス状態に設定するステップと、
前記ハイインピーダンス状態に設定してから所定時間経過後に、前記デバイス装置が前記ハイインピーダンス状態を解除するステップと、
を含むことを特徴とする付記2〜6のいずれか1つに記載の通信方法。
(付記8)
前記Vbusラインをハイインピーダンス状態に設定するときに、前記デバイス装置のUSBインターフェースのVbus端子には所定の電圧を供給することを特徴とする付記7に記載の通信方法。
(付記9)
前記出力ステップは、
前記接続確認ステップで前記ホスト装置と接続可能と判断されたデバイスクラスを優先度の高い順に並び替えて前記出力部に出力することを特徴とする付記1〜8のいずれか1つに記載の通信方法。
(付記10)
前記優先度は、前記デバイスクラスの使用履歴に基づいて設定されることを特徴とする付記9に記載の通信方法。
(付記11)
前記出力ステップは、
前記接続確認ステップで前記ホスト装置と接続可能と判断されたデバイスクラスの名前を1行乃至3行ずつ前記出力部に表示させ、且つ前記デバイスクラスの名前と併せて(全体の中での番号/全体数)の情報を前記出力部に表示させることを特徴とする付記1〜10のいずれか1つに記載の通信方法。
(付記12)
シリアルバスを介してホスト装置とデータ通信を行うデバイス装置であって、
自装置の対応している全てのデバイスクラスについて前記ホスト装置と接続可能か否かを判断し、前記ホスト装置と接続可能と判断されたデバイスクラスを出力部に出力させる制御手段を備えることを特徴とするデバイス装置。
The following notes are disclosed regarding the above embodiments.
(Appendix 1)
A communication method in which a host device and a device device corresponding to a plurality of device classes perform data communication via a serial bus,
A connection confirmation step of determining whether or not the device device can be connected to the host device for all device classes supported by the device device;
An output step of outputting to the output unit the device class determined to be connectable to the host device in the connection confirmation step;
When one device class is selected from the device classes output to the output unit, starting data communication with the device class;
A communication method comprising:
(Appendix 2)
The connection confirmation step includes:
Depending on whether or not the device apparatus can receive a connection class instruction from the host apparatus within a predetermined time limit from notification of the device class from the device apparatus to the host apparatus, the notified device class is determined to be the host. The communication method according to
(Appendix 3)
The communication method according to
(Appendix 4)
The time limit is a response from the bus reset generated when the host device side detects a physical connection with the device device until the device device receives a device class inquiry from the host device. 4. The communication method according to
(Appendix 5)
The time limit is set without considering the driver loading time in the first connection confirmation step, and is set with the driver loading time in the second and subsequent connection confirmation steps. Or the communication method of 4.
(Appendix 6)
The communication method according to any one of
(Appendix 7)
The connection confirmation step includes:
After determining whether each device class can be connected to the host device, the device device is connected to the host device in a state where the host device and the device device are connected by the serial bus. Setting the Vbus line to be in a high impedance state;
The device device canceling the high impedance state after a predetermined time has elapsed since the high impedance state was set;
The communication method according to any one of
(Appendix 8)
The communication method according to appendix 7, wherein when the Vbus line is set to a high impedance state, a predetermined voltage is supplied to the Vbus terminal of the USB interface of the device device.
(Appendix 9)
The output step includes
The communication according to any one of
(Appendix 10)
The communication method according to
(Appendix 11)
The output step includes
The device class name determined to be connectable to the host device in the connection confirmation step is displayed on the output unit line by line to
(Appendix 12)
A device device that performs data communication with a host device via a serial bus,
It comprises control means for judging whether or not it is possible to connect to the host device for all device classes supported by the own device, and causing the output unit to output the device class judged to be connectable to the host device. Device device.
10 デジタルスチルカメラ(デバイス装置)
14 表示部(出力部)
20 USB制御手段(制御手段)
21 USBインターフェース
22 USB接続解除部
30 パーソナルコンピュータ(ホスト装置)
40 プリンタ(ホスト装置)
50 USBケーブル(シリアルバス)
L1 Vbusライン
10 Digital still camera (device device)
14 Display section (output section)
20 USB control means (control means)
21
40 Printer (host device)
50 USB cable (serial bus)
L1 Vbus line
Claims (6)
前記デバイス装置が、前記デバイス装置の対応している全てのデバイスクラスについて前記ホスト装置と接続可能か否かを判断する接続確認ステップと、
前記接続確認ステップで前記ホスト装置と接続可能と判断されたデバイスクラスを出力部に出力する出力ステップと、
前記出力部に出力されたデバイスクラスの中から1つのデバイスクラスが選択されたときに、前記選択されたデバイスクラスでデータ通信を開始するステップと、
を含み、
前記接続確認ステップは、
前記デバイス装置から前記ホスト装置へのデバイスクラスの通知から所定の制限時間内に、前記デバイス装置が前記ホスト装置からの接続クラスの指示を受信できるか否かにより、前記通知したデバイスクラスが前記ホスト装置と接続可能か否かを判断し、
前記制限時間は、前記ホスト装置側で前記デバイス装置との物理的な接続を検出した際に発生されるバスリセットから、前記デバイス装置が前記ホスト装置からのデバイスクラスの問い合わせを受信するまでの応答時間に基づいて設定されることを特徴とする通信方法。 A communication method in which a host device and a device device corresponding to a plurality of device classes perform data communication via a serial bus,
The device apparatus, a connection confirmation step of determining whether or not connectable to the host device all the device classes corresponding to that of the device apparatus,
An output step of outputting to the output unit the device class determined to be connectable to the host device in the connection confirmation step;
When one device class from the device class which is output to the output unit is selected, the step of starting the data communication device class said selected
Only including,
The connection confirmation step includes:
Depending on whether or not the device apparatus can receive a connection class instruction from the host apparatus within a predetermined time limit from notification of the device class from the device apparatus to the host apparatus, the notified device class is determined to be the host. Determine whether it can be connected to the device,
The time limit is a response from the bus reset generated when the host device side detects a physical connection with the device device until the device device receives a device class inquiry from the host device. A communication method that is set based on time .
前記各デバイスクラスについて前記ホスト装置と接続可能か否かの判断が終了した後に、前記ホスト装置と前記デバイス装置とが前記シリアルバスによって接続された状態で、前記デバイス装置が、前記ホスト装置に接続されるVbusラインをハイインピーダンス状態に設定するステップと、
前記ハイインピーダンス状態に設定してから所定時間経過後に、前記デバイス装置が前記ハイインピーダンス状態を解除するステップと、
を含むことを特徴とする請求項1〜3のいずれか1つに記載の通信方法。 The connection confirmation step includes:
After determining whether each device class can be connected to the host device, the device device is connected to the host device in a state where the host device and the device device are connected by the serial bus. Setting the Vbus line to be in a high impedance state;
The device device canceling the high impedance state after a predetermined time has elapsed since the high impedance state was set;
The communication method according to any one of claims 1 to 3, further comprising:
前記接続確認ステップで前記ホスト装置と接続可能と判断されたデバイスクラスを優先度の高い順に並び替えて前記出力部に出力することを特徴とする請求項1〜4のいずれか1つに記載の通信方法。 The output step includes
5. The device class that is determined to be connectable to the host device in the connection confirmation step is rearranged in descending order of priority and output to the output unit. 6. Communication method.
前記デバイス装置の対応している全てのデバイスクラスについて前記ホスト装置と接続可能か否かを判断し、前記ホスト装置と接続可能と判断されたデバイスクラスを出力部に出力させる制御手段を備え、
前記制御手段は、前記デバイス装置から前記ホスト装置へのデバイスクラスの通知から所定の制限時間内に、前記デバイス装置が前記ホスト装置からの接続クラスの指示を受信できるか否かにより、前記通知したデバイスクラスが前記ホスト装置と接続可能か否かを判断し、
前記制御手段は、前記制限時間を、前記ホスト装置側で前記デバイス装置との物理的な接続を検出した際に発生されるバスリセットから、前記デバイス装置が前記ホスト装置からのデバイスクラスの問い合わせを受信するまでの応答時間に基づいて設定することを特徴とするデバイス装置。 A device device that performs data communication with a host device via a serial bus,
It is determined whether or not it is connectable to the host device for all device classes supported by the device device , and includes a control unit that causes the output unit to output a device class determined to be connectable to the host device ,
The control means sends the notification depending on whether the device apparatus can receive a connection class instruction from the host apparatus within a predetermined time limit from the notification of the device class from the device apparatus to the host apparatus. Determine whether the device class can be connected to the host device,
The control means determines the time limit based on a bus reset generated when the host device detects a physical connection with the device device, and the device device makes an inquiry about a device class from the host device. A device apparatus that is set based on a response time until reception .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010137213A JP5581836B2 (en) | 2010-06-16 | 2010-06-16 | Communication method and device apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010137213A JP5581836B2 (en) | 2010-06-16 | 2010-06-16 | Communication method and device apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012003470A JP2012003470A (en) | 2012-01-05 |
JP5581836B2 true JP5581836B2 (en) | 2014-09-03 |
Family
ID=45535381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010137213A Active JP5581836B2 (en) | 2010-06-16 | 2010-06-16 | Communication method and device apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5581836B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102339169B1 (en) * | 2015-10-27 | 2021-12-14 | 현대모비스 주식회사 | Apparatus and method for supporting connectivity of vehicle |
WO2018008109A1 (en) * | 2016-07-06 | 2018-01-11 | Eizo株式会社 | Usb device |
JP7398881B2 (en) * | 2019-05-07 | 2023-12-15 | キヤノン株式会社 | Electronic equipment and its control method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4385465B2 (en) * | 2000-01-24 | 2009-12-16 | 富士フイルム株式会社 | Electronic camera |
JP2002305677A (en) * | 2001-04-06 | 2002-10-18 | Sony Corp | Digital camera |
JP2003008945A (en) * | 2001-06-25 | 2003-01-10 | Canon Inc | Camera |
US7760232B2 (en) * | 2003-06-27 | 2010-07-20 | Panasonic Corporation | Slave device and communication setting method |
JP4318075B2 (en) * | 2003-08-29 | 2009-08-19 | 富士フイルム株式会社 | USB function device |
JP4529411B2 (en) * | 2003-10-24 | 2010-08-25 | ソニー株式会社 | Information processing apparatus, imaging apparatus, and communication method |
JP2005295478A (en) * | 2004-04-06 | 2005-10-20 | Sanyo Electric Co Ltd | External device and electronic device capable of transmission connection |
JP4406709B2 (en) * | 2004-12-24 | 2010-02-03 | ソニー株式会社 | USB peripheral device and method for selecting device class |
JP5028798B2 (en) * | 2005-12-27 | 2012-09-19 | ソニー株式会社 | Information processing apparatus, information processing method, and computer program |
-
2010
- 2010-06-16 JP JP2010137213A patent/JP5581836B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2012003470A (en) | 2012-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101003295B1 (en) | USB connection | |
JP4680197B2 (en) | Portable terminal device, printing system and method | |
US8351060B2 (en) | Method of and apparatus to print image directly | |
US8102551B2 (en) | Image processing apparatus, method of displaying raw file information, and computer program product | |
US8368925B2 (en) | Image transmission system, image storage device, and recording medium | |
JP5581836B2 (en) | Communication method and device apparatus | |
JP2011124966A (en) | Apparatus for performing multimedia-based data transmission, and associated method | |
US20200267268A1 (en) | Image forming apparatus, display control method, and recording medium | |
US11762612B2 (en) | Information processing apparatus, information processing system, and information processing method for managing authentication information across multiple information processing devices, information processing apparatuses, and information processing systems | |
US20080130033A1 (en) | Image forming apparatus, content display method, and computer program product | |
US7619634B2 (en) | Image display apparatus and image data transfer method | |
JP2013206220A (en) | Electronic device and program | |
US9253355B2 (en) | Communication apparatus that reduces power consumption, method of controlling the same, and storage medium | |
JP2006338150A (en) | Controller and image processor | |
JP2007006125A (en) | Image processing support apparatus, electronic camera, image processing apparatus, development processing system, and program for fulfilling these image processing support apparatus and image processing apparatus | |
JP2005182380A (en) | Recording device, electronic device | |
JP2021021963A (en) | Information processing system, information processing method, image-forming device, and server device | |
JP7354793B2 (en) | Information processing device, control method, and program | |
JP7439570B2 (en) | Information processing device, control method, and program | |
US11843743B2 (en) | Information processing apparatus, method for controlling the same, and storage medium | |
JP2021087074A (en) | Image forming apparatus, control method, and program | |
US11622056B2 (en) | Image reading system and information processing apparatus using folder-specific read setting information | |
JP7283147B2 (en) | Information processing device, program, electronic device registration method | |
JP2020135062A (en) | Information processing device, control method, and program | |
JP6904205B2 (en) | Information provision system, image processing device, information provision method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130301 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131120 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131126 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140117 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140617 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140630 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5581836 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |