4

I am trying to hook up 27 USB device to an Intel NUC running CentOS 7 but no matter what I do the system can never see more than 20. I have tried multiple models of NUCs and even tried adding an extra mPCIe USB controller card to one, I tried a 1U server with an Intel Xeon and an extra PCIe USB controller card, and even tried a Mac Mini. The Mac Mini was able to recognize the most devices at 20 but this is still shy of what we need. The extra USB controller cards made no difference in the number of devices the system recognized. The 27 devices are spread across 3 powered 10 port hubs. Does anyone know why the systems would not be able to see all of the USB devices since even with the hubs it is still way under the 127 USB spec limit?

Thanks for the help!

migrated from serverfault.com Aug 29 '15 at 22:21

This question came from our site for system and network administrators.

  • does lsusb -t show all the devices, or can you see where the missing ones should be? Are all the devices the same, eg serial port? – meuh Aug 28 '15 at 18:01
  • I just ran lsusb -t and, no, the devices are no showing. I can tell where they should be but they are not there. And, yes, all the devices are the same. – HowsItStack Aug 28 '15 at 18:29
  • Perhaps the total isochronous bandwidth needed for the devices exceeds that available at the host. I dont know how you can check for this. Are there any errors in /var/log/messages or some similar file. – meuh Aug 28 '15 at 19:03
  • What are the devices you're trying to use and what do you want to do with them ? – André Borie Aug 28 '15 at 19:27
  • 1
    @PeterCordes I've personally tried it on a local Ethernet network without success, so I doubt it'll be reliable or even work. Multiple machines would be better and not violate any standards (USB wasn't designed to be used over IP and it expects very low latencies) – André Borie Aug 29 '15 at 23:36
3

Many devices at once is at least supposed to work, according to his LJ article about making a serial console remote-access server. Limits of up to 127 USB devices (including hubs) per controller are mentioned (i.e. per pair of ports).

Maybe Linux has problems reaching that USB-imposed limit. Probably the kernel log has something interesting to say, so hopefully you can post what you find there at some point.

If you need a workaround, you could export the USB ports over the network. Then you could use multiple computers without modifying your software. It's obviously not ideal, since it means more hardware, more power consumption, and more complexity. The usbip sourceforge project looks abandoned, but there's still an Ubuntu package for it. I guess the code made it into mainline Linux (2.6.28), and the user-space tools haven't needed updating. See also this askubuntu question about it. This may or may not work well, depending on your devices and whether the drivers for them can handle the much higher latency of a network round trip. See André Borie's reply to my comment on the question.

Using this might run into the same per-host limits on number of USB devices. If so, that tells you it's nothing to do with the low-level drivers, and instead is a bit higher up in Linux's USB stack.

If you were using USB storage devices, you could use nbd to export block devices.

1

I dealt with this problem too and it took me a while to find the real problem and solutions. It's a long page, so you can go read it there http://marc.merlins.org/perso/linux/post_2018-12-20_Getting-Around-USB3-xhci-32-Device-Limit-Max-number-of-devices-this-xHCI-host-supports-is-32.html

Basically, it boils down to these things 1) there is a 96 endpoint limit with USB3 (which translates to 32 devices only)
2) you lose further endpoints due to hubs, using a USB2 cable to a USB3 hub gives you a few slots back
3) more generally you should disable USB3 if you can do without it (remove the USB3 kernel driver, or easier if you can, disable USB3 in your bios) 4) if you cannot disable USB3, get a USB2 only PCIe card and that one will truly give you 120 devices or so.

Further resources: https://www.spinics.net/lists/linux-usb/msg175224.html
https://forums.intel.com/s/question/0D50P00004905stSAA/hardware-limitations-on-usb-endpoints-xhci?language=en_US

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy