Author Topic: Questions about USB hubs  (Read 1031 times)

0 Members and 1 Guest are viewing this topic.

Offline msuffidyTopic starter

  • Regular Contributor
  • *
  • Posts: 243
  • Country: ca
Questions about USB hubs
« on: February 16, 2022, 09:59:38 am »
So this all started when I wanted to tether a new cellular Samsung Tablet to my router using a $5 Canadian usb 2 usbc to usb a cable. For some reason it did not work on a router in a stable manner, like never ending hangs fetching things that were pretty ordinary. I plugged the cable into my pc and it was ok so I discounted the cable and the tablet.  I got another router from the closet and it worked properly as I am writing this with it. The router it worked with, which is a Netgear WNDR4300 running the latest openwrt, only had one usb port. At the time I wanted to plug in 2 usb devices, one of which is the cellular tablet.

The hub I have had for like 12 years and never used. The picture is attached
SO GETTING TO THE ISSUES
So the hub seems to sort of work and light up, but I decided to be prudent and connect the 3.5 Amp supply. Actually I think it came with a 2.7 Amp one, but I have a few that have the same specs and 7x500ma is 3.5 Amps. It has 7 ports.
So I was wondering like is there some logic behind it all so it negotiates when the adapter is installed, or does it just add the supply to the power rails? Does a faster charging device need to negotiate to do so, or does it just need a certain supply on a 2 wire usb cable for example?

I am guessing using a hub does not have massive consequences on usb past the revisions and latencies?
« Last Edit: February 16, 2022, 10:39:55 am by msuffidy »
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: ca
    • VE7XEN Blog
Re: Questions about USB hubs
« Reply #1 on: February 16, 2022, 07:45:54 pm »
Quote
So I was wondering like is there some logic behind it all so it negotiates when the adapter is installed, or does it just add the supply to the power rails? Does a faster charging device need to negotiate to do so, or does it just need a certain supply on a 2 wire usb cable for example?

This is possible in theory, since whether the hub is bus-powered or self-powered is part of its configuration descriptor like any other USB device. However, once its negotiated with the host, this would require re-initializing and drop all the attached devices off the bus. I'm not sure if it's typical for hubs to do this or just always claim they are self powered even if the adapter isn't attached. It should be easy to check and compare the plugged/unplugged state in the descriptor information from lsusb -v.

Strictly speaking, 'normal' USB only allows 100mA from the bus until negotiation with the host has completed with a request for more, then the maximum is up to 500mA depending on the power budget governed by the upstream network. To draw more within the standard as far as I know isn't really possible on a (USB1/2) host port. Dedicated charging ports are part of the spec, and allow 1.5A, so chargers can be detected by devices, but the detection takes over the data lines, so they can't also be host ports. USB-C ports can support USB-PD for a much more comprehensive negotiation of charging capabilities while also acting as full-fledged host ports, but obviously your old USB2 hub doesn't support this.

That said, many devices ignore the standards and draw more power than the spec allows, especially ones that only use USB for power and don't actually negotiate on the bus. Something USB spec compliant like a smartphone or tablet will only be able to draw 500mA from a USB2 host port.
« Last Edit: February 16, 2022, 07:53:24 pm by ve7xen »
73 de VE7XEN
He/Him
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Questions about USB hubs
« Reply #2 on: February 17, 2022, 03:26:58 pm »
So this all started when I wanted to tether a new cellular Samsung Tablet to my router using a $5 Canadian usb 2 usbc to usb a cable. For some reason it did not work on a router in a stable manner, like never ending hangs fetching things that were pretty ordinary.

(snip)

I am guessing using a hub does not have massive consequences on usb past the revisions and latencies?

The router presents a USB host port to downstream devices. But ... it may not support all possible device classes, and it may not support using a hub. Read the manual for that router -- it may specifically preclude the use of a hub.
 

Offline msuffidyTopic starter

  • Regular Contributor
  • *
  • Posts: 243
  • Country: ca
Re: Questions about USB hubs
« Reply #3 on: February 18, 2022, 04:29:51 am »
Well I have been using it for a day flawlessly and am writing this through it. It also has openwrt not netgear firmware... Seems to work, dude, as per my first experiments with this router. The smartrg sr400ac had 2 usb ports. The apple tether was fine, but the android one did not work (properly) for some reason. There were regular dropouts of data. I noticed in google maps I would move the map and the squares would never update just stay grey. I think that build was not totally worked out so something somewhere wasn't making it. It segfaulted also from time to time. Below I mean during lightning unplug everything but the tablet and the netbook also
yt-dlp --proxy 172.20.10.4:6346 -f 22 "http://..."
wget -c -e https_proxy=172.20.10.4:6346 "http://..."
You see my parents gave me this tablet under their account with a lot of tabs they are not using so I made them work together. The normal browsing is done through the tablet and my downloads including like eevblog go through the phone. If the phone is out of data it just goes slow and my browser is not affected. I just like port 6346 for tinyproxy. Technically both the cellular devices have NAT forwards in them and my Netgear has a NAT forward to the android NAT forward. I get browser downloads around 9Mbytes/s on average not bits. I got cellular stuff after my land line went dead for the 2nd time and it was never used for talking and getting more expensive. I never got it fixed so I never had to debate who had to pay for it. I saved $4 a month, my switching, but I had high speed limits. My parents thing they had already but seem to want to keep the additional $10 a month or so it is on their plan.
« Last Edit: February 18, 2022, 05:01:15 am by msuffidy »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf