JP2005130316A - Image input device and method for switching communication protocols - Google Patents
Image input device and method for switching communication protocols Download PDFInfo
- Publication number
- JP2005130316A JP2005130316A JP2003365460A JP2003365460A JP2005130316A JP 2005130316 A JP2005130316 A JP 2005130316A JP 2003365460 A JP2003365460 A JP 2003365460A JP 2003365460 A JP2003365460 A JP 2003365460A JP 2005130316 A JP2005130316 A JP 2005130316A
- Authority
- JP
- Japan
- Prior art keywords
- communication
- protocol
- request
- digital camera
- communication protocol
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Landscapes
- Studio Devices (AREA)
- Communication Control (AREA)
Abstract
Description
本発明は、デジタルカメラ等の画像入力装置及びこの種の画像入力装置における通信プロトコル切り替え方法に関する。 The present invention relates to an image input device such as a digital camera and a communication protocol switching method in this type of image input device.
デジタルカメラをパーソナルコンピュータ又はプリンタに接続するためのネットワークインターフェースの一つにUSB(Universal Serial Bus)がある(例えば、非特許文献1参照)。 One of network interfaces for connecting a digital camera to a personal computer or a printer is a USB (Universal Serial Bus) (see, for example, Non-Patent Document 1).
USBを使用してデジタルカメラをパーソナルコンピュータ又はプリンタに接続する場合、以下の2つの通信プロトコルを実装する必要がある。即ち、
(1)マスストレージクラス(Mass Storage Class)、イメージングクラス(Imaging Class)などで定義された通信プロトコル(以下、標準プロトコルという)。
(2)ベンダーが独自に定義した通信プロトコル(以下、ベンダー固有プロトコルという)。
(1) A communication protocol (hereinafter referred to as a standard protocol) defined by a mass storage class, an imaging class, or the like.
(2) A communication protocol uniquely defined by the vendor (hereinafter referred to as a vendor-specific protocol).
標準プロトコル及びベンダー固有プロトコルの双方を実装した場合、これらの通信プロトコルを効率的に切り替える機能が必要となる。 When both the standard protocol and the vendor specific protocol are implemented, a function for efficiently switching between these communication protocols is required.
本発明は、標準プロトコル及びベンダー固有プロトコルを効率的に切り替えることができる画像入力装置及びその通信プロトコル切り替え方法を提示することを目的とする。 An object of the present invention is to provide an image input apparatus capable of efficiently switching between a standard protocol and a vendor-specific protocol, and a communication protocol switching method thereof.
本発明に係る画像入力装置は、少なくとも2つの通信プロトコルを実行可能な通信モジュールと、外部通信装置からの所定の通信開始要求に応じて、前記通信開始要求の種類に応じて前記複数の通信プロトコルから1つを選択して排他的に実行することが可能なプロトコル選択手段と、前記通信開始要求を受信した直後に前記外部通信装置に対してバスからの切断要求を発行し、自身の接続状態を解除する切断要求発行手段と、前記プロトコル選択手段により選択されたプロトコルの実行が可能になった時点で前記外部通信装置に再度、接続要求を出力するバス構成要求発行手段とを有し、バスに対して選択されたプロトコルで再構成されることを特徴とする。 An image input device according to the present invention includes a communication module capable of executing at least two communication protocols, and a plurality of communication protocols according to a type of the communication start request in response to a predetermined communication start request from an external communication device. A protocol selection means capable of selecting one from the above and executing it exclusively, and immediately after receiving the communication start request, issues a disconnection request from the bus to the external communication device, A disconnection request issuing means for releasing the request, and a bus configuration request issuing means for outputting a connection request to the external communication device again when the protocol selected by the protocol selection means can be executed. It is reconfigured with the protocol selected for.
本発明に係る通信プロトコル切り替え方法は、第1及び第2の通信プロトコルを実行可能な通信モジュールを有する画像入力装置において、通信プロトコルを切り替える方法であって、前記第1の通信プロトコルで外部通信装置と通信する状態で、前記外物通信装置からの所定の通信開始要求に応じて、前記外部通信装置に対してバスからの切断要求を発行することにより、接続状態を一旦、解除し、前記通信モジュールで使用する通信プロトコルを前記第2の通信プロトコルに切り替え、前記第2の通信プロトコルの実行が可能になった時点で、前記外部通信装置に対して再度、接続要求を出力することを特徴とする。 A communication protocol switching method according to the present invention is a method for switching a communication protocol in an image input apparatus having a communication module capable of executing the first and second communication protocols, wherein the external communication apparatus uses the first communication protocol. In the state of communicating with the external object communication device, in response to a predetermined communication start request from the external object communication device, by issuing a disconnection request from the bus to the external communication device, the connection state is once released, and the communication The communication protocol used in the module is switched to the second communication protocol, and when the second communication protocol can be executed, a connection request is output again to the external communication device. To do.
本発明によれば、標準プロトコル及びベンダー固有プロトコルを効率的に切り替えることができる。 According to the present invention, the standard protocol and the vendor specific protocol can be switched efficiently.
以下、図面を参照して、本発明の実施例を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
図1は、本発明の一実施例であるデジタルカメラシステムの概略構成ブロック図を示す。本実施例は、大きく分けて、デジタルカメラ100と、情報処理装置101とからなる。情報処理装置101は例えば、コンピュータ(PC)からなり、図示しない演算処理装置(CPU)、一次記憶部(RAM)、二次記憶部(ハードディスク)、操作装置(キーボード、マウス)、及び表示装置(ディスプレイ)等を具備する。なお、本実施例は、デジタルカメラに限らず、デジタルカメラ以外の画像入力装置(デジタルビデオカメラ、カメラ付き携帯電話、カメラ付き携帯端末など)においても実施可能である。
FIG. 1 shows a schematic block diagram of a digital camera system according to an embodiment of the present invention. The present embodiment is roughly divided into a
デジタルカメラ100は、レンズ、撮像素子及び駆動回路等を含む光学ユニット105、光学ユニット105によって取り込まれた画像データ等を処理する画像処理部104、CPU等の演算部103、DRAM等の1次記憶装置106、内蔵フラッシュROM等の2次記憶装置107、操作部108、LCD液晶等の表示部109、プログラム格納等に使用されるROM等の読み出し専用メモリ110、フラッシュメモリカード等の着脱可能な記録媒体111、及び、情報処理装置101との接続を管理する通信制御部102からなる。2次記憶装置107及び着脱可能な記憶媒体111の一方のみを装備してもよい。
The
図2は、図1に示すデジタルカメラ100のコンピュータ及びプリンタとの接続態様を示す。201はPCであり、202はプリンタである。
FIG. 2 shows how the
デジタルカメラ100をPC201に接続するのは一般的なことであり、本実施例では、USBを用いてデジタルカメラ100とPC201を接続する。この場合、PC201がUSBのホスト機能を提供し、デジタルカメラ100がスレーブのデバイスとなる。
It is common to connect the
プリンタ202もまた、USBによりデジタルカメラ100と接続する。この場合、プリンタ202が、USBホスト機能を提供し、デジタルカメラ100はスレーブデバイスになる。
The
デジタルカメラ100は、PC201と接続する場合には、イメージングクラス(Imaging Class)で規定されているPTP(参考文献:PIMA 15740:2000, Photography - Electronic still picture imaging - Picture Transfer Protocol (PTP) for Digital Still Photography Devices, PHOTOGRAPHIC AND IMAGING MANUFACTURERS ASSOCIATION, INC., Approved 2000-07-05, First EDITION)を使用して、PC201と通信し、プリンタ202と接続する場合には、独自のコマンド体系を使用してプリンタ202と通信する。使用する通信プロトコルは、接続相手の機種又はタイプに応じて自動的に選択される。
When the
図3は、デジタルカメラ100の内部での状態遷移例を示す。
FIG. 3 shows an example of state transition inside the
USBケーブルを介してデジタルカメラがホストデバイスに接続する。ホストデバイスが起動しており、通信可能状態にあると、ホストデバイスは、USBのVBUS信号に5Vの電圧を供給する。デジタルカメラは、その5V電圧を検出すると、Not Configured Statusとして起動し、自身の初期化を済ませ、USBのD+信号をプルアップしてホストデバイスに接続を通知し、自身の状態をBus Configured Statusに移行する。この状態で、デジタルカメラは、ホストデバイスからのいくつかのスタンダードリクエストを受信し、必要な情報をホストデバイスに返信する。 The digital camera is connected to the host device via the USB cable. When the host device is activated and in a communicable state, the host device supplies a voltage of 5 V to the USB VBUS signal. When the digital camera detects the 5V voltage, it starts up as Not Configured Status, initializes itself, pulls up the USB D + signal, notifies the host device of the connection, and notifies the Bus Configured Status of its own status. Transition. In this state, the digital camera receives some standard requests from the host device and returns necessary information to the host device.
デジタルカメラは、USBアドレスをホストデバイスから割り振られ、各種情報を送信し終わると、Idle Waiting for commandステータスに移行する。ここでは、PTPコマンドの受信を待機する。PTPコマンドを受信すると、デジタルカメラは、Command Phaseに移行し、受信したコマンドを実行する。コマンドによっては、データの転送を伴うものがある。その場合には、デジタルカメラは、Data Phaseに移行してデータの受け渡しを行い、レスポンスデータをホストデバイスに送信する。データの転送を伴わない場合、デジタルカメラは、すぐにResponse Phaseに移行し、レスポンスデータをホストデバイスに送信する。 When the digital camera is assigned a USB address from the host device and completes transmitting various information, the digital camera shifts to the Idle Waiting for command status. Here, it waits for reception of a PTP command. When receiving the PTP command, the digital camera shifts to Command Phase and executes the received command. Some commands involve data transfer. In that case, the digital camera shifts to Data Phase, transfers data, and transmits response data to the host device. When data transfer is not involved, the digital camera immediately shifts to Response Phase and transmits response data to the host device.
その後、デジタルカメラは、Idle waiting for Command Phaseに戻り、次のコマンドを待機する。 Thereafter, the digital camera returns to the idle waiting for command phase and waits for the next command.
デジタルカメラが、Idle waiting for Command Phaseにある状態で、ホストデバイスからPTPコマンド以外のリクエストを受信すると、基本的には、Stallする。但し、そのリクエストが、独自コマンド開始を意味するWakeUpリクエストなるベンダー固有リクエストである場合、デジタルカメラは、Logical Connecting statusに移行し、独自コマンドのための接続処理状態になる。この状態でホストデバイスから予め定められたベンダー固有の接続シーケンスに則ったコマンドを受け取ると、デジタルカメラは、Logical Connected statusに移行し、ベンダー独自コマンド体系に則ったコマンドの実行とデータ転送が可能になる。Logical Connected statusでは、デジタルカメラは、通常のPTPのオペレーション(コマンド)等を受け付けない。 When the digital camera receives a request other than the PTP command from the host device in the idle waiting for command phase, it basically stalls. However, if the request is a vendor-specific request that is a WakeUp request that indicates the start of a unique command, the digital camera shifts to a Logical Connecting status and enters a connection processing state for the unique command. In this state, when a command according to a predetermined connection sequence unique to the vendor is received from the host device, the digital camera shifts to Logical Connected status, enabling execution of commands and data transfer according to the vendor's unique command system. Become. In the Logical Connected status, the digital camera does not accept a normal PTP operation (command) or the like.
Logical Connected statusでホストデバイスから独自コマンド体系を終了するためのShutdownリクエストを受信すると、デジタルカメラは、Idle waiting for Command Phaseに再び戻る。このIdle waiting for Command Phaseでは、デジタルカメラは、ベンダー独自コマンドを受け付けなくなり、PTPコマンドを受信できるようになる。 When receiving a Shutdown request for ending the unique command system from the host device in the Logical Connected status, the digital camera returns to the Idle waiting for Command Phase again. With this idle waiting for command phase, the digital camera can no longer accept vendor-specific commands and can receive PTP commands.
図5に示すフローチャートを参照して、本実施例のデジタルカメラにプリンタ又はPCを接続した場合の接続処理の詳細を説明する。 With reference to the flowchart shown in FIG. 5, the details of the connection process when a printer or PC is connected to the digital camera of this embodiment will be described.
デジタルカメラがホストデバイスに接続されると、USBのVBUS信号線に5Vが供給される。デジタルカメラは、その5Vを検出すると、自身の各種レジスタを初期化し、USB通信が可能な状態にする(s401)。 When the digital camera is connected to the host device, 5V is supplied to the USB VBUS signal line. When the digital camera detects 5V, the digital camera initializes its own various registers so that USB communication is possible (s401).
デジタルカメラは、その後、ホストデバイスからのUSBスタンダードリクエストに応答し、デバイスディスクリプタ及びコンフィグレーションディスクリプタ等をホストデバイスに返信する(s402)。ホストデバイスによりデバイスとして認識され、USBバス上に構成されると、デジタルカメラは、ホストデバイスからのリクエストを待機する(s403)。この状態で、接続相手が通常のPCである場合、PTPコマンド、たとえばGetDeviceInfoオペレーションなどがデジタルカメラに送信される。受信したコマンドがPTPリクエストであると判断された場合(s404)、デジタルカメラは、接続処理を終了し、PTPコマンド実行処理に移行する。 The digital camera then responds to the USB standard request from the host device and returns a device descriptor, a configuration descriptor, etc. to the host device (s402). When recognized as a device by the host device and configured on the USB bus, the digital camera waits for a request from the host device (s403). In this state, when the connection partner is a normal PC, a PTP command such as GetDeviceInfo operation is transmitted to the digital camera. If it is determined that the received command is a PTP request (s404), the digital camera ends the connection process and proceeds to a PTP command execution process.
PTPリクエストではないと判断された場合、このリクエストがベンダー固有のWakeupリクエストかどうかを判断する(s405)。ベンダー固有のWakeupリクエストではないと判断された場合、そのリクエストはStallされ(s406)、次のリクエスト待ち状態に戻る。 If it is determined that the request is not a PTP request, it is determined whether this request is a vendor-specific Wakeup request (s405). If it is determined that the request is not a vendor-specific Wakeup request, the request is stalled (s406), and the process returns to the next request wait state.
ベンダー固有のWakeupリクエストと判断された場合、デジタルカメラは、USBのD+信号線のプルアップ状態を解除することで、Disableになったことをホストデバイスに通知する(s407)。その後、デジタルカメラは、自身の設定をベンダー固有のコマンド用に切り替え(s408)、再度、USBのD+信号線をプルアップし、ホストデバイスに再接続を表明する(s409)。 If it is determined that the request is a vendor-specific Wakeup request, the digital camera releases the pull-up state of the USB D + signal line to notify the host device that it is disabled (s407). Thereafter, the digital camera switches its setting to a vendor-specific command (s408), pulls up the USB D + signal line again, and announces reconnection to the host device (s409).
デジタルカメラは、接続相手がベンダー固有のコマンドを用いて動作するプリンタであると判断し、接続相手からベンダー固有のWakeupリクエストが発行されるのを待つ(s410)。Wakeupリクエストを受信すると、デジタルカメラは、ベンダー固有コマンド受信状態になり、この後、実際のコマンド処理に移行するために接続処理を終了する。 The digital camera determines that the connection partner is a printer that operates using a vendor-specific command, and waits for a vendor-specific Wakeup request to be issued from the connection partner (s410). Upon receiving the Wakeup request, the digital camera enters a vendor-specific command reception state, and thereafter ends the connection process to shift to actual command processing.
デジタルカメラがIdle waiting for Command Phaseにあるときにベンダー固有のWakeupリクエストを受信し、ベンダー固有プロトコルに内部の設定を切り替える動作を、図5を参照して説明する。 The operation of receiving a vendor-specific Wakeup request when the digital camera is in the idle waiting for command phase and switching the internal setting to the vendor-specific protocol will be described with reference to FIG.
本実施例は、USBのControl、BulkIn、BulkOut及びInterruptの4つのEndpointを使用する。そのうち、Control、BulkIn及びBulkOutの3つについての使い方が、PTPとベンダー固有プロトコルで異なる。各Endpointの処理は、割り込みによってハンドリングされる。それゆえ、図5に示すように、カメラ起動時には、各Endpointに対する割り込み処理ルーチンをPTP用のものとして設定しておき、ベンダー固有のWakeupリクエストを受信し内部状態がLogical Connecting statusに移行した時点で、Control、BulkIn及びBulkOutの各割り込み処理ルーチンをベンダー固有プロトコル用に設定し直すことで、処理を切り替える。 The present embodiment uses four Endpoints of USB Control, BulkIn, BulkOut, and Interrupt. Among them, the usage of three of Control, BulkIn, and BulkOut differs between PTP and the vendor-specific protocol. Each Endpoint process is handled by an interrupt. Therefore, as shown in FIG. 5, when the camera is activated, an interrupt processing routine for each endpoint is set as for PTP, a vendor-specific wakeup request is received, and the internal state shifts to a logical connecting status. , Control, BulkIn, and BulkOut interrupt processing routines are reset for vendor-specific protocols to switch processing.
ベンダー固有プロトコルを終了しShutDownリクエストを受けた時点で、Control、BulkIn及びBulkOutの各割り込み処理ルーチンをPTP用のものに戻し、内部状態をIdle waiting for Command Phaseに戻す。これにより、PTPコマンドが受け付け可能になる。 When the vendor-specific protocol is finished and a ShutDown request is received, the control processing routines of Control, BulkIn, and BulkOut are returned to those for PTP, and the internal state is returned to Idle waiting for Command Phase. Thereby, a PTP command can be accepted.
このように、本実施例に係るデジタルカメラ100によれば、標準プロトコル及びベンダー固有プロトコルを効率的に切り替えることができる。
Thus, according to the
また、本実施例に係るデジタルカメラ100によれば、従来の独自コマンドと標準コマンドの両方を実装する必要はあるが、どちらか1つがそれぞれに対し排他的に動作することが前提になるため、2つの通信プロトコルを同時に動作させる場合に比べて必要なハードウェアの規模を小さくすることができ、コストを削減することができる。
In addition, according to the
また、本実施例に係るデジタルカメラ100によれば、カメラが自動的にバスのオン・オフを活用して通信プロトコルを切り替えて動作するので、通信プロトコルをユーザに明示的に切り替えさせることは不要になる。即ち、ユーザが意識して通信プロトコルを切り替える必要がなく、わかりやすく互換性の高いシステムを構築できる。
Further, according to the
100:デジタルカメラ
101:情報処理装置
102:通信制御部
103:演算部
104:画像処理部
105:光学ユニット
106:一次記憶部
107:二次記憶部
108:操作部
109:表示部
110:読み出し専用メモリ
111:着脱可能記録媒体
100: Digital camera 101: Information processing device 102: Communication control unit 103: Calculation unit 104: Image processing unit 105: Optical unit 106: Primary storage unit 107: Secondary storage unit 108: Operation unit 109: Display unit 110: Read-only Memory 111: Removable recording medium
Claims (4)
外部通信装置からの所定の通信開始要求に応じて、前記通信開始要求の種類に応じて前記複数の通信プロトコルから1つを選択して排他的に実行することが可能なプロトコル選択手段と、
前記通信開始要求を受信した直後に前記外部通信装置に対してバスからの切断要求を発行し、自身の接続状態を解除する切断要求発行手段と、
前記プロトコル選択手段により選択されたプロトコルの実行が可能になった時点で前記外部通信装置に再度、接続要求を出力するバス構成要求発行手段
とを有し、バスに対して選択されたプロトコルで再構成されることを特徴とする画像入力装置。 A communication module capable of executing at least two communication protocols;
Protocol selection means capable of selecting and exclusively executing one of the plurality of communication protocols according to a type of the communication start request in response to a predetermined communication start request from an external communication device;
Immediately after receiving the communication start request, issue a disconnection request from the bus to the external communication device, and a disconnection request issuing means for releasing its own connection state;
Bus configuration request issuing means for outputting a connection request to the external communication device again when execution of the protocol selected by the protocol selection means becomes possible. An image input device configured to be configured.
前記第1の通信プロトコルで外部通信装置と通信する状態で、前記外物通信装置からの所定の通信開始要求に応じて、前記外部通信装置に対してバスからの切断要求を発行することにより、接続状態を一旦、解除し、
前記通信モジュールで使用する通信プロトコルを前記第2の通信プロトコルに切り替え、
前記第2の通信プロトコルの実行が可能になった時点で、前記外部通信装置に対して再度、接続要求を出力する
ことを特徴とする通信プロトコル切り替え方法。 A method for switching communication protocols in an image input apparatus having a communication module capable of executing first and second communication protocols,
By issuing a disconnection request from the bus to the external communication device in response to a predetermined communication start request from the external communication device in a state of communicating with the external communication device using the first communication protocol, Release the connection once,
Switching the communication protocol used in the communication module to the second communication protocol;
A communication protocol switching method, wherein a connection request is output again to the external communication device when execution of the second communication protocol becomes possible.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003365460A JP2005130316A (en) | 2003-10-27 | 2003-10-27 | Image input device and method for switching communication protocols |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003365460A JP2005130316A (en) | 2003-10-27 | 2003-10-27 | Image input device and method for switching communication protocols |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005130316A true JP2005130316A (en) | 2005-05-19 |
Family
ID=34644121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003365460A Withdrawn JP2005130316A (en) | 2003-10-27 | 2003-10-27 | Image input device and method for switching communication protocols |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005130316A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2367053A3 (en) * | 2010-03-19 | 2012-02-22 | Fujifilm Corporation | Lens apparatus |
JP2018147380A (en) * | 2017-03-08 | 2018-09-20 | 深▲しん▼泰克威雲儲科技股▲ふん▼有限公司 | Data processing method |
-
2003
- 2003-10-27 JP JP2003365460A patent/JP2005130316A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2367053A3 (en) * | 2010-03-19 | 2012-02-22 | Fujifilm Corporation | Lens apparatus |
JP2018147380A (en) * | 2017-03-08 | 2018-09-20 | 深▲しん▼泰克威雲儲科技股▲ふん▼有限公司 | Data processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101003295B1 (en) | USB connection | |
EP1909474B1 (en) | Image processor and its control method | |
JP2006024217A (en) | Method for sharing single host controller with multiple functional devices | |
JPWO2005001701A1 (en) | Slave device, communication setting method | |
US20070058031A1 (en) | Wireless communication device | |
JP2004310672A (en) | Data input device and image output system | |
JP2008085554A (en) | Information processing apparatus and program | |
JP2006350808A (en) | Communication apparatus | |
JP2002055936A (en) | Usb device, and system and method for communication between usb devices | |
JP2010186239A (en) | Information processing apparatus, program control method, program control program, and storage medium | |
US6753903B1 (en) | Adaptor for direct connection between USB digital still camera and use color printer | |
JP4514604B2 (en) | USB device system, digital printer and digital camera | |
EP2924955B1 (en) | Apparatus, communication control system, and communication control method | |
US20140300763A1 (en) | Recording medium and control method thereof | |
JP2005130316A (en) | Image input device and method for switching communication protocols | |
KR20030057250A (en) | USB Camera System with Host Function | |
US9380199B2 (en) | Recording medium and control method thereof | |
JP2006202234A (en) | Usb communication path switching controller | |
JP2004040370A (en) | Image processor, its control method, program, and storage medium | |
JP2012063851A (en) | Peripheral device control circuit and information processor including the same | |
JP2004112078A (en) | Image input output system | |
JP2001067157A (en) | Computer system, its peripheral equipment and computer, controlling method, and storage medium | |
JP2006085248A (en) | Portable apparatus having host function | |
JP4715893B2 (en) | Image input / output system | |
JP2006227821A (en) | Peripheral equipment control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20070109 |