Switching system, USB hub device and operating method thereof
By introducing a multiplexer circuit and a hub controller into the USB hub device, automatic switching of USB resource sharing between multiple hosts is achieved, solving the problem of manual switching in the prior art and improving the convenience of device use.
Patent Information
- Application Number
- CN202511122304.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-04-17
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-11
AI Technical Summary
Existing USB hub devices have difficulty sharing resources among multiple hosts and require manual plugging and unplugging of connectors for switching.
Design a USB hub device with multiple upstream and downstream port connectors, combined with a multiplexer circuit and a hub controller, to automatically switch connected hosts via switching commands, allowing resources to be selectively shared among multiple hosts.
It enables switching USB device connections between multiple hosts without manually plugging and unplugging USB connectors, improving the convenience and flexibility of device use.
Smart Images

Figure CN120929412A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an electronic device, and more particularly to a switching system, a Universal Serial Bus (USB) hub device, and a method of operating thereof. Background Technology
[0002] Universal Serial Bus (USB) is a data transfer interface that connects a host and devices. Modern computers, mobile phones, and other electronic products all have USB interfaces. A USB architecture has only one "USB host," while other electronic devices are "USB devices." These USB devices can include Human Interface Devices (HID), Solid-State Drives (SSDs), USB hubs, or other peripherals. HID devices can include keyboards, mice, or other devices. USB hubs allow multiple USB devices to connect to the same USB connector on a host device.
[0003] A typical USB hub device has only one USB Upstream Facing Port (UFP) connector to connect to a host (or another USB hub device) and one USB Downstream Facing Port (DFP) connector. To reconnect a USB hub with multiple connected USB devices from one host to another, the usual technique is to manually unplug the USB hub's USB UFP connector from the original host and then reconnect it to the new host. How to allow multiple USB hosts to simultaneously share the resources of the same USB hub device is one of the many technical challenges in the USB field. Summary of the Invention
[0004] This invention provides a switching system, a Universal Serial Bus (USB) hub device, and a method for operating the same, so that the same USB hub device can be selectively shared with multiple hosts.
[0005] In one embodiment of the invention, the switching system includes a USB hub device and a first host. The USB hub device includes multiple upstream facing port (UFP) connectors and multiple downstream facing port (DFP) connectors. These upstream facing port connectors are used to couple to different hosts. Each of these downstream facing port connectors is used to couple to a human interface device (HID), a USB device, or another USB hub device. The first host is coupled to a first upstream facing port connector of the USB hub device. In response to the first host determining that an HID operation event meets a condition, the first host selectively issues a first switching command to the USB hub device. Based on the first switching command issued by the first host, the USB hub device disconnects from the first host and establishes a connection to a second host, wherein the second host is coupled to a second upstream facing port connector of the USB hub device.
[0006] In one embodiment of the present invention, the operation method of the switching system includes: in response to a first host determining that the operation event of the human interface device meets the conditions, the first host of the switching system selectively issues a first switching command to the USB hub device of the switching system; and based on the first switching command issued by the first host, the USB hub device disconnects the connection to the first host and establishes a connection to the second host.
[0007] In one embodiment of the invention, the USB hub device includes a plurality of upstream port connectors, a plurality of downstream port connectors, a multiplexer circuit, and a hub controller. The upstream port connectors are used to couple to different hosts. Each of the downstream port connectors is used to couple to a human interface device, a USB device, or another USB hub device. A plurality of USB selection ports of the multiplexer circuit are coupled to the upstream port connectors in a one-to-one manner. An upstream port of the hub controller is coupled to a common USB port of the multiplexer circuit. A plurality of downstream ports of the hub controller are coupled to the downstream port connectors in a one-to-one manner. The hub controller controls the multiplexer circuit to selectively couple one of the upstream port connectors to an upstream port of the hub controller. In response to a first host coupled to a first uplink port connector among these uplink port connectors issuing a first switching command to the hub controller via a multiplexer circuit, the hub controller, based on the first switching command, controls the multiplexer circuit to disconnect the connection between the first host and the hub controller, and the hub controller also controls the multiplexer circuit to attempt to establish a connection to a second host via a second uplink port connector among these uplink port connectors. In response to a successful connection to the second host, the hub controller is controlled by the second host with the established connection. In response to a failed connection to the second host, the hub controller controls the multiplexer circuit to restore the connection between the first host and the hub controller.
[0008] In one embodiment of the present invention, the operation method of the USB hub device includes: a hub controller of the USB hub device controlling a multiplexer circuit of the USB hub device to selectively couple one of a plurality of uplink port connectors of the USB hub device to an uplink port of the hub controller; in response to a first host coupled to a first uplink port connector among the uplink port connectors, issuing a first switching command to the hub controller through the multiplexer circuit, the hub controller controlling the multiplexer circuit based on the first switching command to disconnect the connection between the first host and the hub controller, and the hub controller controlling the multiplexer circuit to attempt to establish a connection to a second host through a second uplink port connector among the uplink port connectors; in response to the successful establishment of the connection to the second host, the second host controlling the hub controller; and in response to the failure to establish the connection to the second host, the hub controller controlling the multiplexer circuit to restore the connection between the first host and the hub controller.
[0009] Based on the above, the USB hub device described in the embodiments of the present invention has multiple upstream port connectors and multiple downstream port connectors, wherein these upstream port connectors are used to couple to different hosts. Therefore, resources coupled to these downstream port connectors (e.g., human interface devices, USB devices, or another USB hub device) can be selectively shared with multiple hosts. The USB hub device can establish a connection to one of the multiple hosts, and the host establishing the connection (e.g., the first host) can determine whether a human interface device operation event meets a certain condition. In response to the first host determining that the human interface device operation event meets the condition, the first host selectively issues a switching command to the USB hub device to trigger the USB hub device to disconnect from the first host and establish a connection to another host (e.g., the second host). Therefore, users can change the connection of multiple USB devices connected to the USB hub device from one host to another without manually plugging and unplugging USB connectors.
[0010] To make the above features and advantages of the present invention more apparent and understandable, specific embodiments are described below in conjunction with the accompanying drawings. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of a switching system according to an embodiment of the present invention.
[0012] Figure 2 This is a flowchart illustrating an operation method of a switching system according to an embodiment of the present invention.
[0013] Figure 3 This is a schematic diagram of the connection structure of a USB hub device, drawn according to another application scenario of the present invention.
[0014] Figure 4 This is a circuit block diagram of a USB hub device according to an embodiment of the present invention.
[0015] Figure 5 This is a flowchart illustrating the operation method of a USB hub device according to an embodiment of the present invention.
[0016] Figure 6 This is a circuit block diagram of a USB hub device according to another embodiment of the present invention.
[0017] Figure 7 This is a flowchart illustrating the operation method of a USB hub device according to another embodiment of the present invention.
[0018] Figure 8 This is a flowchart illustrating the operation method of a host computer according to an embodiment of the present invention. Detailed Implementation
[0019] The term "coupled (or connected)" as used throughout this application (including the claims) may refer to any direct or indirect means of connection. For example, if the text describes a first device coupled (or connected) to a second device, it should be interpreted as the first device being directly connected to the second device, or the first device being indirectly connected to the second device through other devices or some means of connection. The terms "first," "second," etc., used throughout this application (including the claims) are used to name elements or distinguish different embodiments or scopes, and are not intended to limit the upper or lower limit of the number of elements, nor to limit the order of elements. Furthermore, wherever possible, elements / components / steps using the same reference numerals in the drawings and embodiments represent the same or similar parts. Elements / components / steps using the same reference numerals or the same terms in different embodiments can be referred to mutually in the relevant descriptions.
[0020] Figure 1 This is a schematic diagram of a switching system 100 according to an embodiment of the present invention. Figure 1 The switching system 100 shown includes at least one host (e.g., host 110_1, ..., 110_M) and a Universal Serial Bus (USB) hub device 120. The USB hub device 120 includes multiple USB connectors, such as upstream facing port (UFP) connectors UFP12_1, ..., UFP12_M and multiple downstream facing port (DFP) connectors DFP12_1, ..., DFP12_N. The number M of UFP connectors UFP12_1 to UFP12_M and the number N of DFP connectors DFP12_1 to DFP12_N can be any integer determined based on the actual design. Depending on the actual design and application, each of the UFP connectors UFP12_1 to UFP12_M and the DFP connectors DFP12_1 to DFP12_N can be a type-A connector, a type-C connector, or another USB connector.
[0021] Each of the DFP connectors DFP12_1 to DFP12_N is used to couple a Human Interface Device (HID), a USB device, or another USB hub device. For example, in Figure 1In the application scenario shown, DFP connector DFP12_1 is coupled to UFP connector UFP13_1 of USB device 130_1, while DFP connector DFP12_N is coupled to UFP connector UFP13_N of USB device 130_N. Any of USB devices 130_1 to 130_N can be a human interface device with a USB connector, such as a mouse or keyboard.
[0022] UFP connectors UFP12_1 to UFP12_M are used to couple different host devices. For example, host 110_1's DFP connector DFP11_1 is coupled to USB hub device 120's UFP connector UFP12_1. Similarly, host 110_M's DFP connector DFP11_M is coupled to USB hub device 120's UFP connector UFP12_M. Depending on the application, any of host devices 110_1 to 110_M can be a smartphone, tablet computer, laptop computer, or other USB host with a USB connector. Resources coupled to DFP connectors DFP12_1 to DFP12_N can be selectively shared with any of host devices 110_1 to 110_M.
[0023] Figure 2 This is a flowchart illustrating an operation method of a switching system according to an embodiment of the present invention. Please refer to... Figure 1 and Figure 2 Assume that the host currently connected to the USB hub device 120 is host 110_1, and the USB device 130_1 is a human interface device. When the connection to host 110_1 is established, the USB hub device 120 provides the host 110_1 with the operation information of the human interface device 130_1, which is coupled to one of the DFP connectors DFP12_1 to DFP12_N.
[0024] In step S210, the software running on host 110_1 monitors the operation information of a human-machine interface device (HID, such as USB device 130_1) coupled to one of the DFP connectors DFP12_1 to DFP12_N of the USB hub device 120. In step S220, host 110_1 determines whether the operation event of the human-machine interface device (HID) meets a certain condition. For example, in response to a user applying a specified operation (e.g., a specific operation mode of at least one hotkey of a mouse or keyboard) to one of the DFP connectors DFP12_1 to DFP12_N of the USB hub device 120, the software running on host 110_1 can determine that the HID operation event of USB device 130_1 meets the condition. The condition can be defined according to the actual design and application. In some embodiments, the software running on host 110_1 can provide a human-machine interface to the user, and the user sets the condition. For example (but not limited to), the conditions could be "press and hold the left and right mouse buttons simultaneously for three seconds", "press and hold the right mouse button for three seconds", "a key on the keyboard (which can be defined by the user) is pressed three times within one second", "multiple key combinations on the keyboard (such as A+S+D) are pressed continuously for four seconds", or other conditions.
[0025] In response to a host (e.g., host 110_1) currently connected to USB hub device 120 determining that the HID operation event does not meet the conditions (the determination result of step S220 is "No"), the software running on host 110_1 returns to step S210 to continue monitoring the operation information of HID (e.g., USB device 130_1). In response to a host 110_1 currently connected to USB hub device 120 determining that the HID operation event meets the conditions (the determination result of step S220 is "Yes"), host 110_1 selectively issues a switching command to USB hub device 120 (step S230). Based on the switching command issued by host 110_1, in step S240, USB hub device 120 disconnects from host 110_1, and USB hub device 120 establishes a connection to another host (e.g., host 110_M).
[0026] For example, in some embodiments, based on a switching command issued by host 110_1, USB hub device 120 checks whether any of the UFP connectors UFP12_1 to UFP12_M, excluding UFP connector UFP12_1, are coupled to other hosts. In response to other hosts being coupled to other UFP connectors of USB hub device 120 (e.g., host 110_M coupled to UFP connector UFP12_M), USB hub device 120, based on the switching command issued by host 110_1, disconnects the connection to host 110_1 and establishes a connection to other hosts (e.g., host 110_M). In response to no host being coupled to any of the UFP connectors UFP12_1 to UFP12_M, excluding UFP connector UFP12_1, USB hub device 120 maintains the connection between host 110_1 and UFP connector UFP12_1.
[0027] In other embodiments, based on a switching command issued by a host (e.g., host 110_1) currently connected to the USB hub device 120, the USB hub device 120 disconnects the connection between host 110_1 and UFP connector UFP12_1, and attempts to establish a connection with another host via the next UFP connector. In response to a successful connection to another host (e.g., host 110_M), the USB hub device 120 becomes controlled by the host 110_M with the established connection. In response to a failure to establish a connection to another host, the USB hub device 120 restores the connection between the original host (e.g., host 110_1) and the UFP connector.
[0028] In summary, the USB hub device 120 has multiple UFP connectors UFP12_1 to UFP12_M for coupling to different hosts. Resources coupled to DFP connectors DFP12_1 to DFP12_N (e.g., human interface devices, USB devices, or another USB hub device) can be selectively shared with multiple hosts (e.g., hosts 110_1 to 110_M). Specifically, the USB hub device 120 can establish a connection to any one of the multiple hosts 110_1 to 110_M, and the host establishing the connection (e.g., host 110_1) can determine whether a certain condition is met by an HID operation event. For example, suppose the USB device 130_1 is a mouse, and the condition is "right mouse button pressed for three seconds". The user can press and hold the right button of the USB device 130_1 (mouse) for more than three seconds. Host 110_1 can detect the HID operation events of USB device 130_1 through USB hub device 120 to determine whether the HID operation events of USB device 130_1 (mouse) meet the conditions. In response to host 110_1 determining that the HID operation events of USB device 130_1 meet the conditions, host 110_1 selectively sends a switching command to USB hub device 120 to trigger USB hub device 120 to disconnect from host 110_1 and establish a connection to another host (e.g., host 110_M). Therefore, users can reconnect multiple USB devices connected to USB hub device 120 from one host to another without manually plugging and unplugging USB connectors.
[0029] Figure 3 This is a schematic diagram of the connection structure of a USB hub device 120, drawn according to another application scenario of the present invention. Figure 3 The host 110_1~110_M, USB hub device 120, DFP connectors DFP12_1~DFP12_N and USB device 130_N shown can be referenced. Figure 1 The relevant explanations are omitted here. Figure 3 In the application scenario shown, the DFP connector DFP12_1 of the USB hub device 120 is coupled to the UFP connector UFP14 of another USB hub device 140, while the UFP connector UFP15 of the human interface device (HID) 150 is coupled to the DFP connector DFP14 of the USB hub device 140.
[0030] Suppose that USB hub device 120 establishes a connection with host 110_M. Host 110_M, having established the connection, can use USB hub device 120 to detect HID operation events of Human Interface Device (HID) 150 to determine whether the HID operation events of HID 150 meet the stated conditions. For example, suppose HID 150 is a mouse, and the condition is "right mouse button pressed for three seconds." The user can press and hold the right button of HID 150 (mouse) for more than three seconds. Host 110_M can use USB hub devices 120 and 140 to detect HID operation events of HID 150 to determine whether the HID operation events of HID 150 (mouse) meet the stated conditions. In response to host 110_M determining that the HID operation event of HID 150 meets the aforementioned conditions, host 110_M selectively issues a switching command to USB hub device 120 to trigger USB hub device 120 to disconnect from host 110_M and establish a connection to another host (e.g., host 110_1). Therefore, users can reconnect multiple USB devices connected to USB hub device 120 from one host to another without manually plugging and unplugging USB connectors.
[0031] Figure 4 This is a circuit block diagram of a USB hub device 120 according to an embodiment of the present invention. Figure 4 The host devices 110_1 to 110_M, USB hub device 120, and USB devices 130_1 to 130_N shown can be referenced. Figure 1 The relevant explanations are omitted here. Figure 4 The USB hub device 120 shown can be used as Figure 1 This is one of many embodiments of the USB hub device 120 shown. Figure 4 In the illustrated embodiment, the USB hub device 120 includes UFP connectors UFP12_1 to UFP12_M, DFP connectors DFP12_1 to DFP12_N, a multiplexer circuit 121, and a hub controller 122. Figure 4 The UFP connectors UFP12_1 to UFP12_M and DFP connectors DFP12_1 to DFP12_N shown can be referenced. Figure 1 The relevant explanations are omitted here. Depending on the design, in some embodiments, the multiplexer circuit 121 and / or the hub controller 122 may be implemented as hardware circuits. In other embodiments, the multiplexer circuit 121 and / or the hub controller 122 may be implemented as a combination of multiple hardware, firmware, and software (i.e., programs).
[0032] In hardware terms, the multiplexer circuit 121 and / or hub controller 122 described above can be implemented as logic circuits on an integrated circuit. For example, the functions of the multiplexer circuit 121 and / or hub controller 122 can be implemented as various logic blocks, modules, and circuits in one or more hardware controllers, microcontrollers, hardware processors, microprocessors, application-specific integrated circuits (ASICs), digital signal processors (DSPs), field-programmable gate arrays (FPGAs), central processing units (CPUs), and / or other processing units. The functions of the multiplexer circuit 121 and / or hub controller 122 can be implemented as hardware circuits, such as various logic blocks, modules, and circuits in an integrated circuit, using hardware description languages (such as Verilog HDL or VHDL) or other suitable programming languages.
[0033] In software and / or firmware form, the functions of the multiplexer circuit 121 and / or hub controller 122 can be implemented as programming codes. For example, the multiplexer circuit 121 and / or hub controller 122 can be implemented using general programming languages (such as C, C++, or assembly languages) or other suitable programming languages. The programming codes can be recorded / stored in a non-transitory machine-readable storage medium. In some embodiments, the non-transitory machine-readable storage medium includes, for example, semiconductor memory and / or a storage device. An electronic device (e.g., a computer, CPU, hardware controller, microcontroller, hardware processor, or microprocessor) can read and execute the programming codes from the non-transitory machine-readable storage medium to implement the functions of the multiplexer circuit 121 and / or hub controller 122.
[0034] Figure 5This is a flowchart illustrating the operation method of a USB hub device 120 according to an embodiment of the present invention. Please refer to... Figure 4 and Figure 5 Multiple USB selection ports of the multiplexer circuit 121 are coupled one-to-one to UFP connectors UFP12_1 to UFP12_M. The uplink port 122_U of the hub controller 122 is coupled to the USB common port of the multiplexer circuit 121. In step S510, the hub controller 122 controls the multiplexer circuit 121 to selectively couple one of the UFP connectors UFP12_1 to UFP12_M to the uplink port 122_U of the hub controller 122. Multiple downlink ports of the hub controller 122 are coupled one-to-one to DFP connectors DFP12_1 to DFP12_N.
[0035] Here, it is assumed that the host currently connected to the USB hub device 120 is host 110_1, and the USB device 130_1 is a human interface device. In step S520, the host 110_1, which has established the connection, controls the hub controller 122. When the connection to host 110_1 is established, the hub controller 122 provides the host 110_1 with the operation information of the human interface device (e.g., USB device 130_1) coupled to one of the DFP connectors DFP12_1 to DFP12_N via the multiplexer circuit 121. In response to the user applying a specified operation to the human interface device 130_1 (e.g., a specific operation mode of at least one hotkey on a mouse or keyboard), the host 110_1 selectively determines to issue a switching command to the hub controller 122 based on the operation information provided by the hub controller 122.
[0036] In response to the host 110_1 issuing a switching command to the hub controller 122 through the multiplexer circuit 121 (the judgment result of step S530 is "yes"), the hub controller 122 controls the multiplexer circuit 121 to disconnect the connection between the host 110_1 and the hub controller 122 based on the switching command of the host 110_1, and the hub controller 122 controls the multiplexer circuit 121 to attempt to establish a connection to another host (e.g., host 110_M) through another UFP connector among UFP12_1 to UFP12_M (step S540).
[0037] In response to a successful establishment of a connection to another host (e.g., host 110_M) (the result of step S550 is "Yes"), the hub controller 122 is controlled by the newly established host 110_M (step S560). In response to a failure to establish a connection to another host (the result of step S550 is "No"), the hub controller 122 controls the multiplexer circuit 121 to restore the connection between the original host (e.g., host 110_1) and the hub controller 122 (step S570).
[0038] Figure 6 This is a circuit block diagram of a USB hub device 120 according to another embodiment of the present invention. Figure 6 The host devices 110_1 to 110_M, USB hub device 120, and USB devices 130_1 to 130_N shown can be referenced. Figure 1 The relevant explanations are omitted here. Figure 6 The USB hub device 120 shown can be used as Figure 1 This is one of many embodiments of the USB hub device 120 shown. Figure 6 In the illustrated embodiment, the USB hub device 120 includes UFP connectors UFP12_1 to UFP12_M, video input port connectors DPIN12_1 to DPIN12_M, video output port connector DPOUT12, DFP connectors DFP12_1 to DFP12_N, multiplexer circuit 123, and hub controller 122. Figure 6 The UFP connectors UFP12_1 to UFP12_M, DFP connectors DFP12_1 to DFP12_N, multiplexer circuit 123, and hub controller 122 shown can be referenced. Figure 4 The descriptions of the UFP connectors UFP12_1 to UFP12_M, DFP connectors DFP12_1 to DFP12_N, multiplexer circuit 121, and hub controller 122 shown are omitted here.
[0039] Video input port connectors DPIN12_1 to DPIN12_M are coupled one-to-one to multiple video selection ports of multiplexer circuit 123. Video input port connectors DPIN12_1 to DPIN12_M are used to couple to the video output ports of different hosts 110_1 to 110_M. For example, the video output port of host 110_1 is coupled to video input port connector DPIN12_1, and the video output port of host 110_M is coupled to video input port connector DPIN12_M. Video output port connector DPOUT12 is coupled to the common video port of multiplexer circuit 123. Video output port connector DPOUT12 is used to couple to display 60.
[0040] In response to the establishment of a connection between host 110_1 and hub controller 122, USB hub device 120 selectively couples video input port connector DPIN12_1 to video output port connector DPOUT12. For example, hub controller 122 controls multiplexer circuitry 123 to selectively couple video input port connector DPIN12_1 to video output port connector DPOUT12, and hub controller 122 controls multiplexer circuitry 123 to selectively couple UFP connector UFP12_1 to upstream port 122_U of hub controller 122. Similarly, in response to the establishment of a connection between the host 110_M and the hub controller 122, the hub controller 122 of the USB hub device 120 controls the multiplexer circuit 123 to selectively couple the video input port connector DPIN12_M to the video output port connector DPOUT12, and the hub controller 122 controls the multiplexer circuit 123 to selectively couple the UFP connector UFP12_M to the uplink port 122_U of the hub controller 122.
[0041] Figure 7 This is a flowchart illustrating the operation method of a USB hub device 120 according to another embodiment of the present invention. Please refer to... Figure 4 and Figure 7 After being powered on, the hub controller 122 scans all UFP connectors UFP12_1 to UFP12_M through the multiplexer circuit 121 (step S710). Assuming that the host 110_1 is coupled to the UFP connector UFP12_1, the hub controller 122 establishes a connection with the host 110_1 through the multiplexer circuit 121 and the UFP connector UFP12_1 (the judgment result of step S720 is "yes"). Then, the hub controller 122 is controlled by the host 110_1 that has established the connection (step S730).
[0042] In response to host 110_1 issuing a switching command to hub controller 122 via multiplexer circuit 121 (the result of step S740 is "Yes"), hub controller 122 controls multiplexer circuit 121 based on host 110_1's switching command to terminate the current connection between host 110_1 and hub controller 122, and hub controller 122 controls multiplexer circuit 121 to attempt to establish a connection to another host through the next UFP connector (step S750). In response to the successful establishment of a connection to another host (e.g., host 110_M) (the result of step S760 is "Yes"), hub controller 122 is then controlled by the newly established host 110_M (step S730).
[0043] When a connection is established between a new host (e.g., host 110_M) and USB hub device 120, in response to host 110_M determining that the HID operation event meets the conditions, host 110_M selectively issues a switching command to USB hub device 120. Based on the switching command issued by host 110_M, USB hub device 120 disconnects from host 110_M and establishes a connection to another host. This other host is, for example, not shown in the diagram. Figure 1 The third host is coupled to the third UFP connector (not shown) among the UFP connectors UFP12_1 to UFP12_M of the USB hub device 120. Figure 1 ).
[0044] For example, when a connection is established between a new host (e.g., host 110_M) and the USB hub device 120, the hub controller 122 provides operation information of the human interface device coupled to one of the DFP connectors DFP12_1 to DFP12_N to the host 110_M via the multiplexer circuit 121. In response to a user performing a specified operation on the human interface device, the host 110_M selectively determines to issue a switching command to the hub controller 122 based on the operation information provided by the hub controller 122. Based on the switching command issued by the host 110_M, the hub controller 122 controls the multiplexer circuit 121 to disconnect the connection to the host 110_M and establish a connection to a third host (e.g., host 110_1 or another host).
[0045] In response to a failure to establish a connection with another host (the result of step S760 is "No"), the hub controller 122 controls the multiplexer circuit 121 to restore the connection between the current host (e.g., host 110_1) and the hub controller 122 (step S770). In response to a successful restoration of the connection to host 110_1 (the result of step S780 is "Yes"), the hub controller 122 returns to step S730 to continue being controlled by the host 110_1 with the established connection. In response to a failure to restore the connection to host 110_1 (the result of step S780 is "No"), the hub controller 122 returns to step S710 to scan all UFP connectors UFP12_1 to UFP12_M again through the multiplexer circuit 121.
[0046] Figure 8 This is a flowchart illustrating the operation method of a host computer according to an embodiment of the present invention. Please refer to... Figure 1 and Figure 8Here, it is assumed that host 110_1 establishes a connection with hub controller 122. Software running on host 110_1 can monitor operation information of HID (Human Interface Device, such as USB device 130_1) coupled to DFP connectors DFP12_1 to DFP12_N via USB hub device 120 (step S810). The software on host 110_1 can determine whether a HID operation event meets a certain condition. For example (but not limited to), the condition could be "pressing down the left and right mouse buttons simultaneously for three seconds," "a key on the keyboard (which can be user-defined) being pressed three times within one second," or other conditions.
[0047] In response to the host (e.g., host 110_1) currently connected to USB hub device 120 determining that the HID operation event does not meet the conditions (the determination result of step S820 is "No"), the software running on host 110_1 returns to step S810 to continue monitoring the operation information of HID (e.g., USB device 130_1). Generally, a USB host can send an inquiry request to a USB device to obtain relevant information about the USB device. In response to the host 110_1 currently connected to USB hub device 120 determining that the HID operation event meets the conditions (the determination result of step S820 is "Yes"), the software of host 110_1 sends an inquiry command to USB hub device 120 to obtain the connection status of the DFP connectors DFP12_1 to DFP12_N of USB hub device 120 (step S830). Based on the connection status of the DFP connectors DFP12_1 to DFP12_N of the USB hub device 120, the host 110_1 determines whether to issue a switching command to the USB hub device 120 to immediately switch the host (step S840). For example, the host 110_1 checks whether any non-human interface device (non-HID), such as a flash drive or solid-state drive, is coupled to the DFP connectors DFP12_1 to DFP12_N. If none of the DFP connectors DFP12_1 to DFP12_N are coupled to a non-human interface device, the judgment result of step S840 is "yes". If any of the DFP connectors DFP12_1 to DFP12_N is coupled to a non-human interface device, the judgment result of step S840 is "no".
[0048] In response to host 110_1 determining that USB hub device 120 can immediately switch hosts (the determination result of step S840 is "yes", for example, in response to the connection status of DFP connectors DFP12_1 to DFP12_N indicating that none of the DFP connectors DFP12_1 to DFP12_N are connected to a non-human interface device), the host currently connected to USB hub device 120 (e.g., host 110_1) issues a switching command to USB hub device 120 (step S850). Based on the switching command issued by host 110_1, USB hub device 120 disconnects from host 110_1 and establishes a connection to another host (e.g., host 110_M).
[0049] If the connection status of DFP connectors DFP12_1 to DFP12_N indicates that any of them is connected to a non-human interface device (the result of step S840 is "No"), then host 110_1 issues a warning to the user (step S860). After issuing the warning to the user, the software running on host 110_1 continues to monitor the operation information of HID (human interface device, such as USB device 130_1) coupled to DFP connectors DFP12_1 to DFP12_N via USB hub device 120 (step S860). If the HID operation event still meets the conditions (the result of step S870 is "Yes", indicating that the user agrees to USB hub device 120 performing a forced host switch), then host 110_1 issues a switch command to USB hub device 120 (step S850). Based on the switching command issued by host 110_1, USB hub device 120 disconnects from host 110_1 and establishes a connection to another host (e.g., host 110_M). In response to the HID operation event changing to not meeting the stated conditions (the judgment result of step S870 is "No"), the software running on host 110_1 returns to step S810 to continue monitoring the operation information of HID (e.g., USB device 130_1).
[0050] Although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the present invention. Those skilled in the art can make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the scope defined in the appended claims.
Claims
1. A switching system, comprising: A USB hub device includes multiple upstream port connectors and multiple downstream port connectors, wherein the upstream port connectors are used to couple to different hosts, and each of the downstream port connectors is used to couple to a human interface device, a USB device, or another USB hub device. as well as A first host is coupled to a first upstream port connector in the upstream port connector of the USB hub device, wherein... In response to the first host determining that the human interface device operation event meets a condition, the first host selectively issues a first switching command to the USB hub device. as well as Based on the first switching command issued by the first host, the USB hub device disconnects from the first host and establishes a connection to the second host, wherein the second host is coupled to the second uplink port connector in the uplink port connector of the USB hub device.
2. The switching system as described in claim 1, wherein Once a connection to the first host is established, the USB hub device provides operational information of the human interface device coupled to one of the downstream port connectors to the first host. In response to a user performing a specified operation on the human interface device of one of the downstream port connectors coupled to the USB hub device, the first host determines that the human interface device operation event meets the condition.
3. The switching system of claim 2, wherein the specified operation includes a specific operation mode of at least one hotkey of a mouse or keyboard.
4. The switching system as described in claim 1, wherein, Based on the first switching command, the USB hub device checks whether any of the other upstream port connectors of the USB hub device, other than the first upstream port connector, are coupled to other hosts. In response to the other host being coupled to the other uplink port connector of the USB hub device, the USB hub device disconnects the connection to the first host and establishes a connection to the other host based on the first switching command; as well as In response to the absence of any host coupled to any of the upstream port connectors of the USB hub device other than the first upstream port connector, the USB hub device maintains the connection between the first host and the first upstream port connector.
5. The switching system as described in claim 1, wherein, The USB hub device disconnects the connection between the first host and the first uplink port connector based on the first switching command issued by the first host, and attempts to establish a connection with the second host through the second uplink port connector; In response to the successful establishment of the connection to the second host, the USB hub device is controlled by the second host that established the connection; as well as In response to the failure to establish a connection with the second host, the USB hub device restores the connection between the first host and the first uplink port connector.
6. The switching system of claim 1, wherein the USB hub device further includes a plurality of video input port connectors and video output port connectors, the video output port connectors of the USB hub device being used to couple to a display, the video input port connectors of the USB hub device being used to couple to video output ports of different hosts, the video output port of the first host being coupled to a first video input port connector of the video input port connectors, and the video output port of the second host being coupled to a second video input port connector of the video input port connectors. In response to the establishment of a connection between the first host and the first uplink port connector, the USB hub device selectively couples the first video input port connector of the USB hub device to the video output port connector of the USB hub device; and In response to the establishment of a connection between the second host and the second uplink port connector, the USB hub device selectively couples the second video input port connector of the USB hub device to the video output port connector of the USB hub device.
7. The switching system of claim 1, wherein the USB hub device comprises: The uplink port connector; The downlink port connector; A multiplexer circuit, wherein a plurality of USB selection ports of the multiplexer circuit are coupled in pairs to the upstream port connector; as well as A hub controller, wherein an uplink port of the hub controller is coupled to a USB common port of the multiplexer circuit, and a plurality of downlink ports of the hub controller are coupled in pairs to the downlink port connectors, the hub controller controlling the multiplexer circuit to selectively couple one of the uplink port connectors to the uplink port of the hub controller. In response to the first host sending the first switching command to the hub controller through the multiplexer circuit, the hub controller controls the multiplexer circuit based on the first switching command to disconnect the connection between the first host and the hub controller, and the hub controller controls the multiplexer circuit to attempt to establish a connection with the second host through the second uplink port connector. In response to the successful establishment of the connection to the second host, the hub controller is controlled by the second host that established the connection; as well as In response to the failure to establish a connection with the second host, the hub controller controls the multiplexer circuit to restore the connection between the first host and the hub controller.
8. The switching system of claim 7, wherein the USB hub device further comprises: Multiple video input port connectors for coupling video output ports of different hosts, wherein the video input port connectors are coupled in pairs to multiple video selection ports of the multiplexer circuit, the video output port of the first host is coupled to the first video input port connector of the video input port connectors, and the video output port of the second host is coupled to the second video input port connector of the video input port connectors; as well as A video output port connector for coupling to a display, wherein the video output port connector is coupled to the common video port of the multiplexer circuit. In response to the establishment of a connection between the first host and the hub controller, the hub controller controls the multiplexer circuit to selectively couple the first video input port connector to the video output port connector. as well as In response to the establishment of a connection between the second host and the hub controller, the hub controller controls the multiplexer circuit to selectively couple the second video input port connector to the video output port connector.
9. The switching system as described in claim 1, wherein, The first host monitors the operation information of the human interface device coupled to one of the downlink port connectors via the USB hub device; In response to the operation information of the human interface device indicating that the operation event of the human interface device meets the condition, the first host sends an inquiry command to the USB hub device to know the connection status of the downstream port connector of the USB hub device. as well as Based on the connection status of the downstream port connector of the USB hub device, the first host determines whether to issue the first switching command to the USB hub device.
10. The switching system as described in claim 9, wherein, In response to the connection status of the downstream port connector indicating that each non-human interface device is not connected to the downstream port connector of the USB hub device, the first host issues the first switching command to the USB hub device. In response to the connection status of the downstream port connector indicating that any non-human interface device is connected to the downstream port connector of the USB hub device, the first host issues a warning to the user; and After issuing the warning to the user, in response to the fact that the human interface device operation event still meets the condition, the first host issues the first switching command to the USB hub device.
11. The switching system as claimed in claim 1, wherein, When a connection is established between the second host and the second uplink port connector, in response to the second host determining that the human interface device operation event meets the condition, the second host selectively issues a second switching command to the USB hub device. as well as Based on the second switching command issued by the second host, the USB hub device disconnects from the second host and establishes a connection to the third host, wherein the third host is coupled to the third uplink port connector in the uplink port connector of the USB hub device.
12. A method for switching systems, comprising: In response to a first host in the switching system determining that an operation event of the human interface device meets a condition, the first host selectively issues a first switching command to the USB hub device of the switching system. The USB hub device includes a plurality of uplink port connectors and a plurality of downlink port connectors. The uplink port connectors are used to couple to different hosts. Each of the downlink port connectors is used to couple to a human interface device, a USB device, or another USB hub device. The first host is coupled to the first uplink port connector among the uplink port connectors of the USB hub device. as well as Based on the first switching command issued by the first host, the USB hub device disconnects the connection to the first host and establishes a connection to the second host, wherein the second host is coupled to the second uplink port connector in the uplink port connector of the USB hub device.
13. The operating method as described in claim 12, further comprising: Once a connection to the first host is established, the USB hub device provides the first host with operational information of the human interface device coupled to one of the downstream port connectors, and In response to a user performing a specified operation on the human interface device of one of the downstream port connectors coupled to the USB hub device, the first host determines that the human interface device operation event meets the condition.
14. The operation method of claim 13, wherein the specified operation includes a specific operation mode of at least one hotkey of a mouse or keyboard.
15. The operating method as described in claim 12, further comprising: Based on the first switching command, the USB hub device checks whether any of the other upstream port connectors of the USB hub device, other than the first upstream port connector, are coupled to other hosts. In response to the other upstream port connector of the other host coupled to the USB hub device, the USB hub device disconnects the connection to the first host and establishes a connection to the other host based on the first switching command; as well as In response to the absence of any host coupled to any of the upstream port connectors of the USB hub device other than the first upstream port connector, the USB hub device maintains the connection between the first host and the first upstream port connector.
16. The operating method as described in claim 12, further comprising: Based on the first switching command issued by the first host, the USB hub device disconnects the connection between the first host and the first uplink port connector, and the USB hub device attempts to establish a connection with the second host through the second uplink port connector. In response to the successful establishment of the connection with the second host, the USB hub device is controlled by the second host that has established the connection. as well as In response to the failure to establish a connection with the second host, the USB hub device restores the connection between the first host and the first uplink port connector.
17. The operating method of claim 12, wherein the USB hub device further includes a plurality of video input port connectors and video output port connectors, the video output port connectors of the USB hub device being used to couple to a display, the video input port connectors of the USB hub device being used to couple to video output ports of different hosts, the video output port of the first host being coupled to a first video input port connector of the video input port connectors, the video output port of the second host being coupled to a second video input port connector of the video input port connectors, the operating method further comprising: In response to the establishment of a connection between the first host and the first uplink port connector, the USB hub device selectively couples the first video input port connector of the USB hub device to the video output port connector of the USB hub device. as well as In response to the establishment of a connection between the second host and the second uplink port connector, the USB hub device selectively couples the second video input port connector of the USB hub device to the video output port connector of the USB hub device.
18. The operating method as described in claim 12, further comprising: In response to the first host issuing the first switching command to the hub controller of the USB hub device through the multiplexer circuit of the USB hub device, the hub controller controls the multiplexer circuit based on the first switching command to disconnect the connection between the first host and the hub controller, and the hub controller controls the multiplexer circuit to attempt to establish a connection with the second host through the second uplink port connector, wherein the multiple USB selection ports of the multiplexer circuit are coupled to the uplink port connector in pairs, the uplink port of the hub controller is coupled to the USB common port of the multiplexer circuit, and the multiple downlink ports of the hub controller are coupled to the downlink port connector in pairs; The hub controller controls the multiplexer circuit to selectively couple one of the uplink port connectors to the uplink port of the hub controller; In response to the successful establishment of the connection to the second host, the hub controller is controlled by the second host that established the connection; as well as In response to the failure to establish a connection with the second host, the hub controller controls the multiplexer circuit to restore the connection between the first host and the hub controller.
19. The operating method of claim 18, wherein the USB hub device further includes a plurality of video input port connectors and a video output port connector, and the operating method further includes: In response to the establishment of a connection between the first host and the hub controller, the hub controller controls the multiplexer circuit to selectively couple a first video input port connector of the video input port connectors to a video output port connector, wherein the video input port connectors are used to couple video output ports of different hosts, the video input port connectors are coupled in pairs to a plurality of video selection ports of the multiplexer circuit, the video output port of the first host is coupled to the first video input port connector, the video output port of the second host is coupled to the second video input port connector of the video input port connectors, the video output port connectors are used to couple to a display, and the video output port connectors are coupled to a common video port of the multiplexer circuit; as well as In response to the establishment of a connection between the second host and the hub controller, the hub controller controls the multiplexer circuit to selectively couple the second video input port connector to the video output port connector.
20. The operating method as described in claim 12, further comprising: The first host monitors the operation information of the human interface device coupled to one of the downlink port connectors via the USB hub device; In response to the operation information of the human interface device indicating that the operation event of the human interface device meets the condition, the first host sends an inquiry command to the USB hub device to know the connection status of the downstream port connector of the USB hub device. as well as Based on the connection status of the downstream port connector of the USB hub device, the first host determines whether to issue the first switching command to the USB hub device.
21. The operating method as described in claim 20, further comprising: In response to the connection status of the downstream port connector indicating that each non-human interface device is not connected to the downstream port connector of the USB hub device, the first host issues the first switching command to the USB hub device. In response to the connection status of the downstream port connector indicating that any non-human interface device is connected to the downstream port connector of the USB hub device, the first host issues a warning to the user; as well as After the warning is issued to the user, in response to the fact that the human interface device operation event still meets the condition, the first host sends the first switching command to the USB hub device.
22. The operating method as described in claim 12, further comprising: When a connection is established between the second host and the second uplink port connector, in response to the second host determining that the human interface device operation event meets the condition, the second host selectively issues a second switching command to the USB hub device. as well as Based on the second switching command issued by the second host, the USB hub device disconnects the connection to the second host and establishes a connection to the third host, wherein the third host is coupled to the third uplink port connector in the uplink port connector of the USB hub device.
23. A USB hub device, comprising: Multiple uplink port connectors, wherein the uplink port connectors are used to couple different hosts; Multiple downstream port connectors, each of which is used to couple a human interface device, a USB device, or another USB hub device; A multiplexer circuit, wherein a plurality of USB selection ports of the multiplexer circuit are coupled in pairs to the upstream port connector; as well as A hub controller, wherein an uplink port of the hub controller is coupled to a USB common port of the multiplexer circuit, and a plurality of downlink ports of the hub controller are coupled in pairs to the downlink port connectors, the hub controller controlling the multiplexer circuit to selectively couple one of the uplink port connectors to the uplink port of the hub controller. In response to a first host coupled to a first uplink port connector in the uplink port connector, the hub controller sends a first switching command to the hub controller via the multiplexer circuit. Based on the first switching command, the hub controller controls the multiplexer circuit to disconnect the connection between the first host and the hub controller. The hub controller also controls the multiplexer circuit to attempt to establish a connection to a second host via a second uplink port connector in the uplink port connector. In response to the successful establishment of the connection to the second host, the hub controller is controlled by the second host that established the connection; as well as In response to the failure to establish a connection with the second host, the hub controller controls the multiplexer circuit to restore the connection between the first host and the hub controller.
24. The USB hub device of claim 23, wherein... Once a connection to the first host is established, the hub controller provides operational information of the human interface device coupled to one of the downstream port connectors to the first host via the multiplexer circuitry; and In response to a user performing a specified operation on the human interface device, the first host selectively determines to issue the first switching command to the hub controller based on the operation information provided by the hub controller.
25. The USB hub device of claim 24, wherein the specified operation includes a specific operation mode of at least one hotkey of a mouse or keyboard.
26. The USB hub device of claim 23, further comprising: Multiple video input port connectors for coupling video output ports of different hosts, wherein the video input port connectors are coupled in pairs to multiple video selection ports of the multiplexer circuit, the video output port of the first host is coupled to the first video input port connector of the video input port connectors, and the video output port of the second host is coupled to the second video input port connector of the video input port connectors; as well as A video output port connector for coupling to a display, wherein the video output port connector is coupled to the common video port of the multiplexer circuit. In response to the establishment of a connection between the first host and the hub controller, the hub controller controls the multiplexer circuit to selectively couple the first video input port connector to the video output port connector. as well as In response to the establishment of a connection between the second host and the hub controller, the hub controller controls the multiplexer circuit to selectively couple the second video input port connector to the video output port connector.
27. The USB hub device of claim 23, wherein, When a connection is established between the second host and the second uplink port connector, the hub controller provides the second host with the operation information of the human interface device coupled to one of the downlink port connectors via the multiplexer circuit. In response to a user performing a specified operation on the human interface device, the second host selectively determines to issue a second switching command to the hub controller based on the operation information provided by the hub controller. as well as Based on the second switching command issued by the second host, the hub controller controls the multiplexer circuit to disconnect the connection to the second host and establish a connection to the third host, wherein the third host is coupled to the third uplink port connector in the uplink port connector of the USB hub device.
28. A method of operating a USB hub device, comprising: The hub controller of the USB hub device controls the multiplexer circuit of the USB hub device to selectively couple one of the multiple upstream port connectors of the USB hub device to an upstream port of the hub controller, wherein the upstream port connector is used to couple to different hosts, each of the multiple downstream port connectors of the USB hub device is used to couple to a human interface device, a USB device or another USB hub device, the multiple USB selection ports of the multiplexer circuit are coupled to the upstream port connector in pairs, the upstream port of the hub controller is coupled to the USB common port of the multiplexer circuit, and the multiple downstream ports of the hub controller are coupled to the downstream port connector in pairs. In response to a first host coupled to a first uplink port connector in the uplink port connector, the multiplexer circuit sends a first switching command to the hub controller, which controls the multiplexer circuit based on the first switching command to disconnect the connection between the first host and the hub controller, and the hub controller controls the multiplexer circuit to attempt to establish a connection to a second host through a second uplink port connector in the uplink port connector; In response to the successful establishment of the connection to the second host, the hub controller is controlled by the second host that established the connection; as well as In response to the failure to establish a connection with the second host, the hub controller controls the multiplexer circuit to restore the connection between the first host and the hub controller.
29. The operating method as described in claim 28, further comprising: Once a connection to the first host is established, the hub controller provides the first host with operational information of the human interface device coupled to one of the downlink port connectors via the multiplexer circuit. In response to a user performing a specified operation on the human interface device, the first host selectively determines to issue the first switching command to the hub controller based on the operation information provided by the hub controller.
30. The operation method of claim 29, wherein the specified operation includes a specific operation mode of at least one hotkey of a mouse or keyboard.
31. The operating method of claim 28, wherein the USB hub device further comprises a plurality of video input port connectors and video output port connectors, the video input port connectors being used to couple video output ports of different hosts, the video input port connectors being coupled in pairs to a plurality of video selection ports of the multiplexer circuit, the video output port of the first host being coupled to a first video input port connector of the video input port connectors, the video output port of the second host being coupled to a second video input port connector of the video input port connectors, the video output port connector being used to couple to a display, the video output port connector being coupled to a common video port of the multiplexer circuit, and the operating method further comprising: In response to the establishment of a connection between the first host and the hub controller, the hub controller controls the multiplexer circuit to selectively couple the first video input port connector to the video output port connector. as well as In response to the establishment of a connection between the second host and the hub controller, the hub controller controls the multiplexer circuit to selectively couple the second video input port connector to the video output port connector.
32. The operating method as described in claim 28, further comprising: When a connection is established between the second host and the second uplink port connector, the hub controller provides the second host with the operation information of the human interface device coupled to one of the downlink port connectors via the multiplexer circuit. In response to a user performing a specified operation on the human interface device, the second host selectively determines to issue a second switching command to the hub controller based on the operation information provided by the hub controller. as well as Based on the second switching command issued by the second host, the hub controller controls the multiplexer circuit to disconnect the connection to the second host and establish a connection to the third host, wherein the third host is coupled to the third uplink port connector in the uplink port connector of the USB hub device.