The present disclosure relates to interconnecting USB devices, and, more particularly, to a USB multi-host endpoint reflector hub.
USB, short for Universal Serial Bus, is an industry standard developed in the mid-1990s that defines the cables, connectors and communications protocols used in a bus for connection, communication, and power supply between computers and electronic devices. It is currently developed by the USB Implementers Forum (USB IF). USB was designed to standardize the connection of computer peripherals (including keyboards, pointing devices, digital cameras, printers, portable media players, disk drives and network adapters) to personal computers, both to communicate and to supply electric power. It has become commonplace on other devices, such as smartphones, PDAs and video game consoles. USB has effectively replaced a variety of earlier interfaces, such as parallel ports, as well as separate power chargers for portable devices.
Continual upgrades and improvements to USB have produced USB 2.0, USB 3.0, USB 3.1, USB Type-C and USB On-The-Go (OTG). Continuous upgrades and improvements are being made as new technologies and uses are found. USB is well-known and widely used with computers and other electronic devices. USB OTG is a specification first used in late 2001 that allows USB devices, such as digital audio players or mobile phones, to act as a host, allowing other USB devices, such as USB flash drives, digital cameras, mice or keyboards, to be attached to them. Use of USB OTG allows those devices to switch back and forth between the roles of host and client (slave). For instance, a mobile phone may read from removable media as the host device, but present itself as a USB Mass Storage Device when connected to a host computer.
USB OTG introduces the concept of a device performing both master and slave roles—whenever two USB devices are connected and one of them is a USB OTG host, they establish a communication link. The device controlling the link is called the master or host, while the other is called the slave or peripheral.
However, USB OTG is a point-to-point link, and inserting a USB hub between the USB OTG A device 102 and the USB OTG B device 104, as shown in
Therefore a need exists for connecting a plurality of USB devices and have them function as either an upstream (host) or downstream (slave) device, or both, and communicate with other USB devices, either upstream (host) or downstream (slave).
According to an embodiment, a method for (Universal Serial Bus) USB devices to communicate without restriction of being either a host or slave device may comprise the steps of: powering on a USB hub controller, wherein the USB hub controller routes connectivity to a first USB host connected thereto; enumerating a first USB OTG B device in device mode on a first downstream (DS) port with the first USB host; issuing a command to the first USB OTG B device to become a second USB host; inserting a endpoint reflector between the second USB host and a first internal device port of the USB hub controller; and detecting a device disconnect on the first DS port, wherein the first USB host then sees a network control model (NCM) device connected thereto; wherein the first and second USB hosts see a plurality of NCM devices, whereby non-control endpoints of the first and second USB hosts may be mirrored, thereby enabling indirect communications between the first and second USB hosts.
According to a further embodiment of the method, may comprise the step of enumerating a second USB device on a second DS port with the first USB host. According to a further embodiment of the method, the step of inserting the endpoint reflector between the second USB host and the first internal device port of the USB hub controller may comprise the step of using multiplexers to insert the bridge between the second USB host and the first internal device port of the USB hub controller.
According to another embodiment, a method for (Universal Serial Bus) USB devices to communicate without restriction of being either a host or slave device may comprise the steps of: providing a first USB upstream (US) port; providing a plurality of downstream (DS) ports; and providing an internal USB network control model (NCM) endpoint reflector coupled to a first one of the plurality DS ports; wherein the NCM endpoint reflector may be inserted upon a command from a first USB host coupled to the first USB US port.
According to a further embodiment of the method, the plurality of DS ports may be reflectored to the first US port. According to a further embodiment of the method, a plurality of USB hosts and a plurality of USB devices may be coupled to the plurality of DS ports to provide simultaneous operation thereof.
According to yet another embodiment, a (Universal Serial Bus) USB multi-host endpoint reflector hub may comprise: an upstream (US) port adapted for coupling to a USB host; hub controller logic coupled to a plurality of first downstream (DS) ports and to the US port; a multi-host endpoint bridge coupled to the hub controller logic; a first multiplexer coupled to the multi-host endpoint bridge; at least one multiplexer coupled to the first multiplexer and the hub controller logic; and at least one second downstream (DS) port adapted for coupling to at least one USB device or USB host.
According to a further embodiment, the USB host may be a USB On-The-Go (OTG) device. According to a further embodiment, the at least one USB device may be a USB OTG device. According to a further embodiment, the USB host may be a USB On-The-Go (OTG) A device and the at least one USB device may be a USB OTG B device. According to a further embodiment, the OTG device A may be an automobile display head unit. According to a further embodiment, the OTG device B may be a smart phone. According to a further embodiment, the at least one USB device may be a USB mass storage device. According to a further embodiment, the host may be an embedded host. According to a further embodiment, the at least one USB device may be a composite USB device containing multiple interfaces or endpoints of varying device classes, each being separately reflected. According to a further embodiment, the USB device may be a dual-role device. According to a further embodiment, the endpoint reflector may be programmable, adapted to emulate a plurality of USB endpoint types, and reflect each USB device class type between the hosts.
According to still another embodiment, a (Universal Serial Bus) USB multi-host endpoint reflector hub may comprise: a USB hub having a upstream (US) port and a plurality of first downstream (DS) ports; a Communication Device Class (CDC) Network Control Model (NCM) endpoint reflector Media Access Control (MAC) address switch may comprise: a plurality of USB NCM devices, and a first multiplexer coupled to the plurality of USB NCM devices; a second plurality of multiplexers coupled to the plurality of USB NCM devices and the plurality of first DS ports of the USB hub; and a plurality of second DS ports coupled to respective ones of the second plurality of multiplexers, and adapted for coupling to a plurality of USB host and slave devices.
According to a further embodiment, the USB host may be a USB On-The-Go (OTG) device. According to a further embodiment, the USB slave device may be a USB OTG device. According to a further embodiment, the USB host may be a USB On-The-Go (OTG) A device and the USB slave device may be a USB OTG B device. According to a further embodiment, the OTG device A may be an automobile display head unit. According to a further embodiment, the OTG device B may be a smart phone. According to a further embodiment, the USB slave device may be a USB mass storage device. According to a further embodiment, the host may be an embedded host. According to a further embodiment, the at least one USB device may be a composite USB device containing multiple interfaces or endpoints of varying device classes, each being separately reflected. According to a further embodiment, the USB device may be a dual-role device. According to a further embodiment, the endpoint reflector may be programmable, adapted to emulate a plurality of USB endpoint types, and reflect each USB device class type between the hosts.
According to another embodiment, a (Universal Serial Bus) USB multi-host endpoint reflector hub may comprise: a USB hub having an upstream (US) port and at least one downstream (DS) port; a first multiplexer coupled to the US port and adapted for coupling to a first USB host; a second multiplexer coupled to the at least one DS port and adapted for coupling to a second USB host or a USB dual role device, wherein a first command enables the USB hub to be switched in or out based upon a second command or the first command that changes the dual role device to its second host role; a multi-host endpoint reflector coupled between the first and second multiplexers; and control logic coupled to and controlling the first and second multiplexers, and the multi-host endpoint reflector; wherein the multi-host endpoint reflector may be adapted to reflect endpoints directly to the first host.
According to a further embodiment, connectivity between the first and second hosts may be selected from the group consisting of USB host-to-device, USB device-to-device and USB device-to-host connectivity. According to a further embodiment, the at least one DS port may revert to at least one charging port when the USB hub may be bypassed and may be no longer connected to a USB host.
A more complete understanding of the present disclosure may be acquired by referring to the following description taken in conjunction with the accompanying drawings wherein:
While the present disclosure is susceptible to various modifications and alternative forms, specific example embodiments thereof have been shown in the drawings and are herein described in detail. It should be understood, however, that the description herein of specific example embodiments is not intended to limit the disclosure to the particular forms disclosed herein.
According to the teachings of this disclosure, a multi-host endpoint reflector enables a method of communication between multiple USB hosts through the USB devices connected to them, where data from one USB host is routed across the USB devices between endpoints of complimentary directions to one or more additional USB hosts. The multi-host endpoint reflector may be integrated with a USB hub controller to form a USB compound device to create a multi-host endpoint reflector hub. A USB multi-host endpoint reflector hub enables a USB OTG B device to become a host upon request by providing a data bridge between the OTG B device after it has transitioned to a host role while any other OTG A device that already is a host is not required to change its host role to a slave role. Therefore a plurality of OTG host devices may co-exist on the same interconnection system hub and communicate there-between.
The USB Specification is centered on a single USB host and multiple USB devices connected to the host. This enables a host centric communication wherein the USB host issues transactions to the USB devices as scheduled by the host controller and data flow between the host and connected devices. However USB devices cannot transfer data as they wish to the host, they must wait until the host issues an appropriate transaction to the USB device.
The USB On-The-Go (OTG) Specification enabled USB devices to assume the role of a USB host as required and hence be able to take more control of the USB data flow, but the OTG model requires that the default host change to a device role simultaneously to the device changing to the host role.
According to the teachings of this disclosure, communication between multiple USB hosts through USB devices connected to them may be enabled, where data from a USB host is routed across the USB devices between endpoints in a complimentary direction. Though it is possible that these USB devices could be connected to downstream ports of a USB hub, the presence/absence of a hub does not alter the basic method of communication as more fully explained hereinafter.
Using implementation of the teachings of this disclosure, two or more USB Network Control Model (NCM) devices (e.g., NCM1 and NCM2) internally connected to two different USB hosts, e.g., Host1 & Host2, where Host1 sends data to Bulk OUT endpoint of NCM1 data interface which would be reflected to Bulk IN endpoint of NCM2, retrieved by Bulk IN transactions issued by Host2. Similarly Host2 sends data to Bulk OUT endpoint of NCM2 data interface which would be returned to Bulk IN endpoint of NCM1 data interface, retrieved by Bulk IN transactions issued by Host 1. The communication channel will look like a USB Host A<->USB Device A1<->USB Device B1<->USB Host B. Hence any data sent from USB Host A will eventually reach USB Host B through the USB devices A1 & B1. Similarly any data sent from USB Host B will eventually reach USB Host A.
Other possible implementations, according to the teachings of this disclosure, USB class devices (like USB mass storage, or USB Audio, etc.) connected to different USB hosts, where data received in any OUT endpoint of an USB device could be internally reflected on to any IN endpoint of any USB device as the design requires, thereby enabling an indirect communication channel between two USB hosts through USB devices connected to them. As explained in the above examples, the endpoint number/endpoint transfer type/interface number/alternate setting of the endpoints selected for such reflection could vary according to the USB specification and is contemplated herein.
According to various embodiments of this disclosure, when an OTG B device requests to become a host, an endpoint reflector may be inserted between the OTG B device after it has transitioned to a host role while any other OTG A device that already is a host is not required to change its host role to a slave role. Therefore a plurality of OTG host devices may co-exist on the same interconnection system hub and communicate with each either. Also non-OTG USB hosts and slaves may co-exist therewith and be able to communicate with all connected USB devices, whether host, slave, OTG or non-OTG.
Referring now to the drawings, the details of example embodiments are schematically illustrated. Like elements in the drawings will be represented by like numbers, and similar elements will be represented by like numbers with a different lower case letter suffix.
Referring to
Operation of the USB multi-host endpoint reflector hub 300, as shown in
Referring to
The USB multi-host endpoint reflector hub 400 enables USB host to device, device to device and device to host connectivity between the HUB's 406 US port and any of the HUB's 406 DS ports 426, 432 and 438. USB host(s) coupled to these DS ports 426, 432 and 438 are not required to be OTG compliant, no device to host role swapping is required, although the USB hub 406 can work with a USB OTG device that requires a role swap. This concept supports simultaneous CARPLAY support on multiple downstream ports of a USB HUB. The USB multi-host endpoint reflector hub 400 enables a USB hub 406 to support an Apple phone or any smartphone operating in USB host mode to be connected on a HUB DS port. As shown in
Referring to
The USB multi-host endpoint reflector with hub bypass 500 provides for functioning as a normal USB specification defined hub when USB device 556 operates as a USB device, which will be referred to herein as the default state. Upon a command from USB host 0502, USB device 556 changes its operation to host mode, and multiplexers 550 and 554 are controlled by control logic 512 to bypass the USB hub 506 and to enable the multi-host endpoint reflector 510 which enables USB host-to-device, USB device-to-device and USB device-to-host connectivity between the USB host 502 and USB Host 556, through the multi-host endpoint reflector 510.
In another embodiment of the USB multi-host endpoint reflector with hub bypass 500, if the hub controller logic 506 has multiple DS ports enabling a plurality of USB devices. Those USB devices will function as USB specification compliant devices when hub 506 is operating in the default state. Upon a command from USB Host 0 (502), device 556 changes operation to host mode, and multiplexers 550 and 554 are switched by control logic 512 to bypass the hub 506 and to enable the multi-host endpoint reflector 510 which enables USB host-to-device, USB device-to-device and USB device-to-host connectivity between the USB host 502 and the USB host 556, through the multi-host endpoint reflector 510. When this occurs, the other DS ports of hub 506 will revert to BC1.2 Dedicated Charging Port (DCP) mode and will provide DC charging for the USB devices that are not actively communicating with either Host 0502 or Host 1556.