A system and method for switching a USB device connection to a host

CN116594945BActive Publication Date: 2026-09-22PTN ELECTRONICS LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310633269.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2026-09-22
Estimated Expiration
2043-05-31

AI Technical Summary

Technical Problem

[0003]现有的USB设备切换器虽然可以通过按键开关或虚拟软件点击达到多台USB主机共享一个USB设备,但是并不能适用于多主机与多USB设备同时共享的情况,并且在远程连接场景下,无法实现USB设备与主机之间连接切换的便捷性

Benefits of technology

[0015]根据本发明的方案,通过检测USB设备与主机之间的连接通道是否断开或者接收USB设备的连接切换请求,可以通过切换连接通道的方式实现多个USB设备与多个主机的连接切换操作,能够避免频繁插拔USB接口,并且可以适用于远程高速传输速率达10Gbps的USB设备的连接切换控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116594945B_ABST
    Figure CN116594945B_ABST
Patent Text Reader

Abstract

The application discloses a USB device and host connection switching system, and belongs to the technical field of communication equipment. The system comprises at least one USB device, at least one host and a switching device. The switching device comprises a multi-channel, a detection module and a control module. The multi-channel comprises at least a first channel and a second channel. The at least one USB device is connected with the first host through the first channel. The switching device is used for detecting whether the first channel is disconnected through the detection module. When the first channel is detected to be disconnected, the at least one USB device is connected with the second host through the second channel by the control module. The scheme can realize the switching connection control of the USB device without plugging the USB interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication equipment technology, and specifically to a connection switching system and method for a USB device and a host. Background Technology

[0002] USB devices connect to a computer host via an interface, and the host transmits data to the device by installing a USB device driver. Due to the limitations of the USB protocol, communication between the host and the USB device can only be one-to-one. Switching the connection between the device and the host requires manual plugging and unplugging. However, for long-distance transmission or when multiple host devices are working simultaneously, the switching workload is significant and inconvenient, and frequent plugging and unplugging significantly reduces the lifespan of the USB device. Therefore, remote device connection switching control without plugging and unplugging the interface is essential for USB communication applications.

[0003] While existing USB device switches can enable multiple USB hosts to share a single USB device via a button switch or virtual software click, they are not suitable for situations where multiple hosts and multiple USB devices share the same device simultaneously. Furthermore, in remote connection scenarios, they cannot provide convenient switching between USB devices and hosts.

[0004] Therefore, a method for switching the connection between a USB device and a host is needed to avoid the frequent plugging and unplugging of the USB interface to switch connections, and to enable real-time switching of high-bandwidth USB devices. Summary of the Invention

[0005] In view of the above problems, this solution proposes a method for switching the connection between a USB device and a host, which can realize the real-time follow-up switching of the connection of a high-bandwidth USB device by switching the transmission channel when the connection between the USB device and the host is detected to be disconnected.

[0006] According to a first aspect of the present invention, a USB device-to-host connection switching system is provided, comprising at least one USB device, at least one host, and a switching device. The switching device includes a multiplexer, a detection module, and a control module. The multiplexer includes at least a first channel and a second channel. At least one USB device is connected to a first host via the first channel. The switching device is used to detect whether the first channel is disconnected via the detection module. When the first channel is detected to be disconnected, the control module controls at least one USB device to connect to a second host via the second channel.

[0007] With the above solution, when switching between multiple USB devices and the host, there is no need to repeatedly plug and unplug the USB interface. The connection between multiple USB devices and the host can be switched directly by switching the connection channel.

[0008] Optionally, in the above system, the switching device is further configured to receive a connection switching request from a USB device and control the USB device to connect to a preset host through a preset channel according to the connection switching request, wherein the connection switching request includes USB device information and preset host information.

[0009] Optionally, in the above system, the USB device is based on any one of the communication protocols USB 2.0, USB 3.0, and USB 3.1.

[0010] According to a second aspect of the present invention, a method for switching the connection between a USB device and a host is provided, suitable for execution in the aforementioned switching device, comprising: detecting whether a first channel connection between the USB device and a first host is disconnected; when the first channel connection is detected to be disconnected, acquiring driver information of the USB device; switching the first channel to a second channel; and controlling the USB device to connect to a second host through the second channel according to the driver information of the USB device.

[0011] Optionally, in the above method, it is detected whether the power supply terminal of the USB device interface is at a high level. When the power supply terminal of the interface is at a high level, it is determined that the USB device is connected to the first host. When the power supply terminal of the interface is detected to be at a low level, it is determined that the USB device is disconnected from the first host.

[0012] Optionally, in the above method, a connection switching request from a USB device is received, and the USB device is controlled to connect to a preset host through a preset channel according to the connection switching request, wherein the connection switching request includes USB device information and preset host information.

[0013] Optionally, in the above method, the driver information of the USB device can be obtained and sent to a preset host; the preset host connects to the USB device through a preset channel based on the driver information.

[0014] Optionally, in the above method, the driver information of the USB device includes at least the USB device identifier, driver path, transfer type, and transfer direction.

[0015] According to the present invention, by detecting whether the connection channel between the USB device and the host is disconnected or receiving a connection switching request from the USB device, the connection switching operation between multiple USB devices and multiple hosts can be realized by switching the connection channel. This avoids frequent plugging and unplugging of USB interfaces and is applicable to the connection switching control of USB devices with remote high-speed transmission rates up to 10Gbps.

[0016] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A schematic diagram of a USB device-host connection switching system according to an embodiment of the present invention is shown; Figure 2 A schematic diagram illustrating the connection between a USB device and a host via a switching device according to an embodiment of the present invention is shown; Figure 3 A flowchart illustrating a USB device-host connection switching method 300 according to an embodiment of the present invention is shown. Detailed Implementation

[0018] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0019] According to the USB protocol specification, USB is a one-to-one communication method between a host and a device. If a host wants to share multiple USB devices, a hub can solve this problem. However, if multiple hosts want to share a single USB device or multiple hosts want to share multiple USB devices, it is generally necessary to manually unplug the USB device from one host port and plug it into another host port. This is time-consuming and laborious, and repeated plugging and unplugging can cause physical wear and tear, electrostatic damage, and other problems, thereby reducing the lifespan of the USB device.

[0020] To avoid frequent plugging and unplugging of USB interfaces when switching between multiple USB devices and multiple hosts, this solution provides a USB device-host connection switching system and method. By switching the connection channel between the USB device and the host, the communication connection between the device and the host can be switched, avoiding frequent plugging and unplugging of device interfaces and helping to extend the service life of communication equipment.

[0021] The USB device-to-host connection switching system provided by this invention includes at least one USB device, at least one host, and a switching device. The at least one USB device is connected to at least one host via the switching device.

[0022] The switching device includes a multi-channel, a detection module, and a control module. In one embodiment of the invention, the multi-channel includes at least a first channel and a second channel. It should be noted that the number of connected channels within the multi-channel configuration can be set according to the number of USB devices that need to be connected; this solution does not limit this.

[0023] Initially, at least one USB device can connect to the first host via the first channel. The switching device can detect whether the first channel is disconnected via a detection module. When a disconnection is detected, the control module controls at least one USB device to connect to the second host via the second channel. Thus, if a USB device loses its connection to the host due to a disconnection of a certain channel, the communication connection between the USB device and the host can be maintained directly by switching the connection channel, without needing to unplug and replug the USB device to re-establish the communication connection.

[0024] Figure 1 A schematic diagram of a USB device-host connection switching system structure according to an embodiment of the present invention is shown. Figure 1 As shown, the communication device consists of multiple USB devices (USB device 1, USB device 2, USB device 3... USB device n), which are connected to the host device (host 1, host 2... host m) via a switching device. It should be noted that... Figure 1 The number of USB devices and hosts shown are merely examples and can be set according to actual needs; this solution does not limit this.

[0025] USB devices can be any device with a USB interface, such as a mouse, keyboard, camera, scanner, voice input device, touchpad, etc. The host is a computing device with a communication interface, such as a computer or mobile terminal. It should be noted that the USB device is based on any of the communication protocols: USB 2.0, USB 3.0, or USB 3.1. The data transfer rate of the multiple channels in the switching device can reach at least 10Gbps, the level of USB 3.1 Gen2, and is compatible with both USB 3.0 and USB 2.0 products.

[0026] Figure 2 A schematic diagram illustrating the connection between a USB device and a host via a switching device according to an embodiment of the present invention is shown. Figure 2As shown, USB device 1 can be based on the USB 2.0 protocol, USB device 2 and USB device 3 can be based on the USB-A 3.1 protocol, and USB device 4 is based on the USB-C 3.1 protocol. USB-A or USB-B are unidirectional transmissions, while USB-C can perform bidirectional transmissions, so the maximum transmission rate of USB devices can reach 10Gbps.

[0027] The switching device includes at least a first channel and a second channel. USB devices 1-4 can simultaneously connect to the first host through the first channel. When the switching device detects the connection of multiple USB devices, it can send the driver information of these devices to the first host via the first channel, allowing the first host to establish connections with the multiple USB devices based on the received driver information. The driver information is a set of general information describing the USB device, including the USB device identifier, supported device classes and subclasses, applicable protocols, driver path, maximum transfer rate, transfer type, and transfer direction.

[0028] When one or more USB devices need to switch their connection to a host, that is, to switch from a connection to a first host to a connection to a second host, the switching device can receive the connection switching request from the USB device and control the USB device to connect to a preset host through a preset channel according to the connection switching request. The connection switching request includes USB device information and preset host information.

[0029] Switching the connected host can be done automatically or manually. When switching to the currently selected host manually via a button or command, the switching device can switch the output channel of the USB device from the current channel to the channel corresponding to the selected host.

[0030] When the first channel is detected to be disconnected, the switching device can send the driver information of the USB device connected to the host through the first channel to the second host through the second channel, so that the second host can establish a communication connection with the USB device through the second channel.

[0031] Figure 3 A flowchart illustrating a USB device-host connection switching method 300 according to an embodiment of the present invention is shown. Figure 3 As shown, the method 300 can be executed in the switching device described above. The method begins with step S310, which detects whether the first channel connection between the USB device and the first host is disconnected. When the first channel connection is detected to be disconnected, the driver information of the USB device is obtained.

[0032] In embodiments of the present invention, the USB device is a USB device based on USB 2.0, USB 3.0, USB 3.1 gen1, or USB 3.1 gen2. The logical organization of a USB device includes four layers: device, configuration, interface, and endpoint. Among them, the endpoint is the most basic form of USB communication. The host can only communicate with the device through the endpoint. Each endpoint has a unique address, and different channels can be created based on the endpoint address, transmission method, and transmission direction to establish a connection with the host.

[0033] According to one embodiment of the present invention, it is possible to detect whether the power supply terminal of the USB device interface is at a high level. When the power supply terminal of the interface is at a high level, it is determined that the USB device is connected to the first host. When the power supply terminal of the interface is detected to be at a low level, it is determined that the USB device is disconnected from the first host.

[0034] Then, step S320 is executed, switching the first channel to the second channel, and controlling the USB device to connect to the second host through the second channel according to the USB device's driver information.

[0035] When a disconnection is detected between a USB device and the host, the driver information of the disconnected USB device can be obtained and sent to the corresponding host through any of the other channels in the multiplexing process, such as the second channel. The host can then re-establish the connection with the USB device based on the driver information.

[0036] In one embodiment of the present invention, a connection switching request from a USB device can also be received, and the USB device can be controlled to connect to a preset host through a preset channel according to the connection switching request. The connection switching request includes USB device information and preset host information.

[0037] Specifically, first, the driver information of the USB device is obtained and sent to the preset host. This driver information includes at least the USB device identifier, driver path, transfer type, and transfer direction. The preset host then connects to the USB device via a preset channel based on the driver information.

[0038] The operation of switching the connected host can be manual or automatic. When switching the connected host by manually connecting the switch button or switching command, the switching device can control the USB device that sends the switching request to connect to the host that needs to be switched through a preset channel according to the switching command.

[0039] By detecting whether the connection channel between the USB device and the host is disconnected or receiving a connection switching request from the USB device, the connection switching operation between multiple USB devices and multiple hosts can be realized by switching the connection channel. This avoids frequent plugging and unplugging of USB interfaces and is applicable to the connection switching control of USB devices with remote high-speed transmission rates up to 10Gbps.

[0040] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be an optical disc, read-only memory (ROM), or random access memory (RAM), etc.

[0041] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0042] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various aspects of the invention, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0043] Those skilled in the art will understand that modules, units, or components of the devices disclosed in the examples herein can be arranged in the devices described in this embodiment, or alternatively, can be located in one or more devices different from the devices in this example. The modules in the foregoing examples can be combined into a single module or, in addition, can be divided into multiple sub-modules.

[0044] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0045] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0046] Furthermore, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other means of performing functions. Therefore, a processor having the necessary instructions for implementing a method or method element forms means for implementing that method or method element. Furthermore, the elements described herein in the apparatus embodiments are examples of means for implementing functions performed by elements for the purposes of carrying out the invention.

[0047] As used herein, unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.

[0048] Although the invention has been described with respect to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and edibility purposes, and not for the purpose of interpreting or limiting the subject matter of the invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the invention is illustrative rather than restrictive, and the scope of the invention is defined by the appended claims.

Claims

1. A connection switching system between a USB device and a host, characterized in that, The system includes at least one USB device, at least two hosts, and a switching device. The switching device includes a multi-channel, a detection module, and a control module. The multi-channel includes at least a first channel and a second channel. The at least one USB device is connected to a first host through the first channel. The switching device is used to detect whether the first channel is disconnected through the detection module. Specifically, the detection module is used to: detect the power supply level of the USB device interface; when the power supply is high, determine that the USB device is connected to the first host; when the power supply is low, determine that the USB device is disconnected from the first host. When the first channel is detected to be disconnected, the control module controls the at least one USB device to connect to the second host through the second channel; and obtains the driver information of the USB device, and sends the driver information to the second host through the second channel, so that the second host can establish a connection with the USB device based on the driver information.

2. The connection switching system according to claim 1, characterized in that, The switching device is also used to receive a connection switching request from a USB device, and control the USB device to connect to a preset host through a preset channel according to the connection switching request, wherein the connection switching request includes USB device information and preset host information.

3. The connection switching system according to claim 1, characterized in that, The USB device is based on any one of the communication protocols USB 2.0, USB 3.0, and USB 3.

1.

4. A method for switching the connection between a USB device and a host, suitable for execution in the connection switching system as described in any one of claims 1-3, characterized in that, include: Detecting whether the first channel connection between the USB device and the first host is disconnected specifically includes: detecting whether the power supply terminal of the USB device interface is at a high level; when the power supply terminal of the interface is at a high level, it is determined that the USB device is connected to the first host; when the power supply terminal of the interface is detected to be at a low level, it is determined that the USB device is disconnected from the first host. When the first channel connection is detected to be disconnected, the driver information of the USB device is obtained, the first channel is switched to the second channel, the driver information of the USB device is sent to the second host through the second channel, and the USB device is controlled to connect to the second host through the second channel.

5. A method for switching the connection between a USB device and a host, suitable for execution in the connection switching system as described in claim 2, characterized in that, include: Receive a connection switching request from a USB device, and control the USB device to connect to a preset host through a preset channel according to the connection switching request, wherein the connection switching request includes USB device information and preset host information; The step of controlling the USB device to connect to a preset host through a preset channel according to the connection switching request includes: obtaining the driver information of the USB device and sending the driver information to the preset host; the preset host connecting to the USB device through the preset channel based on the driver information.

6. The connection switching method according to claim 5, characterized in that, The driver information of the USB device includes at least the USB device identifier, driver path, transmission type, and transmission direction.

Citation Information

Patent Citations

  • Method and device for controlling USB channel switching

    CN112181880A