

In CarPlay, the phone changes roles from a USB device to a USB host so that it has control of the car’s infotainment system. CarPlay-enabled phones are an example of devices which exhibit this behavior. This can create a challenge for applications where the device may change roles from a USB device to becoming a USB host. Similar results occur when attaching a USB device to an upstream facing port as shown in Figure 5:įigure 5: Upstream and downstream ports of a USB hub Connecting a USB host to a downstream-facing port will result in the hub not being able to communicate over that downstream-facing port. The fixed roles of the internal silicon also mean that only USB hosts can be connected to the upstream-facing port and only USB devices can be connected to the downstream-facing port(s). This is also indicated by the fixed types of external USB connectors on the hub. In a hub, the internal hardware (a USB hub IC) typically requires that only upstream-facing protocols be present on one side and downstream facing protocols on the other. Figure 4 shows an example of a host transferring data through a hub to several devices concurrently.įigure 4: Example of data routing and bandwidth sharing by a hub Finally, it will then re-transmit the properly routed USB traffic to the downstream devices. In order to achieve this, the hub terminates the connection from the USB host, deconstructs USB data packets and routes the data packets to and from the appropriate individual devices. Since a USB hub must recognize multiple devices concurrently, it must keep context for data transfers to and from each device.

Hubs are more complex devices than switches from a data handling standpoint. The multiple devices attached to the hub are all available at the same time, but will collectively share the bandwidth of the single upstream connection (Figure 3).įigure 2: USB host can access devices A, B, C and D concurrentlyįigure 3: Downstream devices sharing the collective upstream bandwidth It is best to use a hub when you need to access multiple attached devices concurrently (Figure 2). Figure 1 below shows a simple example of a hub.įigure 1: Simple diagram of a 1:4 USB hub USB HubsĪ USB hub is a 1:N device that takes one upstream-facing USB connection and then shares it concurrently with several (N) downstream devices. In this blog post, we will cover the functional and architectural differences between USB hubs and USB switches, using the specific example of CarPlay-capable devices. In many cases, both devices can be used in the same system to complement one another to achieve the required system functionality.

There are important and distinctive differences between these two classes of devices, both architecturally and functionally. Several customers have asked us whether or not a USB hub or a USB switch is right.
