How does a USB hub work?

The USB hub is used for device expansion connection, and all USB devices are connected to the ports of the USB hub. One USB host is always connected to one root hub. The USB hub provides 100mA to each of its ports for devices to use. At the same time, the USB hub can diagnose the plug-in operation of the device through the electrical changes of the port, and report the port status to the USB host by responding to the data packet of the USB host. Generally speaking, the cable length between a USB device and a USB hub cannot exceed 5m, and the USB system cannot be cascaded to more than 5 levels(including the root hub).


                                          (Picture Source: Multiport Adapter 3.0 Type C Hub)


Each downstream interface of the USB hub will equally divide the bandwidth of the upstream interface. In addition, the USB hub itself also needs to transmit control signals, so the bandwidth of each downstream device must be smaller than the total bandwidth of the upstream device. The principle of USB hub is relatively complicated, which differs a lot from the hub principle of network devices (Ethernet). The most complex part in USB protocol specification is Hub.

 

USB protocol has four modes: control transmission, bulk transmission, interrupt transmission, and synchronous transmission, among which:

 

1. Control transmission is used to transmit instructions for controlling the equipment level.

 

2. Bulk transfer is mainly used to transfer large amounts of USB data, such as data read and written by U disk.

 

3. Interrupt transmission, used to transmit small pieces of data, the keyboard mainly uses this.

 

4. Synchronous transmission, which is used to transmit data that is not strong enough in real time, that is to say, reliability is not guaranteed.Some USB audio devices use this transmission.


                                                      (Picture Source: 15 in 1 USB Hub)

The USB hub is responsible for integrating various transmission signals from downstream devices. The synchronous transmission has certain limits. If it exceeds a certain proportion of the total bandwidth (20% in memory), the synchronous transmission that exceeds the proportion will be discarded. Interrupt transmission and control transmission occupy reserved bandwidth and cannot be discarded. Bulk transmission occupies the remaining bandwidth, and if there is no synchronous transmission, Bulk transmission can account for more than 90% of the total bandwidth.


The USB hub consolidates data and sends it to the upstream device. If there is a USB hub upstream, the upstream device will continue to do the same operation. In addition, it should be noted that generally the USB interface on the host is a root hub. If there are multiple interfaces on a PC, multiple ports may share one controller, and each controller has one root hub.


So USB hub is equivalent to re-encapsulating various data packets, similar to routers in network devices, not as simple as switches or hubs. At the same time, the USB hub is also a USB device, which is responsible for reporting to the superior how many devices there are in its subordinates. It also occupies some bandwidth to periodically report its status.


                                           (Picture Source: Desk USB Hub Docking Station)


The above is the introduction of the working principle of USB hub.

If you want to learn more about USB hub, click https://www.phone-part.com/blog.

There is also a lot of information about your phone and how to fix it.



Comments