Universal serial bus controller
By retrieving, modifying the USB descriptor in the USB controller and generating a virtual USB device, the problem of requiring additional software drivers to support the MA-USB protocol in the prior art is solved, and communication with multiple USB devices is achieved without the need for an additional driver. Function.
Patent Information
- Application Number
- CN202411083601.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-10
- Filing Date
- 2024-08-08
- Publication Date
- 2025-02-18
AI Technical Summary
When existing USB host devices communicate with multiple USB devices, additional software drivers are required to support the Media Agnostic USB Protocol (MA-USB) that are not pre-installed in many operating systems, resulting in the user requiring additional Configuration and installation process.
By implementing a method in a USB controller, it is possible to retrieve descriptors from a coupled multiple USB devices, modify the descriptors, and generate a virtual USB device based on the modified descriptors. The USB controller includes a processing system and memory for executing instructions for retrieving, modifying, and generating a virtual USB device.
This method allows the computing device to communicate directly with multiple USB devices through the USB controller without installing an additional MA-USB software driver, simplifying the user configuration process and improving communication efficiency.
Smart Images

Figure CN119473961A_ABST
Abstract
Description
Technical Field
[0001] The present embodiments relate generally to a Universal Serial Bus ("USB") controller, and in particular to a USB controller for managing and virtually operating one or more USB devices coupled to the USB controller. Background Art
[0002] USB refers to technical standards such as USB 1.0-4.0, which specify protocols and physical interfaces for connecting various computing devices. As used herein, the term "USB hardware" refers to any physical communication medium (e.g., a wired or wireless interface, port, cable, or connector) that conforms to one or more of the USB technical standards. USB can be used to connect one or more peripheral devices (e.g., a mouse or keyboard) to a computing device (e.g., a personal computer ("PC")) using a hierarchical star topology. Figure 1 An example hierarchical star topology 100 is shown, which may include up to seven layers (e.g., layers 1-7) of devices (e.g., a computing device and one or more peripheral devices and / or hubs) connected using USB hardware. Figure 1 As shown in FIG. 1 , topology 100 may include computing device A in layer 1, peripheral devices AI in layers 3-5 and 7, and hub AG in layers 2-6. Computing device A may include a root hub that connects one or more devices in layer 2 to computing device A. For simplicity, only one device (hub A) is shown in layer 2 of topology 100. Figure 1 As shown in , each of the hubs AG can be used to couple one or more devices to the computing device A, for example, via a daisy chain. Note that devices residing in a given layer (e.g., layer 4) are referred to as "downstream" of devices in a higher layer (e.g., layer 3) and "upstream" of devices in a lower layer (e.g., layer 5).
[0003] Computing device A operates as a "USB host device", which is a device that manages USB transactions (such as data exchanges) between the USB host device and one or more peripheral devices (e.g., peripheral device AI) and / or hubs (e.g., hub AG) that are coupled to the USB host device using USB hardware. The USB host device may also supply power to the one or more peripheral devices and / or hubs and / or initiate all communications with the one or more peripheral devices and / or hubs.
[0004] Peripheral device AI and hub AG operate as "USB devices", which are devices that can be connected to a host device (e.g., computing device A) using USB hardware. However, in topology 100, one or more of peripheral device AI and hub AG can operate not only as USB devices but also as USB host devices (also referred to herein as "dual role devices"). For example, as a dual role device, hub F in layer 6 can operate as a USB device coupled to computing device A in layer 1, and as a USB host device configured to manage USB transactions between hub F and peripheral devices G and H in layer 7.
[0005] Each USB device is configured to perform one or more functions (or capabilities). For example, a USB device that is a printer is configured to perform the function of printing. In the case where a USB device is configured to perform more than one function, the USB device may be referred to as a "composite USB device". For example, a USB device that includes both a keyboard and a touchpad is a composite USB device because the USB device is configured to perform multiple functions, including, for example, (i) receiving user input via a depressed button on the keyboard and (ii) receiving user input via detecting a finger or stylus in contact with the touchpad. Each USB device includes at least one "class code" that identifies the functionality of the USB device. For example, a USB device that is a microphone may include a class code of 01h. When a USB device (microphone) is connected to a USB host device, the USB host device may begin enumerating the USB device. During enumeration, the USB host device may, for example, detect the USB device and retrieve a class code of 01h from the USB device. The USB host device may also determine that the USB device is a microphone based on the class code 01h. In addition, the USB host device may use the class code 01h to identify and load a device driver (e.g., a standard device driver) from the operating system of the USB host device, wherein the device driver enables the USB host device to operate the USB device.
[0006] Some USB host devices use a media agnostic USB protocol (also referred to herein as "MA-USB") to communicate with one or more USB devices. MA-USB is compatible with USB 2.0, 3.0, and 3.1 standards, and enables both wireless and wired communications between a USB host device and one or more USB devices. Devices that support MA-USB (e.g., devices configured to communicate using MA-USB) may be referred to herein as "MA-USB devices." However, in order for a USB host device to communicate with one or more USB devices using MA-USB, a software ("SW") driver that facilitates MA-USB must be installed on the USB host device. Such drivers are not pre-installed on or included in the operating systems of many existing USB host devices. Summary of the invention
[0007] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter.
[0008] One innovative aspect of the subject matter of the present disclosure can be implemented in a method performed by a USB controller. The method may include retrieving a plurality of descriptors from a plurality of USB devices coupled to the USB controller. Each USB device in the plurality of USB devices may be associated with at least one of the plurality of descriptors. The method may also include: modifying at least one of the plurality of descriptors; and generating a first virtual USB device based at least in part on modifying the at least one descriptor. The method may also include outputting a first address associated with the first virtual USB device to a computing device.
[0009] Another innovative aspect of the subject matter of the present disclosure can be implemented in a USB controller that includes a processing system and a memory. The memory may store instructions that, when executed by the processing system, cause the USB controller to retrieve a plurality of descriptors from a plurality of USB devices coupled to the USB controller. Each of the plurality of USB devices may be associated with at least one of the plurality of descriptors. Execution of the instructions may further cause the USB controller to: modify at least one of the plurality of descriptors; and generate a first virtual USB device based at least in part on modifying the at least one descriptor. In addition, execution of the instructions may cause the USB controller to output a first address associated with the first virtual USB device to a computing device.
[0010] Another innovative aspect of the subject matter of the present disclosure can be implemented in a system that includes a computing device, a plurality of USB devices, and a USB controller. The USB controller can be coupled to the computing device and the plurality of USB devices. The USB controller can be configured to retrieve a plurality of descriptors from the plurality of USB devices. Each USB device in the plurality of USB devices can be associated with at least one of the plurality of descriptors. The USB controller can be further configured to: modify at least one of the plurality of descriptors; and generate a first virtual USB device based at least in part on modifying the at least one descriptor. The USB controller can also be configured to output a first address associated with the first virtual USB device to the computing device. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The present embodiments are illustrated by way of example and are not intended to be limited by the figures of the accompanying drawings.
[0012] Figure 1 An example hierarchical star topology is shown.
[0013] Figure 2A An example electronic system is shown in accordance with some embodiments.
[0014] Figure 2B An example electronic system is shown in accordance with some embodiments.
[0015] Figure 2C An example electronic system is shown in accordance with some embodiments.
[0016] Figure 3A An example descriptor set associated with a USB device is shown in accordance with some embodiments.
[0017] Figure 3B An example descriptor set associated with a USB human interface device is shown in accordance with some embodiments.
[0018] Figure 4A Example descriptors associated with a USB device are shown in accordance with some embodiments.
[0019] Figure 4B An example set of descriptors associated with a virtual USB device is shown in accordance with some embodiments.
[0020] Figure 5A Example descriptors associated with a human interface device are shown in accordance with some embodiments.
[0021] Figure 5B An example set of descriptors associated with a virtual USB device is shown in accordance with some embodiments.
[0022] Figure 6 An example electronic system is shown in accordance with some embodiments.
[0023] Figure 7 A block diagram of an example system is shown in accordance with some embodiments.
[0024] Figure 8 An illustrative flow diagram of example operations 800 is shown in accordance with some embodiments. DETAILED DESCRIPTION
[0025] In the following description, many specific details (such as examples of specific components, circuits, and processes) are set forth to provide a thorough understanding of the present disclosure. As used herein, the term "coupled" means directly connected to or connected through one or more intermediate components or circuits. The terms "electronic system" and "electronic device" can be used interchangeably to refer to any system capable of electronically processing information. Moreover, in the following description, and for the purpose of explanation, specific terms are set forth to provide a thorough understanding of aspects of the present disclosure. However, it will be apparent to those skilled in the art that these specific details may not be required to practice the exemplary embodiments. In other examples, well-known circuits and devices are shown in block diagram form to avoid obscuring the present disclosure. Some parts of the subsequent detailed description are presented in terms of procedures, logic blocks, processing, and other symbolic representations of the operation of data bits in a computer memory.
[0026] These descriptions and representations are the means by which the technical personnel in the field of data processing are used to most effectively convey the essence of their work to other technical personnel in the field. In the present disclosure, procedures, logic blocks, processes, etc. are considered to be the self-consistent sequences of steps or instructions that lead to a desired result. The steps are those steps that require the physical manipulation of physical quantities. Usually, although not necessarily, these quantities take the form of electrical or magnetic signals that can be stored, transferred, combined, compared, and otherwise manipulated in a computer system. However, it should be remembered that all terms in these and similar terms are associated with appropriate physical quantities and are merely convenient markers applied to these quantities.
[0027] Unless otherwise specifically stated, as will be apparent from the following discussion, it is appreciated that throughout this application, discussions utilizing terms such as “access,” “receive,” “send,” “use,” “select,” “determine,” “normalize,” “multiply,” “average,” “monitor,” “compare,” “apply,” “update,” “measure,” “derive,” etc., refer to some actions and processes of a computer system or similar electronic computing device that manipulate and transform data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission, or display devices.
[0028] In the accompanying drawings, a single block may be described as performing one or more functions; however, in actual practice, one or more functions performed by the block may be performed in a single component or across multiple components, and / or may be performed using hardware, using software, or using a combination of hardware and software. In order to clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described below generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. Moreover, the example input device may include components other than those shown, including well-known components such as processors, memories, etc.
[0029] The techniques described herein may be implemented in hardware, software, firmware, or any combination thereof, unless specifically described as being implemented in a specific manner. Any features described as modules or components may also be implemented together in an integrated logic device or separately as discrete but interoperable logic devices. If implemented in software, the techniques may be implemented at least in part by a non-transitory processor-readable storage medium that includes instructions that, when executed, perform one or more of the methods described above. The non-transitory processor-readable data storage medium may form part of a computer program product, which may include packaging materials.
[0030] Non-transitory processor-readable storage media may include random access memory (RAM) such as synchronous dynamic random access memory (SDRAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory, other known storage media, etc. The technology may additionally or alternatively be at least partially implemented by a processor-readable communication medium that carries or communicates code in the form of instructions or data structures and can be accessed, read, and / or executed by a computer or other processor.
[0031] The various illustrative logical blocks, modules, circuits, and instructions described in conjunction with the embodiments disclosed herein may be executed by one or more processors (or processing systems). The term "processor" as used herein may refer to any general purpose processor, special purpose processor, conventional processor, controller, microcontroller, and / or state machine capable of executing scripts or instructions of one or more software programs stored in memory.
[0032] Aspects of the present disclosure provide methods and systems for operating a USB controller. As used herein, the term "USB controller" refers to any controller configured to manage and virtually operate one or more USB devices coupled to the USB controller. In some aspects, the USB controller can be an electronic device, such as a dongle or a thin client. In addition, the USB controller can operate as a USB host device and a USB device (e.g., as a dual-role device). The USB controller may include a driver that supports MA-USB.
[0033] In some embodiments, a USB controller may retrieve a plurality of descriptors from a plurality of USB devices (e.g., a mouse and a touch screen display) coupled to the USB controller via one or more wired or wireless communication channels. Each of the plurality of descriptors is a data structure including information about a corresponding one of the plurality of USB devices. In some aspects, the USB controller may retrieve the plurality of descriptors by enumerating each of the plurality of USB devices. In some embodiments, the USB controller may modify (e.g., renumber) at least one of the plurality of descriptors, and may generate a virtual USB device based at least in part on modifying the at least one descriptor. In some aspects, the virtual USB device may represent a composite USB device including each of the plurality of USB devices. In some embodiments, the USB controller may output an address associated with the virtual USB device to a computing device (e.g., a laptop or PC) operating as a USB host device.
[0034] When a computing device operates as a USB host device and is directly connected to a hub to which multiple USB devices are attached, the computing device typically enumerates the hub and each of the multiple USB devices. However, when the computing device is directly connected to a USB controller to which the multiple USB devices are attached (rather than to a hub), the computing device only enumerates the USB controller. Because enumerating only the USB controller is faster than enumerating both the hub and each of the multiple USB devices, aspects of the present disclosure can shorten the time required for the computing device to begin managing transactions between the computing device and the multiple USB devices (via the USB controller).
[0035] Furthermore, in order for a computing device to communicate with multiple USB devices via a hub using MA-USB, additional software (such as a driver that supports MA-USB) must first be installed on the computing device. In the present implementation, where the computing device is directly connected to a USB controller that (i) includes a driver that supports MA-USB and (ii) uses MA-USB to couple to and communicate with multiple USB devices, the computing device can communicate with multiple USB devices (via the USB controller) without installing any additional software.
[0036] Figure 2A An example electronic system 200A is shown according to some embodiments. System 200A may include a computing device 210A, a USB controller 220A, and one or more USB devices 230A (also referred to herein as "USB devices 230A"). In some embodiments, computing device 210A may be a laptop, PC, desktop computer, tablet computer, or other electronic device. Figure 2A As shown in , computing device 210A can be coupled to USB controller 220A via wired connection 202A (also referred to herein as "connection 202A"). In some aspects, computing device 210A can operate as a USB host device that is configured to supply power to USB controller 220A through connection 202A using USB hardware and initiate all communications with USB controller 220A. In some aspects, computing device 210A belongs to (e.g., such as reference Figure 1 ) Layer 1 of the first hierarchical star topology is described.
[0037] In some embodiments, the USB controller 220A may be a dongle, a thin client, or other electronic device. In some embodiments, the USB controller 220A may operate as a USB device and a USB host device (e.g., as a dual-role device). As a USB device, the USB controller 220A may be connected to the computing device 210A via a connection 202A (e.g., a USB connection) and communicate with the computing device 210A. As a USB host device, the USB controller 220A may be configured to supply power to the USB device 230 via a wired or wireless connection 203A and initiate all communications with the USB device 230. In some embodiments, the USB controller 220A may be configured to operate the USB device 230A virtually. For example, the USB controller 220A may be configured to communicate with and / or control the USB device 230A via an abstraction. In some aspects, the USB controller 220A belongs to a different hierarchical star topology than the first hierarchical star topology (such as the reference Figure 1 ) Layer 1 of the second hierarchical star topology described.
[0038] The USB device 230A is coupled to the USB controller 220A via the connection 203A (e.g., a USB connection). The USB device 230A may represent, for example, one or more hubs and / or one or more peripheral devices (e.g., a mouse, a joystick, a keyboard, a webcam, a flash key, a microphone, a touch screen display, a printer, and / or a scanner). For example, referring to Figure 1 , at least one of the USB devices 230A must belong to layer 3 of the hierarchical star topology 100, while the remaining USB devices 230A may belong to layer 3 or lower layers (e.g., layers 4-7) of the hierarchical star topology 100. In addition, in some embodiments, one or more of the USB devices 230A may be configured to operate as a USB device and a USB host device (e.g., as a dual-role device). During operation, the USB controller 220A may receive information (e.g., one or more descriptors) from the USB device 230A. The USB controller 220A may use the received information to generate a virtual USB device 222A, which includes each USB device in the USB device 230A as an abstraction. For example, the USB controller 220A may aggregate and / or modify the received information (e.g., one or more descriptors) to generate or define a descriptor set of the virtual USB device 222A. In addition, the USB controller 220A may present the virtual USB device 222A to the computing device 210A via the connection 202A. Thus, computing device 210A may perceive each USB device in USB device 230A as a single aggregated USB device—ie, virtual USB device 222A.
[0039] Figure 2B An example electronic system 200B is shown according to some embodiments. Electronic system 200B includes computing device 210B, USB controller 220B, and USB device 230B. Computing device 210B is coupled to USB controller 220B via wired connection 202B (also referred to herein as “connection 202B”), and USB controller 220B is coupled to USB device 230B via connection 203B. In some embodiments, electronic system 200B may be Figure 2A For example, refer to the electronic system 200A. Figure 2A , computing device 210B, USB controller 220B, USB device 230B, connection 202B, and connection 203B may be examples of computing device 210A, USB controller 220A, USB device 230A, connection 202A, and connection 203A, respectively.
[0040] like Figure 2BAs shown in FIG. 1 , USB device 230B includes hubs 231B and 232B and peripheral devices 233B-235B. Peripheral devices 234B and 235B are coupled to hub 232B via wired or wireless connections 205B and 206B, respectively. Hub 232B and peripheral device 233B are coupled to hub 231B via wired or wireless connections 204B and 207B, respectively. Although Figure 2B The USB device 230B is shown to include two hubs (eg, 231B and 232B) and three peripheral devices (233B-235B), but in some other embodiments, the USB device 230B may include any number of hubs and any number of peripheral devices.
[0041] In some embodiments, one or more of USB device 230B and / or USB controller 220B may represent a media agnostic USB (MA-USB) device, which is a device configured to communicate using MA-USB. A MA-USB device may be any device configured to communicate according to the USB 2.0, 3.0, or 3.1 standards over a non-USB connection such as, for example, a Wi-Fi, WiGig, or Ethernet connection.
[0042] During operation, USB controller 220B may receive information (e.g., one or more descriptors) from each USB device in USB device 230B. USB controller 220B may use the received information to generate a virtual USB device 222B that includes each USB device in USB device 230B as an abstraction. For example, USB controller 220B may aggregate and / or modify the received information to generate (or define) a descriptor set for virtual USB device 222B. In addition, USB controller 220B may present virtual USB device 222B to computing device 210B via connection 202B. Therefore, computing device 210B may perceive each USB device in USB device 230B as a single aggregated USB device—i.e., virtual USB device 222B.
[0043] Figure 2C An example electronic system 200C is shown according to some embodiments. Electronic system 200C includes computing device 210C, USB controller 220C, network 208C, and USB device 230C. Computing device 210C is coupled to USB controller 220C via wired connection 202C (also referred to herein as “connection 202C”), and USB controller 220C is coupled to network 208C via connection 203C. In some embodiments, electronic system 200C may be respectively Figure 2A and 2B An example of any electronic system of the electronic system 200A or 200B. For example, reference Figure 2B , computing device 210C, USB controller 220C, USB device 230C, connection 202C, and connection 203C may be embodiments of computing device 210B, USB controller 220B, USB device 230B, connection 202B, and connection 203B, respectively.
[0044] The network 208C may be, for example, a local area network (LAN), a wide area network (WAN), the Internet, or a cloud network including one or more wired and / or wireless communication links. In some embodiments, the network 208C may include one or more servers. Figure 2C As shown in FIG. 2 , USB device 230C may include peripheral devices 234C and 235C that are communicatively coupled to network 208C via wired or wireless connections 209C and 210C, respectively.
[0045] During operation, USB controller 220C may receive information (e.g., one or more descriptors) from each USB device in USB device 230C via network 208C and connections 203C, 209C, and 210C. USB controller 220C may use the received information to generate a virtual USB device 222C that includes each USB device in USB device 230C as an abstraction. For example, USB controller 220C may aggregate and / or modify the received information to generate (or define) a descriptor set for virtual USB device 222C. In addition, USB controller 220C may present virtual USB device 222C to computing device 210C via connection 202C. Therefore, computing device 210C may perceive each USB device in USB device 230C as a single aggregated USB device—i.e., virtual USB device 222C.
[0046] Figure 3A An example descriptor set 300A associated with a USB device according to some embodiments is shown. The descriptor set 300A includes a device descriptor 340A, a configuration descriptor 350A, an interface descriptor 360A, and an endpoint descriptor 370A. In some aspects, each descriptor of the descriptor set 300A is a data structure having various fields that carry data (e.g., information or attributes) associated with the USB device. In addition, each descriptor of the descriptor set 300A may be included (or stored) in a USB device (e.g., Figure 2A in one of the USB devices 230A or the USB controller 220A).
[0047] like Figure 3AAs shown in , the descriptor set 300A is structured into a hierarchy, with device descriptors 340A at the highest level, configuration descriptors 350A at the second highest level, interface descriptors 360A at the third highest level, and endpoint descriptors 370A at the fourth highest level (or lowest level). In some aspects, the device descriptor 340A may include general information about the USB device, while the configuration descriptor 350A, the interface descriptor 360A, and the endpoint descriptor 370A may successively include increasingly more detailed information about the USB device.
[0048] In some aspects, device descriptor 340A carries information about the USB device as a whole. Figure 3A As shown in , the device descriptor 340A may include a "bcdUSB" field that indicates the USB standard to which the USB device complies. The device descriptor 340A may also include a "bNumConfigurations" field that indicates the total number of configurations (or configuration descriptors) associated with the USB device. Each configuration relates to one or more "interfaces" of the USB device, where an interface is a group of endpoints (e.g., buffers) in the USB device that are used to perform a function or feature. Although not shown in Figure 3A , but the device descriptor 340A may include other information (such as fields for providing a class code and size of the device descriptor 340A).
[0049] Configuration descriptor 350A carries information related to the corresponding configuration of the USB device. Figure 3A As shown in , the configuration descriptor 350A may include a "bConfigurationValue" field that identifies the corresponding configuration. The configuration descriptor 350A may also include a "bNumInterfaces" field that indicates the total number of interfaces included in the corresponding configuration. Although not shown in Figure 3A , but configuration descriptor 350A may also include other information (such as fields for providing power characteristics associated with the corresponding configuration). In some embodiments, descriptor set 300A may include more than one configuration descriptor.
[0050] Interface descriptor 360A carries information about the corresponding interface of the configuration referenced in configuration descriptor 350A. Figure 3A , the interface descriptor 360A may include a "bInterfaceNumber" field that identifies the corresponding interface (also referred to herein as an "interface number"). The interface descriptor 360A may also include a "bNumEndpoints" field that indicates the total number of endpoints (or buffers) included in the corresponding interface. In addition, the interface descriptor 360A may include a "bInterfaceNumber" field that identifies the corresponding interface (also referred to herein as an "interface number"). Figure 3A Other information shown in (such as fields for providing the class code, size of the interface descriptor 360A). In some embodiments, the descriptor set 300A may include multiple interface descriptors.
[0051] The endpoint descriptor 370A carries information about the corresponding endpoint of the interface referenced in the interface descriptor 360A. In some aspects, the endpoint can be one of up to 32 endpoints included in the USB device. In addition, the endpoint can be used by the USB device to transfer data to or receive data from the USB host device. Figure 3A As shown in , endpoint descriptor 370A may include a "bEndpointAddress" field that indicates the address of the corresponding endpoint. In some aspects, the address may include a number identifying the corresponding endpoint (also referred to herein as an "endpoint number"). In addition, the address may indicate whether the endpoint is configured to transfer data to a USB host device or receive data from a USB host device. Figure 3A As shown in , the endpoint descriptor 370A may also include a "wMaxPacketSize" field, which indicates the maximum packet size that the corresponding endpoint can transmit or receive. In addition, the endpoint descriptor 370A may include a "wMaxPacketSize" field that is not in Figure 3A , such as a field indicating the type of data transfer (eg, control, isochronous, bulk, or interrupt transfer) that the corresponding endpoint is configured to facilitate. In some embodiments, descriptor set 300A may include multiple endpoint descriptors.
[0052] During operation, when a USB host device (e.g., a USB controller) is coupled to one or more USB devices, the USB host device may enumerate each of the one or more USB devices to identify and load one or more drivers that enable the USB host device to operate the one or more USB devices. Figure 2A The USB controller 220A is coupled to a USB device (e.g., Figure 2A When a USB device 230A is detected, the USB controller may detect the USB device and retrieve a device descriptor (e.g., device descriptor 340A) from the USB device. The USB controller may use the retrieved device descriptor to determine the USB standard to which the USB device complies and the total number of configurations supported by the USB device. The USB controller may also retrieve each of the one or more configuration descriptors stored in the USB device.
[0053] In some embodiments, when the USB controller retrieves a corresponding one of the one or more configuration descriptors (e.g., configuration descriptor 350A) from the USB device, the USB controller may also retrieve one or more interface descriptors (e.g., interface descriptor 360A) and one or more endpoint descriptors (e.g., endpoint descriptor 370A) associated with the configuration referenced in the corresponding configuration descriptor from the USB device. In addition, in some embodiments, the USB controller may use and / or modify one or more of the retrieved device descriptors, configuration descriptors (one or more), interface descriptors (one or more), and endpoint descriptors (one or more) to generate a virtual USB device including the USB device as an abstraction. For example, the USB controller may aggregate, combine, and / or modify one or more of the retrieved device descriptors, configuration descriptors (one or more), interface descriptors (one or more), and endpoint descriptors (one or more) to generate (or define) a descriptor set for the virtual USB device. In some embodiments, the USB controller may further use one or more of the retrieved device descriptor, configuration descriptor(s), interface descriptor(s), and endpoint descriptor(s) to identify and load a driver that the USB controller may use to operate the virtual USB device. In embodiments where the USB controller is coupled to multiple USB devices, the USB controller may enumerate each of the USB devices coupled to the USB controller and generate a virtual USB device that includes each of the USB devices, as described above.
[0054] In some embodiments, descriptor set 300A may include Figure 3A 300A). For example, in an embodiment where the descriptor set 300A is included in or associated with a composite USB device (e.g., a USB device including a keyboard and a touchpad or a virtual composite USB device), the descriptor set 300A may include a corresponding interface association descriptor for each function of the composite USB device. In such embodiments, each interface association descriptor may include properties of one or more interfaces for performing the corresponding function of the composite USB device.
[0055] Figure 3B An example descriptor set 300B associated with a USB human interface device ("HID") is shown in accordance with some embodiments. A HID is a class of USB devices (having a class code of 03h) that are typically used by humans to control the operation of a computing system. Example HIDs include a keyboard, mouse, trackball, or joystick. Figure 3BAs shown in , the descriptor set 300B includes a device descriptor 340B, a configuration descriptor 350B, an interface descriptor 360B, an endpoint descriptor 370B, a HID report descriptor 380B, and a report descriptor 390B. In some embodiments, the descriptor set 300B may be Figure 3A An example of a descriptor set 300A. Figure 3A , device descriptor 340B, configuration descriptor 350B, interface descriptor 360B, and endpoint descriptor 370B may be examples of device descriptor 340A, configuration descriptor 350A, interface descriptor 360A, and endpoint descriptor 370A, respectively. In some aspects, a class code 03h of the HID may be provided in interface descriptor 360B.
[0056] like Figure 3B As shown in , descriptor set 300B is structured as a hierarchical structure. In this hierarchical structure, device descriptor 340B resides at the highest level, configuration descriptor 350B resides at the second high level, interface descriptor 360 resides at the third high level, endpoint descriptor 370B and HID report descriptor 380B reside at the fourth high level, and report descriptor 390B resides at the fifth high level (or the lowest level). In some aspects, HID report descriptor 380B and report descriptor 390B are descriptors specific to HID (or only included in HID or associated with HID). In contrast, other descriptors in descriptor set 300B are standard descriptors that are independent of the class and can be included in a USB device (or associated with a USB device).
[0057] The HID report descriptor 380B carries information about data (e.g., data packets) that can be transferred between the HID and the USB host device. The HID report descriptor 380B also carries information about the configuration specified in the configuration descriptor 350B. Figure 3B As shown in , the HID report descriptor 380B may include a "bcdHID" field that indicates the USB HID standard to which the HID complies. The HID report descriptor 380B may also include a "bNumDescriptors" field that indicates the number of additional HID-specific descriptors (e.g., report descriptors) for the configuration specified in the configuration descriptor 350B. In some aspects, the HID report descriptor 380B may include other information related to the transfer of data between the HID and the USB host device for the specified configuration.
[0058] The report descriptor 390B carries information about the corresponding structure of one or more reports that can be transmitted from the HID to the USB host device or from the USB host device to the HID. Reports are fixed-size data packets. The report descriptor 390B can carry information about how the corresponding report should be processed or used by the USB host device. Figure 3B As shown in , the report descriptor 390B may include a "Use" field that identifies data in a report related to the corresponding control of the HID (e.g., the left button of a mouse). The report descriptor 390B may also include a "Report ID" field that identifies the corresponding report. As used herein, the term "Report ID (Report ID or report ID)" may refer to a report ID field or value (e.g., a number) carried in the report ID field. In some other embodiments, the report descriptor 390B may include other information related to one or more reports that can be exchanged between the HID and the USB host device for the specified configuration.
[0059] In some embodiments, descriptor set 300B may be included in (or associated with) a composite HID. A composite HID may be any HID that includes (or supports) multiple HID functions. For example, a HID that includes both a keyboard and a trackpad is a composite HID because the HID supports multiple functions, including, for example, (i) receiving user input via a depressed button on the keyboard and (ii) receiving user input via detecting a finger or stylus in contact with the trackpad. As another example, a virtual USB device that includes multiple HIDs as abstractions (e.g., Figure 2A In some embodiments, when descriptor set 300B is included in or associated with a composite HID, descriptor set 300B may include a HID report descriptor (e.g., HID report descriptor 380B) that relates only to a single report descriptor (e.g., report descriptor 390B). In such embodiments, a report descriptor may include one or more report identifier ("ID") fields having sequentially numbered values (e.g., a first report ID field having a value equal to 1, a second report ID field having a value equal to 2, a third report ID field having a value equal to 3, etc.).
[0060] During operation, when a USB host device (such as a USB controller) is coupled to one or more HIDs (and / or other USB devices), the USB controller may enumerate each of the one or more HIDs (and / or other USB devices) coupled to the USB controller. For example, the USB controller may detect each of the one or more HIDs and retrieve a descriptor set (e.g., descriptor set 300B) from each of the one or more HIDs. The USB controller may further use the retrieved (one or more) descriptor sets to generate a virtual USB device including one or more HIDs as an abstraction. That is, the USB controller may use, aggregate (or combine) and / or modify one or more descriptors of the retrieved (one or more) descriptor sets to generate or define a descriptor set for a virtual USB device. The USB controller may further use the retrieved (one or more) descriptor sets to identify and load one or more drivers, which the USB controller may use to operate the virtual USB device.
[0061] In some embodiments, the USB controller may generate a virtual USB device by aggregating or combining device descriptors retrieved (during enumeration) from each of the one or more USB devices coupled to the USB controller. More specifically, the USB controller may generate new device descriptors that collectively describe each of the one or more USB devices coupled to the USB controller. In some embodiments, the USB controller may store the new (or modified or generated) device descriptors in a descriptor set associated with the virtual USB device. In some aspects, the descriptor set associated with the virtual USB device may be a hierarchy of descriptors, where the new (or modified or generated) device descriptors reside at the highest level of the hierarchy (such as, for example, at the top of the hierarchy). Figure 3A and 3B ).
[0062] In some embodiments, the descriptor set associated with the virtual USB device may also be located at a second higher level of the hierarchy (e.g., at Figure 3A and 3B ) includes one or more configuration descriptors retrieved (during enumeration) from one or more USB devices. In some embodiments, the USB controller may aggregate or combine configuration descriptors retrieved from at least two USB devices coupled to the USB controller during enumeration. More specifically, the USB controller may generate a new configuration descriptor that collectively describes each of the USB devices from which the aggregated or combined configuration descriptors were retrieved. The USB controller may also include, at a second, higher level of the hierarchy, the new (or modified or generated) configuration descriptor in a descriptor set associated with the virtual USB device.
[0063] In some embodiments, the descriptor set associated with the virtual USB device may also be located at a third higher level of the hierarchy (e.g., at Figure 3A and 3B ) includes one or more interface descriptors retrieved (during enumeration) from one or more USB devices coupled to the USB controller. In some embodiments, the USB controller may modify one or more of the retrieved interface descriptors. For example, the USB controller may modify the value of the interface number field contained in each of the retrieved interface descriptors so that the values of the interface number fields are sequential for the corresponding configuration (e.g., the first interface number field has a value equal to 1, the second interface number field has a value equal to 2, the third interface number field has a value equal to 3, and so on). The USB controller may further store the modified (or generated) interface descriptors in a descriptor set associated with the virtual USB device at a third higher level of the hierarchy.
[0064] In some embodiments, the descriptor set associated with the virtual USB device may also be located at a fourth higher level of the hierarchy (e.g., at Figure 3A and 3B ) includes one or more endpoint descriptors retrieved (during enumeration) from one or more USB devices. In some embodiments, the USB controller may modify one or more of the retrieved endpoint descriptors. For example, the USB controller may modify an address provided in each retrieved endpoint descriptor so that the address uniquely identifies the endpoint described in the corresponding endpoint descriptor and so that the endpoint numbering for the corresponding configured endpoint descriptors is sequential. The USB controller may further store the modified (or generated) one or more endpoint descriptors in a descriptor set associated with the virtual USB device at a fourth higher level of the hierarchical structure.
[0065] In embodiments where the USB controller is coupled to one or more HIDs, during enumeration, the USB controller may retrieve at least one HID report descriptor from each of the one or more HIDs. In some embodiments, the USB controller may aggregate (or combine) the retrieved HID report descriptors to generate new HID report descriptors that describe how data may be transferred between the USB controller and each of the one or more HIDs for a corresponding configuration. The USB controller may further, at a fourth higher level of the hierarchy (e.g., at Figure 3B) stores the modified (or generated) HID report descriptors for the corresponding configuration in the corresponding descriptor set associated with the virtual USB device. The USB controller may also retrieve at least one report descriptor from each of the one or more HIDs during enumeration. In some embodiments, the USB controller may aggregate (or combine) and / or modify the retrieved report descriptors to generate a new report descriptor that includes a report ID field for each report in a report of the one or more HIDs, wherein the report ID field includes values that are sequentially numbered for the corresponding configuration (e.g., the first report ID field has a value of 1, the second report ID field has a value of 2, the third report ID field has a value of 3, and so on). The USB controller may further store ... at the fifth highest level of the hierarchical structure (e.g., Figure 3B ) stores the new (or modified or generated) report descriptor in the descriptor set associated with the virtual USB device for the corresponding configuration.
[0066] In some embodiments, the USB controller may use descriptors retrieved (during enumeration) from a plurality of USB devices coupled to the USB controller to generate at least one interface association descriptor for inclusion in a descriptor set associated with the virtual USB device. In some aspects, each generated interface association descriptor is a descriptor that associates two or more interface descriptors included in a descriptor set associated with the virtual USB device. In addition, the USB controller may generate (or produce) each interface association descriptor by, for example, aggregating or combining interface descriptors retrieved from a plurality of USB devices.
[0067] In some aspects, once the USB controller has generated each descriptor in the descriptor set of the virtual USB device, the virtual USB device is fully synthesized. As a result, the virtual USB device includes each of the one or more USB devices coupled to the USB controller as an abstraction.
[0068] Figure 4A 4 shows example descriptors associated with the first USB device 432A and the second USB device 433A according to some embodiments. Figure 4A In the example of FIG. 4 , the first USB device 432A is depicted as a webcam, and the second USB device 433A is depicted as a flash key type device. However, in actual implementations, the USB devices 432A and 433A may be any USB devices having USB connectivity. Figure 4AAs shown in FIG. 1 , the first USB device 432A is associated with (e.g., includes) an interface descriptor 460A1 and an endpoint descriptor 470A1, and the second USB device 433A is associated with (e.g., includes) an interface descriptor 460A2 and endpoint descriptors 470A2 and 470A3. In some embodiments, each of the interface descriptors 460A1 and 460A2 may be Figure 3A An example of an interface descriptor 360A of FIG. 4 and each of the endpoint descriptors 470A1-470A3 may be Figure 3A In addition, each of the first USB device 432A and the second USB device 433A may be Figure 2A In some aspects, each of the first and second USB devices 432A and 433A, respectively, may be associated with (eg, include) a USB device not in the USB device 230A. Figure 4A Other descriptors shown in (e.g., a device descriptor and at least one configuration descriptor).
[0069] like Figure 4A As shown in FIG. 4 , and with respect to the first USB device 432A, the interface descriptor 460A1 includes an interface number of 2. The endpoint descriptor 470A1 includes an address indicating an endpoint number of 2. The address also indicates that the endpoint described by the endpoint descriptor 470A1 is configured to output data to a USB host device (where Figure 4A The “IN” in endpoint descriptor 470A1 indicates the direction of data from the perspective of the USB host device).
[0070] With respect to the second USB device 433A, the interface descriptor 460A2 includes an interface number equal to 0. The endpoint descriptor 470A2 includes an address indicating an endpoint number equal to 4. The address also indicates that the endpoint described by the endpoint descriptor 470A2 is configured to output data to a USB host device (where Figure 4A The "in" in endpoint descriptor 470A2 of the USB host device indicates the direction of data from the perspective of the USB host device, as explained above). Endpoint descriptor 470A3 includes a header indicating that (i) the endpoint number is equal to 4 and (ii) the endpoint described by endpoint descriptor 470A3 is configured to receive data from a USB host device (where Figure 4A The "out" in the endpoint descriptor 470A3 indicates the direction of data from the perspective of the USB host device).
[0071] In some embodiments, when the first USB device 432A and the second USB device 433A are coupled to a USB host device (e.g., a USB controller), the USB host device may enumerate each of the first USB device 432A and the second USB device 433A. During enumeration, the USB host device may retrieve the interface descriptor 460A1 and the endpoint descriptor 470A1 from the first USB device 432A. The USB host device may also retrieve the interface descriptor 460A2 and the endpoint descriptors 470A2 and 470A3 from the second USB device 433A. In some embodiments, the USB host device may use (e.g., modify or renumber) the retrieved descriptors 460A1, 470A1, 460A2, 470A2, and 470A3 to generate new descriptors for inclusion in a descriptor set associated with the virtual USB device.
[0072] Figure 4B Shown and based on Figure 4A The example descriptor set 400B associated with the virtual USB device generated by using the descriptors of the first USB device 432A and the second USB device 433A. Figure 4B As shown in FIG. 4 , the descriptor set 400B includes a device descriptor 440B, a configuration descriptor 450B, an interface descriptor 460B1 and 460B2, and endpoint descriptors 470B1-470B3. In some embodiments, the device descriptor 440B and the configuration descriptor 450B may be Figure 3A 4. In some aspects, a USB host device (e.g., a USB controller) may generate a descriptor set 400B associated with a virtual USB device.
[0073] In some embodiments, the USB host device may generate the device descriptor 440B by aggregating or combining the device descriptors retrieved from the first USB device 432A and the second USB device 433A (during enumeration). The USB host device may generate the configuration descriptor 450B by aggregating or combining the configuration descriptors retrieved from the first USB device 432A and the second USB device 433A (during enumeration). The USB host device may generate the configuration descriptor 450B based on ( Figure 4A That is, the USB host device may modify the interface number of the interface descriptor 460A1 from a value equal to 2 to a value equal to 0, such as Figure 4B Similarly, the USB host device can be based on ( Figure 4A More specifically, the USB host device may modify the endpoint number of the endpoint descriptor 470A1 from a value equal to 2 to a value equal to 1, such as Figure 4B The USB host device can further be based on ( Figure 4A The USB host device may modify the interface number of the interface descriptor 460A2 from a value of 0 to a value of 1 to generate the interface descriptor 460B2. The USB host device may also modify the interface number of the interface descriptor 460A2 from a value of 0 to a value of 1 to generate the interface descriptor 460B2. Figure 4A The USB host device may modify the endpoint number of the endpoint descriptor 470A2 from a value of 4 to a value of 2 to generate the endpoint descriptor 470B2. The USB host device may also modify the endpoint number of the endpoint descriptor 470A3 from a value of 4 to a value of 2 to generate the endpoint descriptor 470B3. Figure 4B As shown in , interface descriptors 460B1 and 460B2 include sequential interface numbers (e.g., the interface number field of interface descriptor 460B1 has a value equal to 0, and the interface number field of interface descriptor 460B2 has a value equal to 1). In addition, the endpoint number of 1 of endpoint descriptor 470B1 and the endpoint number of 2 of both endpoint descriptors 470B2 and 470B3 are sequential.
[0074] In some embodiments where an additional USB device (e.g., a printer) is coupled to a USB host device, the USB host device may enumerate the printer. During enumeration, the USB host device may retrieve a descriptor set from the printer that includes, among other descriptors, an interface descriptor and an endpoint descriptor. The USB host device may modify the retrieved interface number of the interface descriptor to have a value equal to 2 and place the modified interface descriptor (not in Figure 4B 400B). The USB host device may also modify the configuration descriptor 450B to describe the newly added interface descriptor. In addition, the USB host device may modify the retrieved endpoint number of the endpoint descriptor to have a value equal to 3, and add the modified endpoint descriptor (not shown in Figure 4B 43A) is added to the descriptor set 400B. Subsequently, if the second USB device 433A is decoupled from the USB host device, the USB host device may (once again) enumerate the first USB device 432A and the printer. During enumeration, the USB host device may retrieve descriptors from the first USB device 432A and the printer, and aggregate (or combine) and / or modify the retrieved descriptors to generate a new descriptor set associated with the new virtual USB device (such as reference 433A). Figure 4B and description).
[0075] Figure 5A 53A and 533A according to some embodiments. Figure 5A In the example of FIG. 5 , the first HID 532A is depicted as a touch screen display, and the second HID 533A is depicted as a mouse. However, in actual implementations, the first and second HIDs 532A and 533A, respectively, may be any HID with USB connectivity. Figure 5A As shown in FIG. 5 , the first HID 532A is associated with (eg, includes) a report descriptor 590A1, and the second HID is associated with (eg, includes) a report descriptor 590A2. In some embodiments, each of the report descriptors 590A1 and 590A2 may be Figure 3B An example of a report descriptor 390B, and each of the first HID 532A and the second HID 533A may be Figure 2A An example of any USB device in USB device 230A. Figure 5A As shown in FIG. 5 , the report descriptor 590A1 of the first HID 532A includes a report ID field having a value equal to 2, and the report descriptor 590A2 of the mouse 533A includes a report ID field having a value equal to 4. In some aspects, each of the first HID 532A and the second HID 533A may include a value not in FIG. Figure 5A Other descriptors shown in (e.g., device descriptor, (one or more) configuration descriptors, (one or more) interface descriptors, (one or more) endpoint descriptors, (one or more) HID report descriptors, and one or more additional report descriptors).
[0076] In some embodiments, when the first HID 532A and the second HID 533A are coupled to a USB host device (e.g., a USB controller), the USB host device may enumerate each of the first HID 532A and the second HID 533A. During enumeration, the USB host device may retrieve report descriptors 590A1 and 590A2 from the first HID 532A and the second HID 533A, respectively. In some embodiments, the USB host device may aggregate or combine the retrieved descriptors to generate a new report descriptor for inclusion in a descriptor set associated with a virtual USB device (such as a reference to a virtual USB device). Figure 3B and description).
[0077] Figure 5B Shown and based on Figure 5AAn example descriptor set 500B associated with a virtual USB device generated by using the descriptors of the first HID 532A and the second HID 533A. In some embodiments, the descriptor set 500B may be Figure 3B An example of a descriptor set 300B. Figure 5B As shown in , descriptor set 500B includes device descriptor 540B, configuration descriptor 550B, interface descriptor 560B, HID report descriptor 580B, and report descriptor 590B. In some aspects, a USB host device (eg, a USB controller) may generate descriptor set 500B associated with a virtual USB device.
[0078] In some embodiments, the USB host device may generate a device descriptor 540B by aggregating or combining device descriptors retrieved (during enumeration) from the first HID 532A and the second HID 533A. The USB host device may generate a configuration descriptor 550B by aggregating or combining configuration descriptors retrieved (during enumeration) from the first HID 532A and the second HID 533A. The USB host device may generate an interface descriptor 560B by aggregating or combining interface descriptors retrieved (during enumeration) from the first HID 532A and the second HID 533A. In addition, the USB host device may generate a HID report descriptor 580B by aggregating or combining HID report descriptors retrieved (during enumeration) from the first HID 532A or the second HID 533A. In some aspects, the USB host device may generate a configuration descriptor 550B based on the (configuration descriptors) retrieved (during enumeration) from the first HID 532A and the second HID 533A, respectively. Figure 5A The USB host device may modify the report ID field of report descriptor 590A1 to have a value equal to 1 (rather than 2) (when such report ID field is added to report descriptor 590B). The USB host device may also modify the report ID field of report descriptor 590A2 to have a value equal to 2 (when such report ID field is added to report descriptor 590B). Figure 5B As shown in , the values of the report ID fields in report descriptor 590B are sequential (e.g., the first report ID field has a value equal to 1, and the second report ID field has a value equal to 2). In some aspects, because report descriptor 590B describes reports for multiple HIDs, report descriptor 590B represents an aggregated report descriptor.
[0079] In some embodiments where an additional HID (e.g., a joystick) is coupled to the USB host device, the USB host device may enumerate the joystick. During enumeration, the USB host device may retrieve a descriptor set from the joystick that includes a report descriptor (among other descriptors). The USB host device may further modify the report ID field of the retrieved report descriptor to have a value equal to 3 and replace the modified report ID field (not in Figure 5B 532A and the joystick, and use, aggregate (or combine) and / or modify the descriptors retrieved from the first HID 532A and the joystick during enumeration to generate a new set of descriptors associated with the new virtual USB device (such as reference 590B). Figure 5B and description).
[0080] Figure 6 An example electronic system 600 is shown according to some embodiments. The electronic system 600 includes a computing device 610, a USB controller 620, and a USB device 630. Figure 6 In the example of FIG. 6 , computing device 610 may operate as a USB host device coupled to USB controller 620 via wired connection 602 (also referred to as “connection 602”), and USB controller 620 may operate as a USB host device and a USB device (or dual role device) coupled to USB device 630 via connection 603. In some embodiments, computing device 610, USB controller 620, USB device 630, connection 602, and connection 603 may be respectively Figure 2A An example of computing device 210A, USB controller 220A, USB device 230A, connection 202A, and connection 203A.
[0081] like Figure 6 As shown in FIG. 6 , USB device 630 may include hub 631 and peripheral devices 632 and 633. Peripheral devices 632 and 633 may be coupled to hub 631 via wired or wireless connections 604 and 605, respectively. Figure 6 The USB device 630 is shown to include one hub (hub 631) and two peripheral devices (632 and 633), but in some embodiments, the USB device 630 may include any number of hubs and any number of peripheral devices.
[0082] During operation, USB controller 620 may enumerate each USB device in USB devices 630. During enumeration, USB controller 620 may (i) receive descriptor set Z from hub 631 via connection 603, (ii) receive descriptor set X from peripheral device 632 via connections 603 and 604, and (iii) receive descriptor set Y from peripheral device 633 via connections 603 and 605. In some embodiments, USB controller 620 may use, aggregate (or combine), or modify the received descriptor sets X, Y, and Z (as described above for Figure 3B-5B The virtual composite USB device 622 may be a composite device that is configured to generate a descriptor set B associated with the virtual composite USB device 622. In some aspects, when the USB controller 620 has completed generating the descriptor set B for the virtual composite USB device 622, the virtual composite device 622 is fully synthesized and included (or stored) in the USB controller 620. In some aspects, the virtual composite USB device 622 may be a composite device that is configured to generate a descriptor set B associated with the virtual composite USB device 622. Figure 2A In addition, the virtual composite device 622 includes each USB device in the USB device 630 as an abstraction. The USB controller 620 can virtually operate each USB device in the USB device 630 via the virtual composite USB device 622 (for example, control access to each USB device in the USB device 630).
[0083] In some embodiments, the computing device 610 may enumerate the virtual composite USB device 622 (or USB controller 620). During enumeration, the computing device 610 may retrieve a descriptor set B associated with the virtual composite USB device 622 from the USB controller 620 (for example, the descriptor sets may be, respectively, Figure 4B and 5B The computing device 610 may use the retrieved descriptor set to identify and load one or more USB device drivers (e.g., standard USB device drivers) from the operating system of the USB host device, wherein the one or more device drivers enable the computing device 610 to communicate with the virtual composite USB device 622 (or communicate with one or more USB devices in the USB device 630 via the virtual composite USB device 622). In some embodiments, during enumeration, the computing device 610 may assign address A to the virtual composite USB device 622.
[0084] In some aspects, the virtual composite USB device 622 can communicate with the computing device 610 on behalf of the USB controller 620 and / or one or more USB devices in the USB devices 630. For example, the computing device 610 can communicate with the virtual composite USB device 622 (e.g., to communicate with one or more USB devices in the USB devices 630) by providing address A in one or more data packets sent (via the connection 602) to the virtual composite USB device 622. The virtual composite USB device 622 can relay data abstracted from the peripheral device 632 associated with address A (and / or other information) to the computing device 610 by including such data in one or more data packets sent (via the connection 602) to the computing device 610.
[0085] Since the virtual composite USB device 622 can communicate with the computing device 610 using a single address (e.g., address A) in one or more data packets, the virtual composite USB device 622 can appear as a single device to the computing device 610. For example, in some embodiments, the computing device 610 can display a device manager (e.g., a graphical user interface (GUI)) on a display screen, wherein the virtual composite USB device 622 can appear as a single icon or line item in the GUI. In some embodiments, the device manager can be configured to provide more detailed information about the virtual composite USB device 622. For example, the device manager can display not only an indication of the virtual composite USB device 622, but also an indication of one or more USB devices (excluding any hubs) coupled to the USB controller 620 (e.g., peripheral device 632 and / or peripheral device 633, but not hub 631). The device manager can also be configured to indicate the speed of the virtual composite USB device 622. In some embodiments, the speed displayed by the device manager can be the speed of the fastest USB device associated with (or coupled to) the USB controller 620.
[0086] In some embodiments, the virtual composite USB device 622 may communicate with (and / or operate) one or more of the USB devices 630 using the MA-USB protocol via one or more of the connections 603-605. In such embodiments, the virtual composite USB device 622 (or the USB controller 620) and each of the one or more USB devices may be a MA-USB device. In addition, the controller 620 may include a driver that supports the MA-USB protocol and facilitates communication between the virtual composite USB device 622 (or the controller 620) and the one or more MA-USB devices of the USB device 630. Thus, the computing device 610 may operate the one or more MA-USB devices of the USB device 630 via the virtual composite USB device 622 without having to install any additional software (such as a driver that supports MA-USB operations).
[0087] Figure 7 A block diagram of an example system 700 according to some embodiments is shown. The system 700 may be Figures 2A-2C and Figure 6 In some embodiments, the system 700 may be configured to manage and virtually operate one or more USB devices (e.g., Figure 2A In addition, the system 700 can operate as a USB host device and a USB device (or a dual-role device). Figure 7 As shown in , system 700 may include a device interface (“I / F”) 710 , a processor 720 , and a memory 730 .
[0088] In some embodiments, the device I / F 710 may include a computing device I / F 712 and a USB device I / F 714. The computing device I / F 712 may be configured to transmit data to a USB host device (e.g., Figure 2A The computing device I / F 712 may also be configured to communicate with the processor 720 and / or the memory 730. The USB device I / F 714 may be configured to transmit data to one or more USB devices (e.g., Figure 2A In some embodiments, the USB device I / F 714 may include a device configured to communicate with the user via a network (e.g., Figure 2CThe network 208C) transmits data to one or more USB devices and receives data from the one or more USB devices. The network I / F 715 may include a network socket. The USB device I / F 714 or the network I / F 715 may be configured to communicate with the processor 720 and / or the memory 730.
[0089] For the purposes of discussion herein, processor 720 is Figure 7 700 is shown as coupled to a device interface 710 and a memory 730. For practical embodiments, the device interface 710, the processor 720, and / or the memory 730 may be connected together using one or more buses (not shown for simplicity). Note that in some embodiments, the system 700 may be an embedded system, a system on a chip, an application specific integrated circuit (ASIC), or other integrated circuit (IC) of a dongle, thin client, or other electronic device.
[0090] The memory 730 may include a non-transitory computer-readable medium (including one or more non-volatile memory elements such as EPROM, EEPROM, flash memory, hard drive, etc.) that may store at least the following: USB stack SW module 731, which includes a USB host controller SW module 732. The device controller SW module is configured to (i) manage USB transactions (e.g., data exchanges) between the system 700 and one or more USB devices coupled to the system 700 via the USB device I / F 714, and (ii) (iii) enumerate one or more USB devices and / or (iii) abstract one or more USB devices, The USB stack SW module 731 is configured as follows: o using, combining (or aggregating) and / or modifying information (e.g., one or more descriptors) received by the USB host controller SW module 732 from one or more USB devices coupled to the system 700 to generate a descriptor set associated with the virtual USB device SW module 733; Virtual USB device SW module 733 (also referred to herein as "virtual USB device" or "virtual The virtual USB device SW module 733 is configured to use the descriptor set to virtually operate one or more USB devices coupled to the system 700 via the USB host controller SW module 732 and the USB device I / F 714 (e.g., control access to and / or communication with the one or more USB devices). One or more USB devices communication); A lookup table 734 configured to store one or more The mapping (or translation) of a descriptor to one or more descriptors modified (or generated) by the USB stack SW module 731, wherein the lookup table 734 can be used by the virtual USB device SW module 733 one or more USB devices operatively coupled to the system 700; MA-USB driver SW module 735 (also referred to herein as "MA-USB driver"), It is configured to support the MA-USB protocol (or use the MA-USB protocol to facilitate the system 700 and the coupling to one or more MA-USB devices of the system 700); and a USB device controller SW module 736 configured to enable the system 700 to communicate with the computing device I / F 712 is coupled to the USB host device of the system 700 for communication.
[0091] Each software module includes instructions that, when executed by the system 700, cause the system 700 to perform a corresponding function.
[0092] The system 700 may include any suitable one or more processors (e.g., processor 720) capable of executing scripts or instructions of one or more software programs stored in the system 700 (such as in the memory 730). For example, the system 700 may execute the USB host controller SW module 732 to enumerate one or more USB devices coupled to the system 700 via the USB device I / F 714 (and / or the network I / F 715). During the enumeration, the USB host controller SW module 732 may detect each of the one or more USB devices and receive a descriptor set from each of the one or more USB devices. In some embodiments, the system 700 may execute the USB stack SW module 731 to use, aggregate or combine the received descriptors and / or modify one or more of the received descriptors to generate a descriptor set associated with the virtual USB device SW module 733. In such embodiments, the USB stack SW module 731 may output a mapping of the generated descriptor set to the received descriptor set to the lookup table 734 for storage. Once the descriptor set associated with the virtual USB device SW module 733 is generated (or fully synthesized), the system 700 may execute the USB stack SW module 731 to output the generated descriptor set to the virtual USB device SW module 733 .
[0093] In an embodiment where the system 700 is coupled to a computing device (e.g., computing device 210A of FIG. 2 ) as a USB host device via computing device I / F 712, the computing device may enumerate the system 700. During enumeration, the USB device controller SW module 736 may receive an address (e.g., Figure 6 730). In addition, during enumeration, the USB device controller SW module 736 may retrieve a descriptor set from the virtual USB device SW module 733 and transmit the descriptor set to the computing device via the computing device I / F 712. In some embodiments, the computing device may use the descriptor set to identify and load one or more drivers (e.g., standard device drivers) stored in, for example, an operating system of the computing device. The computing system may further use the one or more drivers to communicate with the virtual USB device SW module 733. In other words, the computing system may communicate with each of the one or more USB devices coupled to the system 700 via the virtual USB device SW module 733. However, since the system 700 is assigned an address by the computing system that the system 700 may include in one or more packets transmitted from the system 700 to the computing system, the system 700 may appear to the computing system as a single device.
[0094] In some embodiments, at least one of the one or more USB devices coupled to the system 700 may be a MA-USB device. In such embodiments, the USB host controller SW module 732 and the USB device I / F 714 may use the MA-USB driver SW module 735 to enumerate and / or abstract the one or more MA-USB devices. In addition, the USB host controller SW module 732 and the USB device I / F 714 may use the MA-USB driver SW module 735 to manage the communication between the system 700 and the one or more MA-USB devices. Thus, when a computing device is coupled to the system 700, the computing device may communicate with the one or more MA-USB devices via the virtual USB device SW module 733 without having to install any additional software (e.g., a driver supporting the MA-USB protocol).
[0095] Figure 8 800 according to some embodiments. The example operations 800 may be performed by a USB controller (e.g., respectively, Figures 2A-2C and 6 USB controllers 220A-220C and / or 620 executed and / or by Figure 7 In some aspects, the USB controller may include an MA-USB device.
[0096] In some embodiments, method 800 may include, from a device coupled to a USB controller (e.g., Figure 6 USB controller 620) of multiple USB devices (e.g., Figure 6 USB device 630) retrieves multiple descriptors (e.g., Figure 6 In some aspects, one or more of the plurality of USB devices may be coupled to a USB controller via a wireless communication channel. In some embodiments, retrieving the plurality of descriptors from the plurality of USB devices may include enumerating each of the plurality of USB devices. Further, in some embodiments, for each of the plurality of USB devices, the plurality of descriptors may include a device descriptor, at least one configuration descriptor, at least one interface descriptor, and / or at least one endpoint descriptor. Further, in some embodiments, each of the one or more first USB devices in the plurality of USB devices may include a HID (e.g., Figure 5A In such embodiments, for each of the one or more first USB devices including a HID, the plurality of descriptors may further include a HID report descriptor and / or at least one report descriptor (e.g., Figure 5A report descriptor 590A1 or 590A2).
[0097] In some embodiments, method 800 may also include modifying at least one of the plurality of descriptors (820). In some aspects, modifying the at least one descriptor may include renumbering the at least one descriptor. Additionally, in some embodiments, the at least one descriptor may include an interface descriptor, an endpoint descriptor, and / or a report descriptor. In embodiments where the at least one descriptor includes a report descriptor, the modified report descriptor (e.g., Figure 5B The modified report descriptor 590B) may be associated with each of the one or more first USB devices that include the HID. For example, the modified report descriptor may include multiple report IDs, and in some aspects, each of the one or more first USB devices that include the HID may be associated with at least one of the multiple report IDs. Furthermore, in some aspects, the multiple report IDs may be numbered sequentially.
[0098] In some embodiments, the method 800 may further include generating a first virtual USB device (eg, generating a first virtual USB device, respectively) based at least in part on modifying the at least one descriptor. Figures 2A-2C Virtual USB devices 222A-222C and / or generated Figure 6In some aspects, the first virtual USB device may be associated with each of the plurality of USB devices. For example, the first virtual USB device may include each of the plurality of USB devices as an abstraction. Additionally, in some embodiments, the method 800 may include associating a first address (e.g., Figure 6 The address A) is output to a computing device (e.g., Figure 2A The computing device 210A of the present invention (840). The first address may represent an address assigned to the USB controller during the enumeration process. In addition, the USB device may include the first address in one or more data packets transmitted to the computing device.
[0099] In some embodiments, the method 800 may further include detecting that a first USB device in the plurality of USB devices is decoupled from the USB controller and one or more second USB devices in the plurality of USB devices are still coupled to the USB controller. The method 800 may further include retrieving a plurality of descriptors from the one or more second USB devices, for example, during enumeration of the one or more second USB devices. The method 800 may further include modifying at least one of the plurality of descriptors retrieved from (or associated with) the one or more second USB devices still coupled to the USB controller. In addition, the method 800 may include generating a second virtual USB device based at least in part on modifying at least one of the plurality of descriptors associated with the one or more second USB devices still coupled to the USB controller. The method 800 may further include outputting a second address associated with the second virtual USB device to the computing device. In some aspects, the second address may represent an address assigned to the USB controller by the computing device during enumeration of the one or more second USB devices still coupled to the USB controller.
[0100] Those skilled in the art will appreciate that information and signals may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
[0101] In addition, those skilled in the art will appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the aspects disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
[0102] The methods, sequences, or algorithms described in conjunction with the aspects disclosed herein may be implemented directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. In an alternative, the storage medium may be integrated with the processor.
[0103] In the foregoing description, embodiments have been described with reference to specific examples thereof. However, it will be apparent that various modifications and changes may be made thereto without departing from the broader scope of the present disclosure as set forth in the appended claims. Accordingly, the description and drawings are to be regarded in an illustrative rather than a restrictive sense.
Claims
1. A method performed by a universal serial bus (USB) controller, the method comprising: retrieving a plurality of descriptors from a plurality of USB devices coupled to the USB controller, wherein each USB device of the plurality of USB devices is associated with at least one descriptor of the plurality of descriptors; modifying at least one descriptor of the plurality of descriptors; generating a first virtual USB device based at least in part on modifying the at least one descriptor; and A first address associated with the first virtual USB device is output to a computing device.
2. The method of claim 1, wherein: The first virtual USB device is associated with each USB device of the plurality of USB devices.
3. The method of claim 1, wherein: The modification of the at least one descriptor comprises renumbering the at least one descriptor.
4. The method of claim 1, wherein: The at least one descriptor comprises an interface descriptor.
5. The method of claim 1, wherein: The at least one descriptor comprises an endpoint descriptor.
6. The method of claim 1, further comprising: detecting that a first USB device of the plurality of USB devices is decoupled from the USB controller and one or more second USB devices of the plurality of USB devices are still coupled to the USB controller; modifying at least one of the plurality of descriptors associated with the one or more second USB devices still coupled to the USB controller; generating a second virtual USB device based at least in part on modifying the at least one descriptor of the plurality of descriptors associated with the one or more second USB devices still coupled to the USB controller; as well as A second address associated with the second virtual USB device is output to the computing device.
7. The method of claim 1, wherein: The retrieving of the plurality of descriptors from the plurality of USB devices includes enumerating each USB device in the plurality of USB devices.
8. The method of claim 1, wherein: Each of the one or more first USB devices of the plurality of USB devices comprises a human interface device (HID); Modifying the at least one of the plurality of descriptors comprises modifying a report descriptor; as well as The modified report descriptor is associated with each first USB device of the one or more first USB devices that includes a HID.
9. The method of claim 8, wherein: The modified report descriptor includes a plurality of report identifiers (IDs), and wherein each of the one or more first USB devices including the HID is associated with at least one of the plurality of report IDs.
10. The method of claim 9, wherein: The plurality of report IDs are numbered sequentially.
11. The method of claim 1, wherein: The USB controller includes a media agnostic USB (MA-USB) device.
12. The method of claim 1, wherein: One or more USB devices of the plurality of USB devices are coupled to the USB controller via a wireless communication channel.
13. A universal serial bus (USB) controller, comprising: Processing systems; as well as a memory storing instructions that, when executed by the processing system, cause the USB controller to: retrieving a plurality of descriptors from a plurality of USB devices coupled to the USB controller, wherein each USB device of the plurality of USB devices is associated with at least one descriptor of the plurality of descriptors; modifying at least one descriptor of the plurality of descriptors; generating a first virtual USB device based at least in part on modifying the at least one descriptor; and A first address associated with the first virtual USB device is output to a computing device.
14. The USB controller according to claim 13, wherein: The first virtual USB device is associated with each USB device of the plurality of USB devices.
15. The USB controller according to claim 13, wherein: The modification of the at least one descriptor comprises renumbering the at least one descriptor.
16. The USB controller according to claim 13, wherein: The at least one descriptor comprises an interface descriptor.
17. The USB controller according to claim 13, wherein: The at least one descriptor comprises an endpoint descriptor.
18. The USB controller according to claim 13, wherein: One or more USB devices of the plurality of USB devices are coupled to the USB controller via a wireless communication channel.
19. The USB controller according to claim 13, wherein: The USB controller includes a dongle or a thin client.
20. A system comprising: Computing device; Multiple Universal Serial Bus (USB) devices; as well as a USB controller coupled to the computing device and the plurality of USB devices, the USB controller being configured to: retrieving a plurality of descriptors from the plurality of USB devices, wherein each USB device in the plurality of USB devices is associated with at least one descriptor in the plurality of descriptors; modifying at least one descriptor of the plurality of descriptors; generating a first virtual USB device based at least in part on modifying the at least one descriptor; and A first address associated with the first virtual USB device is output to the computing device.