JP2016177531A - Ups management device and method using hid_usb communication - Google Patents

Ups management device and method using hid_usb communication Download PDF

Info

Publication number
JP2016177531A
JP2016177531A JP2015057140A JP2015057140A JP2016177531A JP 2016177531 A JP2016177531 A JP 2016177531A JP 2015057140 A JP2015057140 A JP 2015057140A JP 2015057140 A JP2015057140 A JP 2015057140A JP 2016177531 A JP2016177531 A JP 2016177531A
Authority
JP
Japan
Prior art keywords
ups
usb
communication
management device
hid
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.)
Granted
Application number
JP2015057140A
Other languages
Japanese (ja)
Other versions
JP6531446B2 (en
Inventor
裕治郎 森藤
Yujiro Morifuji
裕治郎 森藤
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2015057140A priority Critical patent/JP6531446B2/en
Publication of JP2016177531A publication Critical patent/JP2016177531A/en
Application granted granted Critical
Publication of JP6531446B2 publication Critical patent/JP6531446B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To enable a UPS management device to perform information communication such as the state monitoring or setting of a UPS incorporating a device of an HID class only via USB communication by using a USB driver whose application is standardly included in an OS of the UPS management device in the case of performing the state monitoring or setting of the UPS.SOLUTION: A UPS management device 20 transmits a "device request" common to all devices indicating the specification information of a device connected to a UPS 10 via an end point 0(11) to the UPS 10. A device 10 of an HID class returns a response to the UPS management device 20 by using the end point 0(11), and returns the information of the end point to be used for communication with the UPS management device 20 in the response, and furthermore, informs the UPS management device 20 of the use of communication by control transfer by using an end point 14, and transfers information such as the state monitoring or setting of the UPS by using another end point 15 to be used for the transfer system.SELECTED DRAWING: Figure 1

Description

本発明は、デバイスクラスとしてHID(Human Interface Devices)を有するデバイスを内蔵した無停電電源装置(Uninterruptible Power Supply、以後、“UPS”と略称する)に対してHID_USB(Universal Serial Bus)通信を用いて双方向の通信を可能としたUPS管理装置及び方法に関する。特に、UPSをホスト(例.サーバやPC等)が管理するに際して、デバイスクラスとしてHIDを有するデバイスを内蔵したUPSの状態監視や設定などの情報(制御情報)を通信するに際し、従来のRS-232C(COMポート)通信等に代わってHID_USB通信のみを用いて通信可能にするUPS管理装置及び方法に関する。   The present invention uses an HID_USB (Universal Serial Bus) communication for an uninterruptible power supply (Uninterruptible Power Supply, hereinafter abbreviated as “UPS”) incorporating a device having HID (Human Interface Devices) as a device class. The present invention relates to a UPS management apparatus and method capable of bidirectional communication. In particular, when a host (eg, server, PC, etc.) manages a UPS, it communicates information (control information) such as the status monitoring and setting of a UPS with a device having a HID as a device class. The present invention relates to a UPS management apparatus and method for enabling communication using only HID_USB communication instead of 232C (COM port) communication or the like.

まず初めに、UPS(無停電電源装置)について説明する。
UPSは、停電や落雷などの電源異常が発生すると、UPSのバッテリから給電するバックアップ運転に瞬時に切り替えることで、電源を途絶させることなく供給し続けることによって、電源を保護するものであることが当業者によく知られている。
First, UPS (Uninterruptible Power Supply) will be described.
The UPS may protect the power supply by continuing to supply power without interruption by instantaneously switching to backup operation that supplies power from the UPS battery when a power failure such as a power failure or lightning strikes. Well known to those skilled in the art.

PC(Personal Computer)などコンピュータの電源を保護する目的に使用されるUPSでは、UPSがバックアップ運転になると、バッテリの容量に限りがあるため、バッテリが残っている間にコンピュータを自動的にシャットダウンさせて、電源を切っても安全な状態にする。   In a UPS used to protect the power supply of a computer such as a PC (Personal Computer), when the UPS enters backup operation, the battery capacity is limited, so the computer is automatically shut down while the battery remains. Make it safe even when the power is turned off.

コンピュータのシャットダウンが完了すると、それ以降、バックアップの必要が無いため、UPSを停止させて、UPSのバッテリの無駄な放電を抑え、UPSのバッテリの寿命を延ばす。   When the computer shuts down, no further backup is required, so the UPS is stopped to prevent unnecessary discharge of the UPS battery and extend the life of the UPS battery.

このようにUPSには、状況に応じて管理装置と連動して動作を行うための通信部が予め用意されており、その通信部を用いてUPSの状態監視や運転/停止などが行われることが多い。   In this way, the UPS has a communication unit to operate in conjunction with the management device according to the situation, and UPS status monitoring and operation / stopping are performed using that communication unit. There are many.

また、UPSをネットワーク上で監視したりする場合もあり、そうした場合には、UPSにネットワーク通信に対応したオプションカードを実装して対応することがある。
ネットワーク通信も様々のものがあり、産業用ネットワークで知られるModbus(登録商標)では、通信を行う前に通信ボーレートや、通信方式(モード)(RTU/ASCII)、パリティビット、デバイスID(identification)などの設定値を決める必要がある。
In some cases, the UPS is monitored on the network. In such a case, an option card that supports network communication may be mounted on the UPS.
There are various types of network communication, and Modbus (registered trademark), which is known for industrial networks, uses communication baud rate, communication method (mode) (RTU / ASCII), parity bit, device ID (identification) before communication. It is necessary to determine the setting value.

こうした設定を行うためにも、UPSには通信部が必須となっている。従来では、このUPSとの通信にCOMポートとして知られているRS-232Cが使われていた。
図5は、従来のRS-232C(COMポート)通信を用いたUPS管理装置の構成例を示す図である。図5において、UPS内部のCPUは、変換器(例.A/D変換器,D/A変換器)を制御しながら、入力電圧や出力電圧などの測定情報をフィードバックで得て内部に保持している。
In order to make these settings, a communication unit is essential for UPS. Conventionally, RS-232C known as COM port was used for communication with this UPS.
FIG. 5 is a diagram illustrating a configuration example of a UPS management apparatus using conventional RS-232C (COM port) communication. In FIG. 5, the CPU in the UPS obtains measurement information such as input voltage and output voltage by feedback while controlling the converter (eg, A / D converter, D / A converter) and holds it inside. ing.

一方、管理装置(PC)では、UPSを管理する「UPS管理プログラム」(アプリケーションプログラム)をPC内にインストールしておき、COMポート(図示のP1ポート)を使ってUPSの情報を入手する。このようにUPSの情報入手のためにCOMポートを使ったRS-232C通信が使用されている。   On the other hand, in the management apparatus (PC), a “UPS management program” (application program) for managing the UPS is installed in the PC, and UPS information is obtained using the COM port (P1 port shown in the figure). In this way, RS-232C communication using the COM port is used to obtain UPS information.

またUPSにもPCとの通信を行う通信部としてRS-232C通信を可能にするRS-232CドライバICが実装され、8ビットASCIIデータでコマンドをUPS内部のCPUとやり取りする事で、UPSが保持する測定情報を得る事ができる。   Also, the UPS is equipped with an RS-232C driver IC that enables RS-232C communication as a communication unit that communicates with the PC, and the UPS retains it by exchanging commands with the CPU inside the UPS with 8-bit ASCII data Measurement information to be obtained.

ところでRS-232Cは、通信ボーレートやデータビット数など少しのパラメータ設定さえ行えば簡単に通信ができる事から、古くから多くの機器で使用されている。
管理装置(PC)のUPS管理ソフト(アプリケーション)は、そのRS-232C通信で得た情報をもとに、UPSの状態を判断する。
By the way, RS-232C has been used in many devices for a long time because it allows easy communication with a few parameters such as the communication baud rate and the number of data bits.
The UPS management software (application) of the management device (PC) determines the UPS status based on the information obtained through the RS-232C communication.

図6は、上記従来のRS-232C通信を用いてUPS管理装置がUPSの電源管理を行う場合の相互間の対応関係を示す図である。図6におけるUPS管理装置とUPSの相互間の対応関係では、UPSが入力異常によりバックアップ運転を行っているかどうかをPC側が得て、その状態が一定時間(OSシャットダウン開始時間)保持されると、PC側ではOSをシャットダウンさせると同時に、UPSにも指定時間後(UPS出力停止遅延時間)に停止するコマンドを送ることで、PCのシャットダウンとUPSの出力停止の動作をリンクして行うことができる。   FIG. 6 is a diagram illustrating a correspondence relationship between UPS management apparatuses that perform UPS power management using the above-described conventional RS-232C communication. In the correspondence between the UPS management device and the UPS in FIG. 6, if the PC side obtains whether the UPS is performing backup operation due to an input error, and that state is maintained for a certain time (OS shutdown start time), At the same time as shutting down the OS on the PC side, a command to stop the UPS after a specified time (UPS output stop delay time) can be sent to link the PC shutdown and UPS output stop operations. .

ところで近年では、PCの低価格化を目的に必要最小限のインタフェースしかPCに実装しないことが多く、汎用的なUSBポートが主流になる一方で、RS-232C通信を行うためのCOMポートの存在しないPCが増えてきている。このため、UPSと通信を行うためにUSBポートをCOMポートに変換したり、UPSをUSBポートに対応させたりする機器の増設が必要になるというコスト増大化の課題がある。   By the way, in recent years, there are many cases where only the minimum necessary interface is mounted on the PC for the purpose of reducing the price of the PC, and while a general-purpose USB port has become mainstream, there is a COM port for RS-232C communication The number of PCs that do not increase is increasing. For this reason, there is a problem of cost increase in that it is necessary to add a device that converts a USB port to a COM port in order to communicate with the UPS or makes the UPS compatible with the USB port.

図7は、USB(後述する)を用いた従来のUPS管理装置の構成例(その1)を示す図である。図7においては、一例として仮想COMポートを使ったUPS管理装置について説明する。
初めに管理装置(PC)にUSBドライバソフトウェアをインストールする事で、PC内部に仮想的なCOMポート(図示の仮想COM P1ポート)を作成する。
FIG. 7 is a diagram showing a configuration example (No. 1) of a conventional UPS management apparatus using USB (described later). In FIG. 7, a UPS management apparatus using a virtual COM port will be described as an example.
First, by installing the USB driver software on the management device (PC), a virtual COM port (virtual COM P1 port shown) is created inside the PC.

管理装置(PC)とUPSとをUSBケーブルで接続し、UPSからUSB(後述する)を用いて得たデータを、この仮想的なCOMポートで扱えるデータに変換する事で、従来のRS-232C通信と同じように、仮想のCOMポートを使った通信をUPSと管理装置(PC)との間で行うことが可能になる。   By connecting the management device (PC) and the UPS with a USB cable and converting the data obtained from the UPS using USB (described later) into data that can be handled by this virtual COM port, the conventional RS-232C As with communication, communication using a virtual COM port can be performed between the UPS and the management device (PC).

このため、管理装置(PC)のUPS管理プログラム(アプリケーションプログラム)から見ると、従来通り、COMポートで通信しているように見えるため、機器の増設・改変を要さずに通信を行うことができる。   For this reason, when viewed from the UPS management program (application program) of the management device (PC), it seems to communicate with the COM port as before, so communication can be performed without the need for expansion or modification of equipment. it can.

しかしドライバソフトウェアは、OSに強く依存するため、OS環境が変わるたびにドライバソフトウェアを作成する必要があり、それに要する手間が大きくなるという問題がある。   However, since the driver software strongly depends on the OS, it is necessary to create the driver software every time the OS environment changes, and there is a problem that the effort required for that is increased.

ここで上記したUSB(通信プロトコルを含めて“USB通信”とも称される)について説明する。
USB(“USB通信”)は一般的に4本の通信線で構成されており、物理的にシンプルな構成であるために、実装コストも安く、近年では多くの機器にUSBが実装されている。
Here, the USB (also referred to as “USB communication” including the communication protocol) will be described.
USB ("USB communication") is generally composed of four communication lines, and because it is a physically simple configuration, the mounting cost is low, and in recent years USB is mounted on many devices. .

例えば、パソコン(PC)などに接続されるデバイス(外部機器)、例えば、キーボード、マウス、USBメモリ、プリンタなど様々な機器との通信に広く使用されている。USBにはそうした様々な機器と通信をするための通信プロトコルが予め設定されている。   For example, it is widely used for communication with various devices such as a device (external device) connected to a personal computer (PC), for example, a keyboard, a mouse, a USB memory, and a printer. A communication protocol for communicating with such various devices is preset in USB.

通信プロトコルは、パケットと呼ばれる単位で構成され、それぞれのパケットで対応する機器を識別する番号(例.ID)が決められている。様々な機器は、“クラス”という概念で“グルーピング”されており、それぞれの“クラス”に応じてデバイス固有の仕様が定められている。それぞれの機器に対応する“クラス”の仕様詳細は、USB-IF(Implementers Forum)(http://www.usb.org/)に開示されており、誰でも仕様の定義内容を確認することができる。   A communication protocol is configured in units called packets, and a number (eg, ID) for identifying a corresponding device in each packet is determined. Various devices are “grouped” under the concept of “class”, and device-specific specifications are defined according to each “class”. The specification details of the “class” corresponding to each device are disclosed in USB-IF (Implementers Forum) (http://www.usb.org/), and anyone can check the definition contents of the specification. it can.

USBを用いて各デバイスと通信を行うには、その通信を行うためのドライバソフトウェアとアプリケーションソフトウェアが必要となる。ドライバソフトウェアは予めホスト(例.サーバやPC等)にインストールされる必要があり、インストールされていない場合は、不明なデバイスとして扱われ、USBによる通信を行うことができない。   In order to communicate with each device using USB, driver software and application software for performing the communication are required. The driver software must be installed in advance on the host (eg, server, PC, etc.). If it is not installed, it will be treated as an unknown device and communication via USB cannot be performed.

“クラス”に定義されていない新たなデバイスや、メーカ固有のデバイスは、そのデバイスと通信するための専用のドライバソフトウェアを作成し提供しなければならない。
USBは、シリアルバス接続構成であり、複数の機器を接続することができる。シリアルバスは、マスタ-スレーブ方式を採っており、バス・マスタが1つだけとなる構成で接続される。一般に“バス・マスタ”となる側を“ホスト”と呼び、“バス・スレーブ”となる側を“ターゲット”と呼ぶことが多い。
New devices that are not defined in “classes” or manufacturer-specific devices must create and provide dedicated driver software for communicating with the devices.
USB has a serial bus connection configuration and can connect a plurality of devices. The serial bus adopts a master-slave system and is connected in a configuration in which only one bus master is provided. In general, the “bus master” side is often referred to as “host”, and the “bus slave” side is often referred to as “target”.

ホストは、PCなどのある程度高性能なコンピュータに実装されていたが、近年は組み込みコンピュータの性能も上がっているため、ホストを持つ組み込み機器も多い。スレーブ(デバイス)は、組み込み機器に多くみられ、比較的簡単に実装が可能になっている。   The host was mounted on a computer with a certain degree of performance such as a PC. However, in recent years, the performance of embedded computers has increased, so there are many embedded devices having a host. Slaves (devices) are often found in embedded devices and can be mounted relatively easily.

次に、USBを使うソフトウェアについて簡単に説明する。
管理装置(制御主体)がUSBポートを使うためには、専用のドライバソフトウェア(Operating Systemが使う部分)と、そのドライバ(ソフトウェア)と通信を行うアプリケーション(ユーザが使う部分)とが必要である。
Next, I will briefly explain the software that uses USB.
In order for the management device (control subject) to use the USB port, dedicated driver software (a part used by the operating system) and an application (a part used by the user) for communicating with the driver (software) are required.

標準的なデバイスクラスとして知られるキーボード、マウス、USBメモリなどのデバイスは、専用のドライバソフトウェアが予めPC等のOperating System(例えば、Windows(登録商標)、Linux(登録商標)、Macintosh(登録商標)等)に組み込まれており、ドライバをインストールすることなくデバイスを使用することができる。そしてUSB通信プロトコルは、ホスト(例.サーバやPC等)が主体になって通信を始めるため、デバイス側から通信を行うことはない。   Devices such as keyboard, mouse, USB memory, etc., known as standard device classes, have dedicated driver software installed in advance on an operating system such as a PC (for example, Windows (registered trademark), Linux (registered trademark), Macintosh (registered trademark)) Etc.), and the device can be used without installing a driver. And since the USB communication protocol starts communication mainly by the host (eg, server, PC, etc.), there is no communication from the device side.

図8は、USBを用いた従来のUPS管理装置の構成例(その2)を示す図である。図8の左側に図示されているUPS110の内部には、USBデバイス構成(この構成自体は当業者に周知)が示されている。すなわちUSBデバイスは、ディフォルト使用の“エンドポイント0”111と、コンフィグレーション112内に階層的に定義される1以上の“インタフェース”113-1,113-2とを持つようにして構成される。また“インタフェース”113-1,113-2内にも階層的に1以上の“エンドポイント”114,115を持つことができるようにされている。   FIG. 8 is a diagram showing a configuration example (part 2) of a conventional UPS management apparatus using USB. Inside the UPS 110 shown on the left side of FIG. 8, a USB device configuration (this configuration itself is well known to those skilled in the art) is shown. In other words, the USB device is configured to have “end point 0” 111 used as a default and one or more “interfaces” 113-1 and 113-2 defined hierarchically in the configuration 112. The “interfaces” 113-1 and 113-2 can also have one or more “end points” 114 and 115 hierarchically.

例えば、図8の左側に示されるUSBデバイス構成では、コンフィグレーション112内に階層的に、インタフェース0、インタフェース1に分かれた、2つのインタフェース113-1,113-2を持ち、インタフェース0(113-1)では、階層的に、“コントロール転送”が選択された一つのエンドポイント114-1と、それとは異なるエンドポイント115-1を用いて、当該転送方式を利用してUPS管理装置200のOS内に定義されるUSBドライバ(汎用部)231-1と通信する。   For example, in the USB device configuration shown on the left side of FIG. 8, the configuration 112 has two interfaces 113-1 and 113-2 that are hierarchically divided into interface 0 and interface 1, and interface 0 (113-1). Then, hierarchically, using one endpoint 114-1 for which “control transfer” is selected and a different endpoint 115-1, and using this transfer method, it is included in the OS of the UPS management apparatus 200. It communicates with the defined USB driver (general-purpose part) 231-1.

また、インタフェース1(113-2)では、階層的に、一つのエンドポイントに“バルク転送”が選択された一つのエンドポイント114-2と、それとは異なる別のエンドポイント115-2を使用して、当該転送方式を利用してUPS管理装置200のOS内に定義される、上記インタフェース0が使用するUSBドライバ(汎用部)231-1とは異なる別のUSBドライバ(汎用部)231-2と通信する。   In addition, in interface 1 (113-2), one endpoint 114-2 in which “bulk transfer” is selected as one endpoint and another endpoint 115-2 different from that are used hierarchically. The USB driver (general-purpose part) 231-2 that is different from the USB driver (general-purpose part) 231-1 used by the interface 0, defined in the OS of the UPS management apparatus 200 using the transfer method. Communicate with.

なお、上記インタフェース内の各エンドポイントは、当該コンフィグレーションがアクティブになっているときに使用可能にされるものである。
一方、図8の右側に図示されているUPS管理装置200の内部には、OSが使う部分230として、上記した二つのUSBドライバ(汎用部)231-1,231-2と、それら二つのUSBドライバ(汎用部)231-1,231-2をユーザが使用する部分240としてのアプリケーション(独自作成)241に連携するUSBドライバ(専用部)232とが用意され、アプリケーション(独自作成)241は、USBドライバ(専用部)232を介して上記した二つのUSBドライバ(汎用部)231-1,231-2のいずれかと連携することができるようにされている。USBドライバ(専用部)232は、カーネルモードで動作するドライバとして用意されているものである。
Note that each endpoint in the interface is enabled when the configuration is active.
On the other hand, in the UPS management apparatus 200 shown on the right side of FIG. 8, the above-described two USB drivers (general-purpose units) 231-1 and 231-2 and these two USB drivers ( General-purpose part) USB driver (dedicated part) 232 linked to application (proprietary creation) 241 as part 240 that user uses 231-1 and 231-2 is prepared, application (proprietary creation) 241 is USB driver (dedicated Unit) 232, and can be linked to one of the two USB drivers (general-purpose units) 231-1 and 231-2. The USB driver (dedicated unit) 232 is prepared as a driver that operates in the kernel mode.

このように従来の構成例(その2)は、図8の左部に示されるUSBデバイス構成のインタフェースが作成されるたびにそのインタフェース内のエンドポイントと通信することになるドライバソフトウェア(USBドライバ(専用部))と、そのドライバ(ソフトウェア)と通信を行うアプリケーション(独自作成)を作成しなければならないようになっていた。   As described above, the conventional configuration example (No. 2) is a driver software (USB driver (dedicated) that communicates with the endpoint in the interface every time the interface of the USB device configuration shown in the left part of FIG. 8 is created. Part)) and an application (original creation) that communicates with the driver (software).

通常、アプリケーション(ソフトウェア)はAPI(Application Programming Interface)を用いて各種OSで動作できるようにされることが多いが、ドライバソフトウェア(USBドライバ(専用部))は、ホスト側のOperating System(OS)から実行されるため、OSがバージョンアップされるたびにドライバソフトウェア(USBドライバ(専用部))を作り直す必要がある、という問題がある。   Usually, applications (software) are often made to run on various OSs using API (Application Programming Interface), but driver software (USB driver (dedicated part)) is the host side operating system (OS). Since it is executed from the beginning, there is a problem that it is necessary to recreate the driver software (USB driver (dedicated part)) every time the OS is upgraded.

そんな中にあって、下記特許文献1には、USB装置を所定端末のUSBポートと連結し、当該所定端末の入力手段を外部機器と共有するようにして、USB装置とブルートゥース通信する様々な外部機器に対して、別途の入力手段無しに入力インタフェースを提供できるようにしたUSB装置が開示されている。   Under such circumstances, the following Patent Document 1 discloses various external devices that connect a USB device to a USB port of a predetermined terminal and share the input means of the predetermined terminal with an external device to perform Bluetooth communication with the USB device. A USB device that can provide an input interface to a device without a separate input means is disclosed.

また下記特許文献2には、コンピュータとの通信に使用される複数のエンドポイントと、該複数のエンドポイントのうちHIDクラスの通信に使用する少なくとも1つのエンドポイントからキーコードをコンピュータにインタラプト転送する制御部を備えるプリンタであって、複雑な処理を行うデバイスドライバやソフトウェアを使用することなく、コンピュータに備わるアプリケーションにデータを容易に通知することができるプリンタシステムが開示されている。   In Patent Document 2 below, a key code is interrupt-transferred to a computer from a plurality of endpoints used for communication with a computer and at least one of the plurality of endpoints used for HID class communication. A printer system that includes a control unit and can easily notify data to an application provided in a computer without using a device driver or software that performs complicated processing is disclosed.

特開2012−190436号公報JP 2012-190436 A 特開2012−213859号公報JP 2012-213859 A

上述したように従来では、デバイスクラスに定義されていないデバイス(標準的でないデバイス)にUSBを実装した場合に、そのデバイスとUSB通信を行うためには、ホスト側のドライバソフトウェアとアプリケーションソフトウェアの両方を作成する必要があった。   As described above, in the past, when USB is implemented in a device that is not defined in the device class (non-standard device), both USB driver software and application software are required to perform USB communication with that device. There was a need to create.

ドライバソフトウェアは、Operating Systemが使う部分であるため、Operating Systemがバージョンアップされるたびにドライバが正しく動作するかの確認が必要となる。したがって十分な動作確認・評価を実施してからでないと使うことができない。そのため、ドライバソフトウェアの作成には大きなコスト及び時間を要するという課題があった。   Since the driver software is a part used by the Operating System, it is necessary to check whether the driver operates correctly every time the Operating System is upgraded. Therefore, it can be used only after sufficient operation confirmation and evaluation. For this reason, there has been a problem that the creation of the driver software requires a large cost and time.

また、デバイスクラスに定義されているHID(Human Interface Devices)のような標準的なデバイスとして作成した場合であっても、産業分野によっては、実際の製品用途とは合わないことが多く、そのまま利用できることが少ない。   Even if it is created as a standard device such as HID (Human Interface Devices) defined in the device class, depending on the industrial field, it is often not suitable for the actual product application, so it can be used as it is. There is little that can be done.

さらに、デバイスクラスに定義されていても、ホスト側に予めドライバ(ソフトウェア)が準備されていないデバイスも多く、Communication クラスがCOMポートなどのシリアル通信は、標準的なドライバ(ソフトウェア)では使用することができないため、各デバイスメーカーがドライバ(ソフトウェア)も合わせて提供しなければならないといった課題がある。   In addition, there are many devices for which drivers (software) are not prepared in advance on the host side even if they are defined in the device class, and serial communication such as the COM port of the Communication class should be used with standard drivers (software). Therefore, there is a problem that each device manufacturer must also provide a driver (software).

以上のように近年ではUSBポート(USB通信ポート)が主流となりつつあるが、ドライバ(ソフトウェア)やアプリケーション(ソフトウェア)も合わせて作成して提供する必要があるため、製品開発、運用、保守において多くの時間と費用が掛かってしまうという課題がある。   As described above, USB ports (USB communication ports) are becoming mainstream in recent years, but it is necessary to create and provide drivers (software) and applications (software) together, so there are many in product development, operation, and maintenance. There is a problem that it takes a lot of time and money.

そこで本発明の目的は、UPS管理装置がHIDクラスのデバイスを内蔵するUPSの状態監視や設定などを行う場合、アプリケーションがUPS管理装置のOSに標準に含まれるUSBドライバを使用してUSB通信するだけでUPSの状態監視や設定などの情報通信を可能にするUPS管理装置を提供することにある。   Therefore, an object of the present invention is to use the USB driver included in the standard of the OS of the UPS management device for the USB communication by the application when the UPS management device performs the status monitoring or setting of the UPS incorporating the HID class device. It is simply to provide a UPS management apparatus that enables information communication such as UPS status monitoring and settings.

上記課題を解決するために請求項1に記載のUPS管理装置に係る発明は、
HID_USB通信を用いて、HIDクラスのデバイスを内蔵するUPSを管理するUPS管理装置であって、該UPS管理装置は、
一つの汎用のUSBドライバと、
一つの前記汎用のUSBドライバにアクセスするアプリケーションと、
を備え、
前記UPSは、実装するUSBデバイス構成として、
コンフィグレーション内に、一つのインタフェースと、
該インタフェースの下位に、転送方式を定義する第1のエンドポイントと、
定義された前記転送方式によって転送を行う第2のエンドポイントと、を有することを特徴とする。
In order to solve the above problems, the invention according to the UPS management device according to claim 1 is:
A UPS management device that manages a UPS that incorporates a device of the HID class using HID_USB communication, and the UPS management device includes:
One general purpose USB driver,
An application for accessing one of the general-purpose USB drivers;
With
The UPS is a USB device configuration to be implemented,
One interface in the configuration,
Below the interface, a first endpoint that defines a transfer method;
And a second end point that performs transfer according to the defined transfer method.

また請求項2に記載の発明は、前記請求項1に記載の発明において、前記UPS管理装置は、前記第2のエンドポイントで定義された転送方式を用いて、USB対応機器において共通使用される標準リクエストの通信フィールドで定義される「GET_DESCRIPTOR」及び「SET_DESCRIPTOR」の制御パケットを使用してアプリケーションだけでUPSの状態監視や設定についての情報のやりとりする、ことを特徴とする。   The invention according to claim 2 is the invention according to claim 1, wherein the UPS management apparatus is commonly used in USB compatible devices using the transfer method defined in the second endpoint. It is characterized by exchanging information about UPS status monitoring and settings only by an application using control packets of “GET_DESCRIPTOR” and “SET_DESCRIPTOR” defined in the communication field of the standard request.

また請求項3に記載の発明は、前記請求項1または2に記載の発明において、前記転送方式が、コントロール転送である、ことを特徴とする。
また請求項4に記載の発明は、前記請求項1に記載の発明において、前記UPSは、筐体内に、制御コントローラ部と、デバイスクラスとしてHIDを持つUSB通信カードを装着するカードスロットとを備え、
該カードスロットに前記USB通信カードを実装することで、前記制御コントローラ部並びにUPS管理装置に対してUSB通信できるようにした、ことを特徴とする。
According to a third aspect of the present invention, in the first or second aspect of the present invention, the transfer method is control transfer.
According to a fourth aspect of the present invention, in the first aspect of the present invention, the UPS includes a control controller unit and a card slot in which a USB communication card having a HID as a device class is mounted in the casing. ,
By mounting the USB communication card in the card slot, it is possible to perform USB communication with the control controller unit and the UPS management device.

また請求項5に記載の発明は、前記請求項4に記載の発明において、前記USB通信カードは、その内部に、少なくともCPU及びRAMを有し、その周辺に、前記制御コントローラ部から電源が供給される第1のインタフェース、前記制御コントローラ部との通信を行う第2のインタフェース、および、USBケーブルと接続するUSBコネクタポートを有する、ことを特徴とする。   The invention according to claim 5 is the invention according to claim 4, wherein the USB communication card has at least a CPU and a RAM therein, and power is supplied from the control controller unit to the periphery thereof. A second interface that communicates with the control controller unit, and a USB connector port that is connected to a USB cable.

上記課題を解決するために請求項6に記載のUPS管理方法に係る発明は、
HID_USB通信を用いて、HIDクラスのデバイスを内蔵するUPSを管理するUPS管理装置における管理方法であって、前記UPS管理装置は、
汎用のUSBドライバと、該汎用のUSBドライバにアクセスするアプリケーションとを有し、
前記UPSに実装されるUSBデバイス構成のエンドポイントで定義された転送方式及び該転送方式による転送を行うエンドポイントに対して、前記アプリケーションが、USB対応機器において共通使用される標準リクエストの通信フィールドで定義される「GET_DESCRIPTOR」及び「SET_DESCRIPTOR」の制御パケットを使用して前記UPSの状態監視や設定についての情報のやりとりする、ことを特徴とする。
In order to solve the above problem, the invention according to the UPS management method according to claim 6 is:
A management method in a UPS management apparatus that manages a UPS incorporating a device of HID class using HID_USB communication, wherein the UPS management apparatus
A general-purpose USB driver and an application for accessing the general-purpose USB driver;
For the transfer method defined at the endpoint of the USB device configuration implemented in the UPS and the endpoint that performs transfer by the transfer method, the application is used in the communication field of the standard request that is commonly used in USB compatible devices. The control information of “GET_DESCRIPTOR” and “SET_DESCRIPTOR” that are defined is used to exchange information on the status monitoring and setting of the UPS.

また請求項7に記載の発明は、前記請求項6に記載の発明において、前記転送方式は、コントロール転送である、ことを特徴とする。   The invention described in claim 7 is characterized in that, in the invention described in claim 6, the transfer method is control transfer.

本発明によれば、UPS管理装置がHIDクラスのデバイスを内蔵するUPSの状態監視や設定などを行う場合、アプリケーションがUPS管理装置のOSに標準に含まれるUSBドライバを使用してUSB通信するだけでUPSの状態監視や設定などの情報通信を行うことができる。   According to the present invention, when the UPS management device performs status monitoring or setting of a UPS having a built-in HID class device, the application simply performs USB communication using the USB driver included in the OS of the UPS management device. Can communicate information such as UPS status monitoring and settings.

本発明の実施形態に係るHID_USB通信を用いたUPS管理装置の構成例を示す図である。It is a figure which shows the structural example of the UPS management apparatus using HID_USB communication which concerns on embodiment of this invention. 本発明の実施形態に係るUPSの構成例を示す図である。It is a figure which shows the structural example of UPS which concerns on embodiment of this invention. 図2に示したUSB通信カード(オプション)の構成拡大図である。FIG. 3 is an enlarged configuration diagram of a USB communication card (option) shown in FIG. 2. 本発明の実施形態に係るHID_USB通信を用いたUPS管理装置がUPSの電源管理を行う場合の相互間の対応関係を示す図である。It is a figure which shows the mutual relationship when the UPS management apparatus using HID_USB communication which concerns on embodiment of this invention performs power management of UPS. 従来のRS-232C(COMポート)通信を用いたUPS管理装置の構成例を示す図である。It is a figure which shows the structural example of the UPS management apparatus using the conventional RS-232C (COM port) communication. 図5に示した従来のRS-232C通信を用いたUPS管理装置がUPSの電源管理を行う場合の相互間の対応関係を示す図である。FIG. 6 is a diagram showing a correspondence relationship when the UPS management apparatus using the conventional RS-232C communication shown in FIG. 5 performs UPS power management. USBを用いた従来のUPS管理装置の構成例(その1)を示す図である。It is a figure which shows the structural example (the 1) of the conventional UPS management apparatus using USB. USBを用いた従来のUPS管理装置の構成例(その2)を示す図である。It is a figure which shows the structural example (the 2) of the conventional UPS management apparatus using USB.

以下、本発明の実施の形態について、図を参照しながら詳細に説明する。
図1は、本発明の実施形態に係るHID_USB通信を用いたUPS管理装置の構成例を示す図である。HID(Human Interface Devices)は、数あるUSB(Universal Serial Bus)で記述されたデバイスクラスの一つであって、HIDクラスのデバイスを実装すればUSBでホストとの間で通信を行うことが可能となるものである。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a diagram illustrating a configuration example of a UPS management apparatus using HID_USB communication according to an embodiment of the present invention. HID (Human Interface Devices) is one of many device classes described in USB (Universal Serial Bus), and if a HID class device is installed, it can communicate with the host via USB. It will be.

図1において本発明の実施形態に係るHID_USB通信を用いたUPS管理装置は、図1の左側に図示されているUPS10の内部には、USBデバイス構成が示され、当該構成のUSBデバイスは、上述したように、ディフォルト使用の“エンドポイント0”11と、コンフィグレーション12内に定義される一つの“インタフェース”13とを持つようにして構成されている。また“インタフェース”13内には、1以上の“エンドポイント”14,15を持つことができるようにされている。   1, a UPS management apparatus using HID_USB communication according to an embodiment of the present invention has a USB device configuration inside the UPS 10 shown on the left side of FIG. As described above, the “end point 0” 11 used as a default and one “interface” 13 defined in the configuration 12 are configured. The “interface” 13 can have one or more “end points” 14 and 15.

すなわち、図1の左側に示されるUSBデバイス構成では、コンフィグレーション12内に、インタフェース0(13)を持ち、インタフェース0(13)には、“コントロール転送”が選択された一つのエンドポイント14と、それとは異なるエンドポイント15を用いて、当該転送方式を利用して管理装置のOS内に定義されるUSBドライバ(汎用部)との間で双方向通信を実現している。   That is, in the USB device configuration shown on the left side of FIG. 1, the configuration 12 has an interface 0 (13), and the interface 0 (13) includes one endpoint 14 for which “control transfer” is selected. A different endpoint 15 is used to realize bidirectional communication with a USB driver (general-purpose unit) defined in the OS of the management apparatus using the transfer method.

なおインタフェース13内の各エンドポイント14,15は、コンフィグレーション12がアクティブになっているときに使用可能にされるものである。
一方、図1の右側に図示されているUPS管理装置20の内部には、OSが使う部分30として、上記した一つのUSBドライバ(汎用部)31が用意され、当該USBドライバ(汎用部)31はユーザが使う部分40のアプリケーション(ソフトウェア)41に連携できるようにされている。
Note that each endpoint 14, 15 in the interface 13 is enabled when the configuration 12 is active.
On the other hand, in the UPS management apparatus 20 shown on the right side of FIG. 1, the above-mentioned one USB driver (general-purpose unit) 31 is prepared as a part 30 used by the OS. Can be linked to the application (software) 41 of the part 40 used by the user.

この場合、アプリケーション(ソフトウェア)41がUSBドライバ(汎用部)31にアクセスするためには、汎用のドライバソフトウェアに直接アクセスするAPI(Application Programming Interface)を使用することで容易に実現することができる。API自体は当業者に周知であるのでここでは説明を省略することにする。   In this case, in order for the application (software) 41 to access the USB driver (general-purpose unit) 31, it can be easily realized by using an API (Application Programming Interface) that directly accesses the general-purpose driver software. Since the API itself is well known to those skilled in the art, a description thereof will be omitted here.

ところでHIDクラスのデバイスであれば、上述したように、USB通信が可能であり、既存のキーボードやマウスなどと同様に、管理装置から離れたUPSであっても、ユーザからの入力を受け付けるデバイスとして機能する。つまりHIDに準拠したデバイスクラスであれば、USBケーブル(不図示)を接続するだけで、UPS管理装置はHIDクラスのデバイスであると認識し、それに応じたデバイスの動作をUPS管理装置が認識できる。   By the way, if it is a device of the HID class, as described above, USB communication is possible, and it is a device that accepts input from the user even if it is a UPS remote from the management device, like an existing keyboard or mouse. Function. In other words, if the device class conforms to HID, simply connect a USB cable (not shown), the UPS management device will recognize that it is a HID class device, and the UPS management device can recognize the operation of the device accordingly. .

しかしてUPS管理装置が、HIDクラスのデバイスを認識するまでに、通常では、多くのUSB通信を行って判別する必要がある。以下では、USBケーブルの接続からUPS管理装置がHIDクラスのデバイスを認識するまでの通信動作について詳しく説明する。   Therefore, until the UPS management device recognizes a device of the HID class, it is usually necessary to determine by performing many USB communications. In the following, the communication operation from the connection of the USB cable until the UPS management device recognizes the HID class device will be described in detail.

USB(Universal Serial Bus)には、通信方式として、コントロール転送、バルク転送、インタラプト転送、アイソクロナス転送の4種類があらかじめ準備されており、これらの転送方式は、各デバイスの特徴に合わせて選択される。なお、実際の通信(転送)は、“エンドポイント”と呼ばれる“通信用接続単位”に定義が成されて行われるようになっており、各エンドポイントは識別用のID(identification)を有している。   In USB (Universal Serial Bus), four types of communication methods, control transfer, bulk transfer, interrupt transfer, and isochronous transfer, are prepared in advance, and these transfer methods are selected according to the characteristics of each device. . Note that actual communication (transfer) is defined in “communication connection units” called “endpoints”, and each endpoint has an ID (identification) for identification. ing.

デバイスの情報をUPS管理装置に通信する前提として、USBデバイス構成に必ず実装される“エンドポイント0”11が使われる。すなわち、“エンドポイント0”11は、UPS10とUPS管理装置20との間における前提となる制御情報のやりとりに不可欠なエンドポイントであって、そのエンドポイントに許容される通信方式は、“コントロール転送”のみ用いられ、当該通信方式を使用して、実際の情報転送(通信)に使用するインタフェース番号、エンドポイントIDなどが両者で事前に決められている必要がある。   As a premise for communicating device information to the UPS management device, “Endpoint 0” 11 that is always implemented in the USB device configuration is used. In other words, “Endpoint 0” 11 is an indispensable endpoint for exchanging control information between the UPS 10 and the UPS management device 20, and the permitted communication method is “Control Transfer”. The interface number used for actual information transfer (communication), the endpoint ID, etc. need to be determined in advance by both of them.

“エンドポイント0”11以外の通常のエンドポイント14,15は、上述したように“インタフェース”13によってグルーピングされ、インタフェース13内の一つのエンドポイント14に上記した4つの転送方式(コントロール転送、バルク転送、インタラプト転送、アイソクロナス転送)のどれを使うかを明示する必要がある。   Normal endpoints 14 and 15 other than “endpoint 0” 11 are grouped by “interface” 13 as described above, and the above four transfer methods (control transfer, bulk transfer) are transferred to one endpoint 14 in interface 13. It is necessary to specify whether to use transfer, interrupt transfer, or isochronous transfer.

USBデバイスは、コンフィグレーション・ディスクリプタ(詳細は後述)によって定義される1以上のインタフェース13を当該コンフィグレーション12内に持つことができ、さらにインタフェース・ディスクリプタ(詳細は後述)によって定義される1以上のエンドポイント14,15を当該インタフェース13内に持つことができる。そしてエンドポイント14には、データの流れる方向(管理装置から見てIN、OUT)が定義され、送信用=OUT、受信用=INそれぞれに使用するエンドポイントを持つ必要がある。しかしてディスクリプタで情報の流れる方向を予め定義しておけば、上記した“コントロール転送”を使用して双方向の通信を行うことが可能となる。これについては後述する。   A USB device can have one or more interfaces 13 defined by a configuration descriptor (details will be described later) in the configuration 12, and one or more interfaces defined by an interface descriptor (details will be described later). Endpoints 14 and 15 can be included in the interface 13. The direction of data flow (IN and OUT as viewed from the management device) is defined in the end point 14, and it is necessary to have end points to be used for transmission = OUT and reception = IN. Therefore, if the direction of information flow is defined in advance by the descriptor, bidirectional communication can be performed using the above-described “control transfer”. This will be described later.

USBデバイスはディスクリプタを必ず有しており、その内容は、上述したUSB-IF(Implementers Forum)によって定義されている。
より具体的には、USBデバイスにおけるディスクリプタには、最上位の階層にデバイス・ディスクリプタが、その下位に、コンフィグレーション・ディスクリプタ、さらにその下位に、インタフェース・ディスクリプタとエンドポイント・ディスクリプタとが設けられ、ディスクリプタが階層化されて定義されている。なお、インタフェース・ディスクリプタには、HIDクラス規格に限り、HIDディスクリプタ、その下位に、レポートディスクリプタ及びオプションでフィジカルディスクリプタを定義することも可能である。
A USB device always has a descriptor, and its contents are defined by the USB-IF (Implementers Forum) described above.
More specifically, the descriptor in the USB device has a device descriptor at the highest level, a configuration descriptor at the lower level, and an interface descriptor and an endpoint descriptor at the lower level. Descriptors are defined in a hierarchy. In the interface descriptor, it is also possible to define an HID descriptor only in the HID class standard, and a report descriptor and an optional physical descriptor below the HID descriptor.

デバイス・ディスクリプタには、対応しているUSB仕様のバージョン,デバイスクラス,プロトコル,エンドポイント0に対する転送で利用可能な最大パケット長,ベンダID,プロダクトIDなどの基本情報を含めることができる。   The device descriptor can include basic information such as the supported USB specification version, device class, protocol, maximum packet length that can be used for transfer to endpoint 0, vendor ID, and product ID.

またコンフィグレーション・ディスクリプタには、デバイスの属性,消費電力などの情報を含めることができる。
またインタフェース・ディスクリプタには、インタフェースごとに必要なディスクリプタで、インタフェース識別番号,インタフェースクラス,サポートするエンドポイントの数などを含めることができる。そしてインタフェース・ディスクリプタの下位に、HIDクラス規格限りのHIDディスクリプタが定義され、HIDディスクリプタには、HIDに属するディスクリプタの種類とサイズが定義されるようになっている。
The configuration descriptor can include information such as device attributes and power consumption.
The interface descriptor is a descriptor required for each interface, and can include an interface identification number, an interface class, the number of supported endpoints, and the like. The HID descriptor limited to the HID class standard is defined below the interface descriptor, and the type and size of the descriptor belonging to the HID are defined in the HID descriptor.

さらに、エンドポイント・ディスクリプタは、インタフェース・ディスクリプタにより指定されたエンドポイントごとに必要なディスクリプタで、転送タイプ(転送方向),転送で利用可能な最大パケット長,転送のインターバルが定義されている。但し、エンドポイント0は規則によりこのディスクリプタを持つことができない。   Furthermore, the endpoint descriptor is a descriptor required for each endpoint specified by the interface descriptor, and defines a transfer type (transfer direction), a maximum packet length that can be used for transfer, and a transfer interval. However, endpoint 0 cannot have this descriptor by rule.

本実施形態では、コンフィグレーション12の下位の階層に、一つのインタフェース0(13)が定義され、さらにエンドポイント・ディスクリプタで、転送タイプ(転送方向=IN及びOUTで定義される管理装置からみた方向)、転送で利用する最大パケット長、転送のインターバルなどが定義され、実際の通信の前にUPS10に実装されたUSBデバイスとUPS管理装置20との間で取り決めが行われて、HID_USB通信を実現するようにしている。   In the present embodiment, one interface 0 (13) is defined in the lower hierarchy of the configuration 12, and the endpoint descriptor further includes a transfer type (direction viewed from the management device defined by transfer direction = IN and OUT). ), Maximum packet length to be used for transfer, transfer interval, etc. are defined, and agreement is made between the USB device installed in UPS10 and UPS management device 20 before actual communication to realize HID_USB communication Like to do.

より具体的には、UPS管理装置20とHIDクラスのデバイス10とがUSBケーブル(不図示)で接続されると、UPS管理装置20は、エンドポイント0(11)を介してUPS10に対して接続されたデバイスの諸元情報を示す全デバイス共通の“デバイスリクエスト”を送信する。   More specifically, when the UPS management device 20 and the HID class device 10 are connected by a USB cable (not shown), the UPS management device 20 is connected to the UPS 10 via the endpoint 0 (11). A “device request” common to all devices indicating the specification information of the device is sent.

UPS10に接続されたHIDクラスのデバイスは、要求された“デバイスリクエスト”に対する応答を同じくエンドポイント0(11)を介してUPS管理装置20に返し、その応答の中にUPS管理装置20との通信で使用するエンドポイントの情報を返す。   The HID class device connected to the UPS 10 returns a response to the requested “device request” to the UPS management device 20 through the endpoint 0 (11), and communicates with the UPS management device 20 in the response. Returns information about the endpoint used in.

その上でインタフェース0(13)の下位の階層のエンドポイント14を使って、上記した4つの転送方式の内の“コントロール転送”を選択したことを通知し、UPS管理装置20に対してコントロール転送による通信を行うことを知らせるとともに当該コントロール転送を実施する別のエンドポイント15を指定し、そのエンドポイント15を用いてUPSの状態監視や設定などの情報をやりとりする。   Then, using the endpoint 14 in the lower layer of the interface 0 (13), it is notified that “control transfer” of the above four transfer methods has been selected, and control transfer is performed to the UPS management device 20. In addition to notifying that communication is performed, another endpoint 15 for performing the control transfer is designated, and information such as UPS status monitoring and setting is exchanged using the endpoint 15.

なお、UPS管理装置20から見てINとOUTに方向付けされた情報の流れは、USB対応機器において共通使用される標準リクエストの通信フィールドで定義される「GET_DESCRIPTOR(UPS管理装置20から見たコントロールIN)」及び「SET_DESCRIPTOR(UPS管理装置20から見たコントロールOUT)」の制御パケットを使用して上述の“コントロール転送”だけを使って任意の内容の通信を行うことができる。こうすることで、従来例のような専用のUSBドライバソフトウェア(ドライバと略称される)を不要とし、アプリケーションソフトウェア(アプリケーションと略称される)だけでUPSの状態監視や設定などの情報のやりとりを実現することができる。   Note that the information flow directed to IN and OUT as viewed from the UPS management device 20 is defined by the GET_DESCRIPTOR (control as viewed from the UPS management device 20) defined in the communication field of the standard request commonly used in USB compatible devices. IN) ”and“ SET_DESCRIPTOR (control OUT as viewed from the UPS management device 20) ”control packets can be used to perform communication of any content using only the“ control transfer ”described above. This eliminates the need for dedicated USB driver software (abbreviated as a driver) as in the conventional example, and allows only application software (abbreviated as an application) to exchange information such as UPS status monitoring and settings. can do.

なお、図1には、OSが使用する部分30が専用のクラスドライバ(HID)を使って実現することも不可能ではないが、専用のクラスドライバであるが故に、それを使用することになると、それに対応するドライバをUPS10側が用意しなければならないため、本実施形態では敢えて専用のクラスドライバ(HID)を用いずに、一つの汎用のUSBドライバ31を用いてUPSの状態監視や設定などの情報のやりとりを実現している。   In FIG. 1, it is not impossible for the part 30 used by the OS to be realized by using a dedicated class driver (HID). However, because it is a dedicated class driver, it will be used. Because the UPS10 side must prepare a driver corresponding to it, this embodiment dares not to use a dedicated class driver (HID), but to use one general-purpose USB driver 31 for UPS status monitoring and settings, etc. Information exchange is realized.

図2は、本発明の実施形態に係るUPSの構成例を示す図である。図2に示される本発明の実施形態に係るUPS1は、USB通信カード3をカードスロット2に装着してHID_USB通信を可能とするものである。   FIG. 2 is a diagram illustrating a configuration example of a UPS according to the embodiment of the present invention. The UPS 1 according to the embodiment of the present invention shown in FIG. 2 is one in which the USB communication card 3 is mounted in the card slot 2 to enable HID_USB communication.

より具体的に説明すると、UPS1は、その筐体内に、制御コントローラ部4およびカードスロット2を設けている。図示例は、外装部(不図示)が透視化され、制御コントローラ部4とUSB通信カード(オプション)3とを接続するインタフェース(I/Fと略記)(図中左部参照)、並びに、USB通信カード(オプション)3と不図示のUSBケーブルとを接続するインタフェース(I/Fと略記)(図中右部参照)とが設けられている。   More specifically, the UPS 1 is provided with a control controller unit 4 and a card slot 2 in its casing. In the illustrated example, an exterior part (not shown) is made transparent, an interface (abbreviated as I / F) for connecting the controller unit 4 and the USB communication card (option) 3 (refer to the left part in the figure), and a USB An interface (abbreviated as I / F) for connecting the communication card (option) 3 and a USB cable (not shown) (see the right part in the figure) is provided.

そしてUPS1は、不図示のUPS管理装置とUSB通信するに先立って、カードスロット2にUSB通信カード(オプション)3を装着する。つまり、デバイスクラスとしてHIDを持つUSB通信カード(オプション)3をカードスロット2に装着することで、UPS1が不図示のUPS管理装置とHID_USB通信することが可能となる。   The UPS 1 installs a USB communication card (option) 3 in the card slot 2 prior to USB communication with a UPS management device (not shown). That is, by installing the USB communication card (option) 3 having HID as the device class in the card slot 2, the UPS 1 can perform HID_USB communication with a UPS management apparatus (not shown).

こうすることで、UPS1は、不図示のUPS管理装置とHID_USB通信するUSB通信ポート(USBポート)(図3参照)を実装することが可能となるため、不図示のUPS管理装置がUSBドライバ(汎用部)を備えるだけでHID-USB通信が可能になる。   By doing so, the UPS 1 can mount a USB communication port (USB port) (see FIG. 3) for HID_USB communication with a UPS management device (not shown). HID-USB communication becomes possible just by providing a general-purpose part.

すなわち、図2に示されるUPS1は、カードスロット2にUSB通信カード(オプション)3を装着することで、USB通信ポート(USBポート)(図3参照)をUPS1に追加し、不図示のUPS管理装置からのHID-USB通信を可能にしている。なお、カードスロット2に脱着可能にされるUSB通信カード(オプション)3の詳細については後述する。   That is, the UPS 1 shown in FIG. 2 adds a USB communication card (option) 3 to the card slot 2 to add a USB communication port (USB port) (see FIG. 3) to the UPS 1 and performs UPS management (not shown). Enables HID-USB communication from the device. The details of the USB communication card (option) 3 that is detachable from the card slot 2 will be described later.

図3は、図2に示したUSB通信カード(オプション)3の構成拡大図である。図3において、UPS1の制御コントローラ部4(図2参照)から電源が供給されるインタフェース3-1と、制御コントローラ部4(図2参照)との通信を行うインタフェース3-2とを備えている。   FIG. 3 is an enlarged view of the configuration of the USB communication card (option) 3 shown in FIG. In FIG. 3, an interface 3-1 to which power is supplied from the control controller unit 4 (see FIG. 2) of the UPS 1 and an interface 3-2 for communicating with the control controller unit 4 (see FIG. 2) are provided. .

そしてUSB通信カード(オプション)3内部には、少なくともCPU(Central Processing Unit)3-3、RAM(Random Access Memory)3-4、および、USBコネクタポート(USB通信ポート)3-6が設けられている。   The USB communication card (option) 3 includes at least a CPU (Central Processing Unit) 3-3, a RAM (Random Access Memory) 3-4, and a USB connector port (USB communication port) 3-6. Yes.

USB通信カード(オプション)3のUSBコネクタポート(USB通信ポート)3-6は、USB通信カード(オプション)3内のCPU3-3に内蔵されるUSBデバイスコントローラ3-5の形式でも、または、専用のUSBデバイスコントローラ3-5の形式のいずれのものであっても良い。   The USB connector port (USB communication port) 3-6 of the USB communication card (option) 3 is in the form of the USB device controller 3-5 built in the CPU 3-3 in the USB communication card (option) 3 or dedicated. The USB device controller 3-5 may be of any type.

次に、USBコネクタ接続時の動作について説明する。
上述したカードスロット2に、USB接続するためのUSB通信カード(オプション)3を装着すると、不図示のUPS管理装置(ホスト)がエンドポインタ0を使用してデバイス側に、デバイスの構成を問い合せる全デバイス共通の“デバイスリクエスト”が送られてくる。
Next, the operation when the USB connector is connected will be described.
When the USB communication card (option) 3 for USB connection is installed in the card slot 2 described above, the UPS management device (host) (not shown) uses the end pointer 0 to query the device side for the device configuration. A “device request” common to all devices is sent.

デバイス側は、上記“デバイスリクエスト”の応答にHIDクラスのデバイスであることを返し、次いで、上述したエンドポイント・ディスクリプタを使用して、転送タイプ(転送方向=IN及びOUTの双方向)、転送で利用する最大パケット長、転送のインターバルなどを定義して、実際の通信の前にUPSに実装されたUSBデバイスとUPS管理装置との間で取り決めておく。こうしてホスト側とデバイス側とで実際の通信に使用するエンドポイントを確立させる。   The device side returns that it is a HID class device in response to the above “device request”, and then uses the endpoint descriptor described above to transfer the transfer type (transfer direction = IN and OUT bidirectional), transfer Define the maximum packet length, transfer interval, etc. used in, and negotiate between the USB device installed in the UPS and the UPS management device before actual communication. In this way, an endpoint used for actual communication is established between the host side and the device side.

本来なら、ここでマウスやキーボードなど予め定義されているデバイス固有のID(identification)をホスト側に返すが、本システムでは、デバイス側がHID汎用機としてのコードをホスト側に返すのみでデバイス固有のIDのやりとりを簡略化している。   Originally, a device-specific ID (identification) such as a mouse or keyboard is returned to the host side, but in this system, the device side only returns a code as a HID general-purpose machine to the host side. ID exchange is simplified.

エンドポイントが確立されると、ホスト側のUSB通信を行うためのアプリケーション(ソフトウェア)は、「SET_DESCRIPTOR(ホスト側のコントロールOUT)」及び「GET_DESCRIPTOR(ホスト側のコントロールIN)」の制御パケットを使って、UPS内のデバイスの状態を取得したり設定を行ったりするための任意の情報のやりとり(双方向のデータ通信)を行うことができる。   Once the endpoint is established, the application (software) for USB communication on the host side uses the control packets of “SET_DESCRIPTOR (host-side control OUT)” and “GET_DESCRIPTOR (host-side control IN)”. Any information exchange (bidirectional data communication) for obtaining or setting the status of the device in the UPS can be performed.

なお制約事項としては、任意の情報の1回のやりとりで送受信できるデータサイズ(ペイロードサイズ)が64バイトまでに制限されているので、それ以上のデータをやりとりする必要がある場合は、複数回に分けて通信を行うことになるのはいうまでもない。   As a restriction, the data size (payload size) that can be transmitted / received by one-time exchange of arbitrary information is limited to 64 bytes, so if you need to exchange more data than that, multiple times Needless to say, communication is performed separately.

図4は、本発明の実施形態に係るHID_USB通信を用いたUPS管理装置(PC)がUPSの電源管理を行う場合の相互間の対応関係を示す図である。
図4におけるUPS管理装置(PC)とUPSの相互間の対応関係では、UPS側に電源異変(例.出力停止)がなく、通常運転で推移しているかどうかの情報を上述のHID_USB通信を使ってPC側が得て、通常運転が維持されていれば、PC側はACアダプタ接続を維持することで、電源低下の監視を行うことなく推移する。
FIG. 4 is a diagram illustrating a correspondence relationship between UPS management apparatuses (PCs) using HID_USB communication according to an embodiment of the present invention when UPS power management is performed.
The correspondence between the UPS management device (PC) and UPS in Fig. 4 uses the above-mentioned HID_USB communication to indicate whether there is no power supply abnormality (eg, output stop) on the UPS side and whether it is operating in normal operation. If the PC side obtains and normal operation is maintained, the PC side maintains the AC adapter connection, and transitions without monitoring the power supply drop.

しかしてUPS側に電源異変が生じて、UPSが通常運転からバックアップ運転に移行し、その状態が、例えば、PC側の監視で一定時間以上継続されていることが判明した場合には、PC側がバッテリ駆動に切り替えることで、PC自身のバッテリ駆動による電源低下の監視が行えるようにする。   Therefore, when a power supply abnormality occurs on the UPS side, the UPS shifts from normal operation to backup operation, and it is found that the state has been continued for a certain time or more by monitoring on the PC side, for example, By switching to battery-powered operation, it will be possible to monitor the power supply drop due to battery-powered PCs themselves.

このようなバッテリ駆動による電源低下の監視は、市販のノートパソコンで普通に行われていることなので、上述したUPS管理装置がHID_USB通信を用いてUPS内のデバイスにおける電源異変の状態を取得することを契機に容易に実現させることができる。   Since such a battery-driven power supply drop monitoring is normally performed on a commercially available notebook computer, the UPS management device described above must acquire the power supply abnormal state of the device in the UPS using HID_USB communication. Can be easily realized.

つまり本例では、UPS管理装置(PC)がUPSの電源管理を行う場合に、PCのバッテリ駆動時の電圧低下監視とUPSの出力停止の動作とを相互間で対応させることで、UPSの電源の監視を行うことができる。   In other words, in this example, when the UPS management device (PC) performs UPS power management, the UPS power supply of the UPS is controlled by matching the voltage drop monitoring when the PC battery is running with the UPS output stop operation. Can be monitored.

1 無停電電源装置(UPS)
2 カードスロット
3 USB通信カード(オプション)
4 制御コントローラ部
3-1 インタフェース(電源用)
3-2 インタフェース(通信用)
3-3 CPU(Central Processing Unit)
3-4 RAM(Random Access Memory)
3-5 USBデバイスコントローラ
3-6 USBコネクタポート(USB通信ポート)
10 UPS
11 エンドポイント0
12 コンフィグレーション
13 インタフェース0
14 転送方式を定義するエンドポイント
15 転送時に使用されるエンドポイント
20 UPS管理装置
30 operating systemが使う部分
31 USBドライバ(汎用部)
40 ユーザ(user)が使う部分
41 アプリケーション
1 Uninterruptible power supply (UPS)
2 Card slot 3 USB communication card (optional)
4 Control controller section 3-1 Interface (for power supply)
3-2 Interface (for communication)
3-3 CPU (Central Processing Unit)
3-4 RAM (Random Access Memory)
3-5 USB device controller 3-6 USB connector port (USB communication port)
10 UPS
11 Endpoint 0
12 Configuration 13 Interface 0
14 Endpoints that define the transfer method 15 Endpoints used during transfer 20 UPS management device 30 Parts used by the operating system 31 USB driver (general-purpose part)
40 Parts used by users 41 Applications

Claims (7)

HID_USB通信を用いて、HIDクラスのデバイスを内蔵するUPSを管理するUPS管理装置であって、該UPS管理装置は、
一つの汎用のUSBドライバと、
一つの前記汎用のUSBドライバにアクセスするアプリケーションと、
を備え、
前記UPSは、実装するUSBデバイス構成として、
コンフィグレーション内に、一つのインタフェースと、
該インタフェースの下位に、転送方式を定義する第1のエンドポイントと、
定義された前記転送方式によって転送を行う第2のエンドポイントと、
を有することを特徴とするUPS管理装置。
A UPS management device that manages a UPS that incorporates a device of the HID class using HID_USB communication, and the UPS management device includes:
One general purpose USB driver,
An application for accessing one of the general-purpose USB drivers;
With
The UPS is a USB device configuration to be implemented,
One interface in the configuration,
Below the interface, a first endpoint that defines a transfer method;
A second endpoint for forwarding according to the defined forwarding method;
A UPS management device characterized by comprising:
前記UPS管理装置は、前記第2のエンドポイントで定義された転送方式を用いて、USB対応機器において共通使用される標準リクエストの通信フィールドで定義される「GET_DESCRIPTOR」及び「SET_DESCRIPTOR」の制御パケットを使用してアプリケーションだけでUPSの状態監視や設定についての情報のやりとりする、
ことを特徴とする請求項1に記載のUPS管理装置。
The UPS management device uses the transfer method defined by the second endpoint to send control packets of “GET_DESCRIPTOR” and “SET_DESCRIPTOR” defined in the communication field of the standard request commonly used in USB compatible devices. Use only applications to exchange information about UPS status monitoring and settings,
The UPS management device according to claim 1.
前記転送方式は、コントロール転送である、
ことを特徴とする請求項1または2に記載のUPS管理装置。
The transfer method is control transfer.
The UPS management device according to claim 1 or 2, wherein
前記UPSは、筐体内に、制御コントローラ部と、デバイスクラスとしてHIDを持つUSB通信カードを装着するカードスロットとを備え、
該カードスロットに前記USB通信カードを実装することで、前記制御コントローラ部並びにUPS管理装置に対してUSB通信できるようにした、
ことを特徴とする請求項1に記載のUPS管理装置。
The UPS includes a control controller unit and a card slot in which a USB communication card having HID as a device class is mounted in a housing,
By mounting the USB communication card in the card slot, it is possible to perform USB communication with the control controller unit and the UPS management device.
The UPS management device according to claim 1.
前記USB通信カードは、その内部に、少なくともCPU及びRAMを有し、その周辺に、前記制御コントローラ部から電源が供給される第1のインタフェース、前記制御コントローラ部との通信を行う第2のインタフェース、および、USBケーブルと接続するUSBコネクタポートを有する、
ことを特徴とする請求項4に記載のUPS管理装置。
The USB communication card has at least a CPU and a RAM inside, a first interface to which power is supplied from the control controller unit, and a second interface that communicates with the control controller unit in the periphery thereof And having a USB connector port to connect with the USB cable,
The UPS management device according to claim 4.
HID_USB通信を用いて、HIDクラスのデバイスを内蔵するUPSを管理するUPS管理装置における管理方法であって、前記UPS管理装置は、
汎用のUSBドライバと、該汎用のUSBドライバにアクセスするアプリケーションとを有し、
前記UPSに実装されるUSBデバイス構成のエンドポイントで定義された転送方式及び該転送方式による転送を行うエンドポイントに対して、前記アプリケーションが、USB対応機器において共通使用される標準リクエストの通信フィールドで定義される「GET_DESCRIPTOR」及び「SET_DESCRIPTOR」の制御パケットを使用して前記UPSの状態監視や設定についての情報のやりとりする、
ことを特徴とするUPS管理方法。
A management method in a UPS management apparatus that manages a UPS incorporating a device of HID class using HID_USB communication, wherein the UPS management apparatus
A general-purpose USB driver and an application for accessing the general-purpose USB driver;
For the transfer method defined at the endpoint of the USB device configuration implemented in the UPS and the endpoint that performs transfer by the transfer method, the application is used in the communication field of the standard request that is commonly used in USB compatible devices. Exchange information about the UPS status monitoring and settings using the defined control packets of "GET_DESCRIPTOR" and "SET_DESCRIPTOR"
UPS management method characterized by this.
前記転送方式は、コントロール転送である、
ことを特徴とする請求項6に記載のUPS管理方法。
The transfer method is control transfer.
The UPS management method according to claim 6.
JP2015057140A 2015-03-20 2015-03-20 UPS management apparatus and method using HID_USB communication Active JP6531446B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015057140A JP6531446B2 (en) 2015-03-20 2015-03-20 UPS management apparatus and method using HID_USB communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015057140A JP6531446B2 (en) 2015-03-20 2015-03-20 UPS management apparatus and method using HID_USB communication

Publications (2)

Publication Number Publication Date
JP2016177531A true JP2016177531A (en) 2016-10-06
JP6531446B2 JP6531446B2 (en) 2019-06-19

Family

ID=57069124

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015057140A Active JP6531446B2 (en) 2015-03-20 2015-03-20 UPS management apparatus and method using HID_USB communication

Country Status (1)

Country Link
JP (1) JP6531446B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6122676A (en) * 1998-01-07 2000-09-19 National Semiconductor Corporation Apparatus and method for transmitting and receiving data into and out of a universal serial bus device
JP2001051938A (en) * 1999-08-06 2001-02-23 Ntt Docomo Inc Electronic equipment corresponding to usb
JP2002199251A (en) * 2000-12-27 2002-07-12 Canon Inc Power supply method and power supply device and universal head device and information input device and information communication system
JP2010039616A (en) * 2008-08-01 2010-02-18 Buffalo Inc Device, information processing system and information processing method
JP2010128588A (en) * 2008-11-25 2010-06-10 Canon Inc Usb system device
JP2010166650A (en) * 2009-01-13 2010-07-29 Fuji Electric Systems Co Ltd Device and method for managing uninterruptible power supply
JP2014120057A (en) * 2012-12-18 2014-06-30 Ricoh Co Ltd Information processor, and program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6122676A (en) * 1998-01-07 2000-09-19 National Semiconductor Corporation Apparatus and method for transmitting and receiving data into and out of a universal serial bus device
JP2001051938A (en) * 1999-08-06 2001-02-23 Ntt Docomo Inc Electronic equipment corresponding to usb
JP2002199251A (en) * 2000-12-27 2002-07-12 Canon Inc Power supply method and power supply device and universal head device and information input device and information communication system
JP2010039616A (en) * 2008-08-01 2010-02-18 Buffalo Inc Device, information processing system and information processing method
JP2010128588A (en) * 2008-11-25 2010-06-10 Canon Inc Usb system device
JP2010166650A (en) * 2009-01-13 2010-07-29 Fuji Electric Systems Co Ltd Device and method for managing uninterruptible power supply
JP2014120057A (en) * 2012-12-18 2014-06-30 Ricoh Co Ltd Information processor, and program

Also Published As

Publication number Publication date
JP6531446B2 (en) 2019-06-19

Similar Documents

Publication Publication Date Title
US11792271B2 (en) Remote management for a computing device
US8898349B1 (en) IPMI over USB data transfer between host computer and baseboard management controller (BMC)
US9645954B2 (en) Embedded microcontroller and buses
US9696777B2 (en) Computer port control
CN110687993B (en) Controlling power delivery by tunneling messages over USB
US10515043B2 (en) Smart interface card control method and apparatus through a virtualized management interface
US20140344431A1 (en) Baseboard management system architecture
EP2453364B1 (en) A method for deterministic SAS discovery and configuration
CN108829567A (en) Support the monolithic NVMe hard disk backboard of dual lighting and the ignition method of hard disk backboard
US11231937B2 (en) Autonomous host detection for communication port management
US11256639B2 (en) Method, apparatus, system to enhance the device policy manager (DPM) to manage an expended USB-C ecosystem
EP3234788A1 (en) DATA TRANSMISSION USING PCIe PROTOCOL VIA USB PORT
CN110554943B (en) Multi-node server CMC management system and method based on I3C
US9201833B2 (en) Backplane controller capable of transferring and receiving data through USB interface
US9256569B2 (en) Monitoring and managing storage drives and performing backplane controller firmware using a USB interface
KR20160013174A (en) A method, apparatus and system for performing management component transport protocol (mctp) communications with a universal serial bus (usb) device
US20190171268A1 (en) Usb power delivery
JP6933022B2 (en) Communication devices, communication terminals, and communication systems
JP2014109829A (en) Information processor and power feeding method
CN110612520A (en) Configuration parameter delivery
JP6531446B2 (en) UPS management apparatus and method using HID_USB communication
JP2016177333A (en) Information processing apparatus and control method thereof
CN211787062U (en) MCTP equipment testing arrangement
CN114443067A (en) CPLD (complex programmable logic device) file burning system and CPLD file burning method
CN109743206B (en) Dongle based on EtherCAT and use method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181226

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: 20190423

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190506

R150 Certificate of patent or registration of utility model

Ref document number: 6531446

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250