Multiple USB devices connected to hub at the same time or during power-up

Question: When I have multiple USB devices connected to a hub at the same time or during power-up of the hub, all the devices will have address 0. How will the host enumerate these devices?

 

Answer:

Here in the case of power-up of the hub with multiple USB devices connected, first the hub enumerates. Then the hub enumerates the devices one by one through appropriate status change interactions with the host. In the case of multiple USB devices connected at the same time as well the hub enumerates the devices one by one through appropriate status change interactions with the host. Here the hub takes care that no more than one device takes address zero at a time.