Limits of USB

wkearney99

Senior Member
>sigh<  This was an annoying... "oh, that's going to be a problem" moment.

Task creep.  Always a bad thing. 

I've got my Homeseer instance running on an Intel NUC.  Been quite reliable for ages.  But always noticed "odd things" about USB devices connected to it.  Long story short, the chipset is limited to 96 logical devices on USB, and lots of hardware may require more than one of those device addresses.  Couple that with the whole USB2/USB3 hub overlap... and you run out of addresses pretty damned quick.
 
My plan to temporarily use the machine to handle moving a bunch of data around on some external USB drives tossed a serious monkey wrench into the USB config.  

These are probably the most informative of the many posts I had to wade through last night:
 
https://forums.intel.com/s/question/0D50P00004905stSAA/hardware-limitations-on-usb-endpoints-xhci?language=en_US
 
https://acroname.com/blog/why-cant-i-connect-more-usb-30-devices-my-system

So, yeah, USB on some chipsets is more limited than you might realize.
 
Curious if you are running HS3 on Windows or Linux?
 
How many USB devices are connected to your Nuc?
 
It's really not a matter of how many physical devices, it's about how many logical devices each one needs.

It's also a matter of USB2 and USB3 'duplication' taking up logical devices.  As in, a USB3 hub will also have USB2 logical devices for the same ports.  Which sort of means if you have USB2 devices you'd be better off NOT using a USB3 hub to connect them.  Or if you don't need USB3 speeds, don't enable it at all if you have a lot of USB devices.  Because otherwise you're going to run out of the 96 logical ports WELL before you run out of physical ones. Then there's also the way USB hubs implement things internally.  What looks like it should be a simple 8 port hub is, behind the scenes, actually THREE hubs internally:
 
usbhubs.png
You can now see that each USBHub3+ unit is actually comprised of three hub chips in two internal hub layers. Remember that each hub chip itself is a device for the USB tree. Given these 3 internal hub chips, each USBHub3+ adds 2 layers to the USB tree and represents 6 devices (3 hub chips * 2 devices/hub chip).
usbtreeviewer is a very handy program for debugging USB connections.

https://www.uwe-sieber.de/usbtreeview_e.html
 
 
 
I don't have time at the moment to break down everything, but between wanting to have 3 hubs and a USB-connected multi-function printer (that has it's own internal 4-device memory card reader) the machine just ran out of logical ports.  And did not provide terribly sensible error messages about why.

So if you try to get fancy with too many USB hubs... be warned you may run into really unexpected limits.  This may also explain some really weird problems I was having several years ago when I wanted to add a HSPhone USB interface.  I'm guessing the USB hub thing was an issue then too.  

My solution is to stop trying to use this particular box to run a few extra things.  Take my own advice and not imperil the otherwise reliable home automation server with added cruft.
 
Thanks for the information, I never gave the USB much thought but now see how fast you can get into trouble.
 
Most of the 'junk' I'm throwing at my systems is network based (which has it's own challenges with cheap, consumer equipment).
 
I vaguely remember running across this a while ago when I was setting up a Raspberry Pi for a media app.  There was a bunch of "WTF IS GOING ON WITH THESE HUBS?" frustration.  It was then I discovered not all hubs are what they seem on the outside.  As in, an 8 port isn't really an 8.  It's a 2-port, with two 4-ports descending from it.  And then physical ports 1-through-8 don't correspond to logical port numbers... and even worse if some devices are USB2 but others are USB3.

Basically, depending on "where" you connect the devices you could end up with a really funky cascade of logical devices.   The internal 2-port could turn into a pair of internal 2-ports, one running USB2, the other running USB3.  The under those you could also have duplicated USB2 & USB3.  It'd chew up the logical device counts pretty darned quick just provisioning the PORTS.  Then you have to start calculating how many each device wants.  Like a USB hard drive that has a backup button on it.  That's a USB2/3 device internally because the button is USB2 but the drive bridge is USB3, so it has it's own hub inside.  Likewise a multi-function printer/scanner that has a 4-port card reader (SD, Sony, CF, i-forget-what-else).  That has an internal hub, then the printer (which may have more than one device), then the scanner (likewise) and the card readers. 

Holy port counts, Batman!  We're out of logical devices!

I gave the f'ck up and moved on to something else.  
 
So your Nuc is more than a Homeseer server?
 
My solution is to stop trying to use this particular box to run a few extra things.
 
Good idea.
 
Here thinking of purchasing a Nuc just to run Ubuntu Kodi IF it works well with HD / 4K. 
 
pete_c said:
So your Nuc is more than a Homeseer server?
 
My solution is to stop trying to use this particular box to run a few extra things.
 
Good idea.
 
Here thinking of purchasing a Nuc just to run Ubuntu Kodi IF it works well with HD / 4K. 
 
It's a 34010WYK model from a few years ago.  It's run HS3 quite nicely, along with being a printer spooler for the aforementioned printer.  I don't keep any media on it but have also run pytivo or streambaby on it to serve movies to some Tivo units.  No transcoding, just basically file-serving the media.  As I've added a few more HS3 plug-ins I've noticed a bit of a slow-down, but that might have just been the UI.  HS3 still ran all the events and such as expected.

Since we've got Tivo DVRs I've had no real reason to run Kodi/Emby.  I've used Plex from time to time, but not all that often.   The NUC has it's own monitor in a closet off the office.  I only keep it there because there are some things that are easier from the local console.  I've had no reason to display 4K media, and don't see it happening any time soon.  If only because we genuinely don't care.  At some point we're going to build-out the home theater and maybe then, but for now HD is fine.
 
The printer recently had it's USB port fail (danged plastic just broke in the socket).  But it's running until I investigate replacing it.  When that happens there will be even less reason to have the NUC off the office and I could probably move it to the rack downstairs.  I'm debating getting a color laser, Xerox and Brother make some interesting choices.  I'm not really a fan of HP's ink extortion schemes.  We print literally no more than a few dozen pages a month but do use color.  Anyway, any modern printer is going to have networking built-in so I won't need to spool to it from a PC anymore, further freeing up the NUC.

Tangentially, I have an nVidia Shield and, honestly, it's annoying.  It's nowhere near stable and the remote is horrible.  Much like various Chromecasts, Fire TV sticks and players, I don't really bother using it.  Tivo continues to crank along just fine for us.  I know some people rave about it but they must have pretty f'ing low expectations.  I'm seriously underwhelmed by the Shield.
 
Yeah here the Homeseer boxes reside in the basement.  One box is sort of Homeseer 3 multiple function as primarily it runs Ubuntu 18.04 and Oracle VB's of Windows server for Homeseer Windows only stuff.  Still running MythTV and Squeezebox server on an older box and it continues to work fine.
 
A while back configured a "printing" closet and do not really print that much these days.
 
Old HP laserjet (office style), newer Canon multifunction laser printer and a very old dye sub color printer.  I only utilize the dye sub to print pictures and not much lately.  I did turn the closet in to an office center of sorts (paper and stuff).  I put a wall shelf in there to hold the printers and put an electrical outlet and network port there.  Just recently was using a little switch in there and went to using an old in wall in box managed switch which I like (old style).  It is POE powered.
 
Wife had a little Samsung Laser printer which was USB connected to her home office desktop which she liked.  Cheap printer and did not compare at all to the older HP printers; works fine though.  Personally here had one HP inkjet printer way long time ago...never did like using it.
 
Wife uses here Direct TV DVR all of the time here and used to use the Tivo DTV way long time ago.  Here continue to utilize KODI and it works fine for me.
 
We've got a 10 year old, so lots of school project printing.  We use snapfish and similar services for pictures most of the time.  I have a Sharper Image dye sub printer that was foisted on us as a gift... but it's tedious to use.  Likewise photo prints out of an inkjet.
 
Now recalling that I did have an Epson color inkjet printer in my son's room with his computer when he was young. 
 
The new laser color printers are much easier now to deal with and smaller than they used to be. 
 
The dye sub printer (Alps MD5000) is really slow such that it is rarely utilized these days such that it mostly sits. 
 
I like the newer Canon multiple function printer.  It feels solid and looks like a mini office copy machine.  Before the Canon used Brother and they worked OK.
 
Back
Top