What is the Maximum Number of USB Devices I Can Connect To My Computer?

Updated Nov 7, 2017

Issue Details

I am looking to connect a number of National Instruments USB devices to my computer. When I connect multiple devices to a USB hub I am getting a Windows error “Not Enough USB controller resources- The controller does not have enough resources for this device”. What is happening and what is limiting the amount of USB devices I can connect?

Solution

The USB specification has fixed standards for its communication protocol. In regards to enumerating and communicating with USB devices, the number of USB addresses and endpoints allowed are given by the structure of the USB Token Packet as shown below: 



The Address field is used to represent physical USB devices. Since it is 7 bits long, a single USB Host Controller can allow up to 127 (27 – 1 Host Controller) connected devices. A connected USB Hub counts as a USB device address and every device connected to it goes towards the maximum allowed addresses for that one host controller. 

Similarly, the Endpoint field is used for routing of specific types of data across the USB bus and they are analogous to ports in the TCP/IP communication protocol. Its field length is 4 bits long allowing for 16 (24) addressable endpoints. However, since endpoints are unidirectional (either in or out of the USB device), a single USB device can allocate up to 32 endpoints. The total number of USB endpoints allowed is dependent on the USB Host Controller and its firmware, however, this number can be less than 100 total allowable USB endpoints for some controllers. 

Therefore, if a USB Device is trying to be added to a Host Controller, and it would cause the number of addresses or endpoints to be exceeded, the aforementioned Windows Resource Error will be thrown. Since some devices can use up to 32 endpoints per device, you can exceed the number of allowable endpoints when connecting NI Devices with a USB hub. As well, some computers’ own internal USB ports and other internal devices (such as wireless network cards, audio, cameras, etc.) are all tied to a single USB Host Controller which can lead to exceeding USB resources fairly quickly. 

From all of this, it is not recommended to use external USB HUBs to connect NI USB Devices. As well, the number of endpoints used by NI USB Devices is not adjustable. It is recommended to connect NI Devices to unique USB Host Controllers or to limit the amount devices sharing a single Host Controller that a NI Device is connected to. You can see your computer’s available and installed host controllers in Windows Device Manager.

WAS THIS ARTICLE HELPFUL?

Not Helpful