A kind of method that USB keyboard calls OSD switching channels in KVM equipment and the equipment
Technical field
The present invention relates to a kind of field of computer technology, USB key in specifically a kind of KVM equipment and the KVM equipment
The method that disk calls OSD switching channels.
Background technology
With the development of computer technology, the high-efficiency management of cluster computer is particularly important, KVM technologies meet the tendency of and
It is raw.In recent years, the progress of KVM technologies so that KVM equipment upper keyboards, mouse, display are not only as simple basic input
Outut device, can also derive other functions for convenience of cluster computer management, and such as display is gone back in addition to basic output display
The each channel statuses of KVM, current channel number etc. can be shown by OSD menu, keyboard can be with except basic key assignments input function
Select and switching channel, this patent is exactly a kind of method that USB keyboard calls OSD switching channels in KVM equipment.
The content of the invention
The technical assignment of the present invention is to solve the deficiencies in the prior art, there is provided a kind of simple structure, initial by USB keyboard
Change the method that the KVM equipment and USB keyboard accurately received and dispatched with data calls OSD switching channels.
The technical scheme is that what is realized in the following manner, a kind of KVM equipment, its structure include current channel meter
Calculation machine, KVM equipment, USB keyboard and display, are provided with switch unit and OSD unit in the KVM equipment, and OSD unit passes through
Input interface is connected with USB keyboard, is connected with display by output interface, and above-mentioned OSD unit is also connected by switch unit
There is current channel computer.
The OSD unit includes that MCU controllers, OSD produce chip, HID interface chips, RGB chip superposeds, input interface
And output interface, wherein input interface is the keyboard interface of USB HID protocol standards, and HID interface chips are by the input interface
Connection USB keyboard, the HID interface chips are also associated with MCU controllers the transmitting-receiving for completing usb data;The output
Interface is USB interface, and MCU controllers order produces chip, RGB chip superposeds by OSD and connects the USB interface, and above-mentioned MCU is controlled
Device processed and OSD are produced and are connected by I2C buses between chip.
The switch unit connects the MCU controllers of above-mentioned OSD unit and receives the passage switching letter that MCU controllers send
Number, receive and dispatch its USB keyboard signal for sending;It is current that the switch unit is also associated with current channel computer and receives and dispatches which sends
USB keyboard signal, receive its current rgb signal for sending;Switch unit also sends computer rgb signal and gives RGB chip superposeds.
A kind of method that USB keyboard calls OSD switching channels in KVM equipment, its specific implementation step is:
1)Initialization is completed by MCU controllers;
2) after the completion of the initialization of MCU controllers, USB keyboard connection is detected the presence of, when connection is detected, initializes USB key
Disk;
3)IN bags are actively sent after completing USB keyboard initialization and obtains the button data from keyboard:When get by
Key data be self-defined OSD image processing commands when, send OSD operation signals control image change, i.e., according to keyboard commands at
Reason OSD menu images, while sending handover information to switch unit, the synchronism switching for completing graphical interfaces with physical connection is moved
Make;If the keyboard data for obtaining is not OSD operational orders, button data information is sent to current logical again with usb data form
Then road computer repeats above-mentioned action.
In above-mentioned implementation steps, when computer has keyboard light data output, MCU controllers will also receive keyboard light number
Keyboard light status display is realized to USB keyboard according to simultaneously adverse transference.
The produced compared with prior art beneficial effect of the present invention is:
A kind of KVM equipment and USB keyboard of the present invention calls the method for OSD switching channels by the USB of OSD unit module
Keyboard equipment is initialized and is accurately received from USB keyboard button valid data each time, is completed the switching of OSD images and is connected with physics
The synchronization process of road switching is connected, whole operation process is easy, flexible, visualization, thus has good value for applications.
Description of the drawings
Accompanying drawing 1 is the structural schematic block diagram of the present invention.
Accompanying drawing 2 is the workflow schematic diagram of the present invention.
Labelling in accompanying drawing is represented respectively:
1st, current channel computer, 2, KVM equipment, 2.1, switch unit, 2.2, OSD unit, 2.21, MCU controllers,
2.22nd, HID interface chips, 2.23, OSD produce chip, 2.24, RGB chip superposeds, 3, USB keyboard, 4, display.
Specific embodiment
Call the side of OSD switching channels below in conjunction with the accompanying drawings to USB keyboard in a kind of KVM equipment and the equipment of the present invention
Method is described in detail below.
As shown in Figure 1, a kind of KVM equipment, its structure include current channel computer 1, KVM equipment 2, USB keyboard 3
With display 4, switch unit 2.1 and OSD unit 2.2 in the KVM equipment 2, are provided with, OSD unit 2.2 passes through input interface
USB keyboard 3 is connected with, display 4 is connected with by output interface, above-mentioned OSD unit 2.2 is also connected by switch unit 2.1
There is current channel computer 1.
The OSD unit 2.2 includes that MCU controllers 2.21, OSD produce chip 2.23, HID interface chips 2.22, RGB and fold
The keyboard interface of concrete-cored 2.24, input interface and output interface, wherein input interface for USB HID protocol standards, HID interfaces
Chip 2.22 connects USB keyboard by the input interface, and the HID interface chips 2.22 are also associated with MCU controllers 2.21 simultaneously
For completing the transmitting-receiving of usb data;The output interface is USB interface, and 2.21 order of MCU controllers produces chip by OSD
2.23rd, RGB chip superposeds 2.24 connect the USB interface, and above-mentioned MCU controllers 2.21 and OSD are produced and passed through between chip 2.23
I2C buses connect.
The switch unit 2.1 connects the MCU controllers 2.21 of above-mentioned OSD unit 2.2 and receives MCU controllers 2.21
The channel switching signal that goes out, receive and dispatch its USB keyboard signal for sending;The switch unit 2.1 is also associated with current channel computer 1
And receive and dispatch current USB keyboard signal which sends, receive its current rgb signal for sending;Switch unit 2.1 also sends computer
Rgb signal is to RGB chip superposeds 2.24.
As shown in Figure 2, a kind of method that USB keyboard calls OSD switching channels in KVM equipment, its specific implementation step
For:
1)Initialization is completed by MCU controllers 2.21;
2) after the completion of MCU controllers 2.21 are initialized, USB keyboard connection is detected the presence of, when connection is detected, is initialized
USB keyboard;
3)IN bags are actively sent after completing USB keyboard initialization and obtains the button data from keyboard:When get by
Key data be self-defined OSD image processing commands when, send OSD operation signals control image change, i.e., according to keyboard commands at
Reason OSD menu images, while sending handover information to switch unit 2.1, complete the synchronism switching of graphical interfaces and physical connection
Action;If the keyboard data for obtaining is not OSD operational orders, button data information is sent to currently with usb data form again
Then channel computer 1 repeats above-mentioned action.
In above-mentioned implementation steps, when computer has keyboard light data output, MCU controllers 2.21 will also receive keyboard
Simultaneously adverse transference realizes keyboard light status display to USB keyboard to lamp data.
The simulation of MCU controllers 2.21 USB main interface working methods in above-mentioned technical proposal are connected with USB keyboard, initially
Change process will compatible difference USB HID descriptors keyboard, if initializing unsuccessful, MCU controllers 2.21 cannot be received
To the key information of keyboard, control OSD image channels switch just does not know where to begin.MCU controllers 2.21 want active poll USB key
Disc apparatus whether there is button data to be sent, and requires that comparison is short on poll-interval, and mistake or omission receive any one button
Data can all make control become unstable.Therefore, in firmware handle, the descriptor of different USB HID keyboards is classified
Process, raising is initialized to power;Accurate control on poll-interval, far smaller than physical button speed, to be properly received
Each button data.
Embodiment:In the hardware designs of 2.2 module of OSD unit, controlled as MCU with the C8051F340 with USB interface
Device processed 2.21, CH374 is used as USB HID interface bridge pieces, the USB interface connection keyboard of CH374, parallel port connection C8051F340;
Chip 2.23 is produced as OSD with MTV030, I2C buses are connected with MCU controllers 2.21, and VGA signal output parts are connected to RGB
On 2.24 MAX4023 of chip superposed.In software design, when click keyboard Alt key, display recalls OSD images switching dish
Single, after OSD menu is enabled, current channel computer 1 cannot receive keyboard data again, select pre-set path with directionkeys, use
"enter" key" determines current channel and closes OSD, closes keyboard data and 1 proper communication of current channel computer after OSD.
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.