Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brand new, easy to purchase, per-port switchable hub #14

Closed
jstockdale opened this issue Feb 25, 2017 · 23 comments
Closed

Brand new, easy to purchase, per-port switchable hub #14

jstockdale opened this issue Feb 25, 2017 · 23 comments

Comments

@jstockdale
Copy link

jstockdale commented Feb 25, 2017

I've been doing some testing and it appears these support per port power! Although, they seem to only enumerate ports that have devices plugged in (I'm seeing one that reports being a "3 port" hub and one that reports being a "4 port" hub on my system).

Very surprised. This is a cheap and easy-to-purchase modern, good-looking hub.

https://www.amazon.com/Anker-Ultra-Slim-4-Port-Data/dp/B00XMD7KPU

@mvp
Copy link
Owner

mvp commented Feb 25, 2017

I doubt this could work well, considering it doesn't have its own power supply. Any hub that has ability to truly power on/off its ports should have external power supply, that is 500mA for USB2, and 900mA for USB3 per every USB port.
Perhaps this is why it's called data hub?

That said, I don't understand what the issue here. Do you want to add it to supported devices list?

@jstockdale
Copy link
Author

jstockdale commented Feb 25, 2017 via email

@mvp
Copy link
Owner

mvp commented Feb 25, 2017

Ok, I will add this hub to the list. However, note that micro USB cannot possibly be proper power source for 4 port hub. For truly compliant operation, hub must have at least 10W power supply (5V, 4 ports, 500mA each), and twice that for USB3 operation, which micro USB input from your computer USB port cannot provide.

@jstockdale
Copy link
Author

jstockdale commented Feb 25, 2017

Thanks! For what it's worth, I misspoke. There are two versions of this hub and I didn't realize I was looking at the one Anker ships with power supply https://www.amazon.com/Anker-4-Port-Adapter-Charger-Included/dp/B0192LPK5M – a 2.4A 5V charger. It shows up the same on the USB bus but it has a 12W power supply and micro usb input. The Data hub does not have a power input, so perhaps don't recommend / mention that one has support. Sorry for the confusion on the different models. (I bought both versions without realizing they were different, and only just now checked which was which.) I'd be happy to send you one of these units with the power supply for testing if that's helpful.

@jstockdale
Copy link
Author

Also, thanks so much for writing this tool! It's incredibly useful. Two thumbs up. Five stars. A+++ would recommend. :-)

@jstockdale
Copy link
Author

jstockdale commented Feb 25, 2017

I'm also curious. What's the main purpose of this tool? To switch power? Because I've been using it to turn on and off usb devices without unplugging them and it works amazing for that.

(Especially for usb devices with no power switch – like microphones, external soundcards, hard drives, Apple display adapters, where there is no reset button for the device once plugged in.)

@mvp
Copy link
Owner

mvp commented Feb 25, 2017

Added this hub to compatible list: 59f9401

I just wanted to be able to programmatically control USB power.
Since then, people use it for very unexpected applications.
I've seen someone to use it for sending morse code: https://gist.github.com/dardo82/52799ae762e8673c8726
Some other guys use it to reset buggy devices programmatically.
I guess you can use it to control USB fan or USB light :)

@bertani
Copy link
Contributor

bertani commented Mar 7, 2017

I have just tried the 10w version of this (from amazon UK) and it didn't work, bad luck.

@mvp
Copy link
Owner

mvp commented Mar 7, 2017

Perhaps there are different revisions for this hub. @jstockdale, can you tell more about hub that works? Like exact model number, or hw revision, or USB VID:PID? @bertani: can you also do the same for the hub that didn't work?

@bertani
Copy link
Contributor

bertani commented Mar 8, 2017

Sure, this is NOT working:

Anker 4-Port Ultra Slim USB 3.0 Data Hub (10W), Model: "A7518"
USB VID:PID 2109:0812
URL: https://www.amazon.co.uk/gp/product/B0192LVM86/

@bertani
Copy link
Contributor

bertani commented Mar 9, 2017

As a future reference: unfortunately it seems like there is no obvious way to buy the known-good 12W version from Europe.

@jstockdale
Copy link
Author

jstockdale commented Mar 9, 2017 via email

@aciani
Copy link

aciani commented Jul 29, 2017

I just bought the recommended Anker AK-A7518111 from Anker Direct on Amazon. It does not have per-port power switching. The VID:PID is 2109:2813. This is the same VID:PID for the Inland hub that I erroneously reported.

The Anker hub should be removed from the list of supported devices. It is definitely not working. It also squeals when plugged into a USB 2.0 port.

I have contacted Anker. Will see what they say.

@mvp
Copy link
Owner

mvp commented Jul 29, 2017

I often see that vendors continue selling hubs with exact same model id, but completely different usb chipsets. One example is D-Link DUB-H7: old silver version works, new black has exact same model name, but completely different chip and it doesn't work!

Perhaps we have similar situation with Anker? I wonder if device previously reported by @jstockdale is slightly different hw revision.

@aciani
Copy link

aciani commented Aug 5, 2017

An update on the 2109:2813. This controller is a VIA Labs VL813. I finally found a datasheet for it, and surprise, it only has two power-enable control lines. The pin USBHPE1 is Power Enable for Gangmode Ports. The pin USBHPE2B is Power Enable for Charging Ports.

The VL813 supports something called High-speed Charging, which allows devices to draw upwards of 1500 mA. The pin USBHPE2B is used to cut power to specially designated charging ports, in the event a device tries to draw too much power. Neither the Inland or Anker hubs have charging ports.

For some reason, uhubctl sees this hub controller as supporting per-port switching. This controller cannot support per-port switching. It can only switch two groups of ports, ganged normal ports and ganged charging ports, assuming the manufacturer included the necessary transistors.

@mvp
Copy link
Owner

mvp commented Aug 6, 2017

uhubctl detects it as supporting PPPS because hub reports this. I guess this is incorrect hub configuration. This hub was removed from compatibility list anyway.

@jstockdale
Copy link
Author

jstockdale commented Aug 6, 2017 via email

@aciani
Copy link

aciani commented Aug 6, 2017

uhubctl has detected PPPS on several different brands of hub that use the VLI VL813 controller (VID:PID 2109:2813). Perhaps this should be a separate issue, since it applies to all hubs using the VL813?

It seems that VIA Labs' default and reference firmware are bugged. Hubs based on this controller improperly report their characteristics and cannot physically support PPPS. They can support ganged switching.

@aciani
Copy link

aciani commented Aug 6, 2017

jstockdale, your version may have worked. As mvp noted, manufacturers may change the insides, but keep the outsides and model number.

You never mentioned the VID:PID for yours. bertani reported 2109:0812. This is a VL812, and like the VL813, it can only support ganged switching, assuming the manufacturer added the transistors.

@mvp
Copy link
Owner

mvp commented Feb 18, 2018

@aciani, @jstockdale: Can you please try this one again using uhubctl built from master branch?
Be sure to turn off power for both USB2 and USB3 virtual hubs. Thanks!

@GatorEE
Copy link

GatorEE commented Jun 7, 2019

Have you tried the Acroname hubs? A bit more expensive than these options, but well powered, pretty solid and easy to use.
www.acroname.com

@mvp
Copy link
Owner

mvp commented Jun 7, 2019

@GatorEE, Acroname is using proprietary power control protocol.
uhubctl supports per-port power switching as defined by USB 2.0 standard (you find a copy on www.usb.org or here: http://www.poweredusb.org/pdf/usb20.pdf ), chapter 11.11 Hub Port Power Control.
If Acroname provides specification about their control method, I wouldn't mind to code control for their hardware into uhubctl.

@mvp
Copy link
Owner

mvp commented Jun 7, 2019

@GatorEE, small excerpt from this chapter:

11.11 Hub Port Power Control

Self-powered hubs may have power switches that control delivery of power downstream facing ports but it is not required. Bus-powered hubs are required to have power switches. A hub with power switches can switch power to all ports as a group/gang, to each port individually, or have an arbitrary number of gangs of one or more ports.

A hub indicates whether or not it supports power switching by the setting of the Logical Power Switching Mode field in wHubCharacteristics. If a hub supports per-port power switching, then the power to a port is turned on when a SetPortFeature(PORT_POWER) request is received for the port. Port power is turned off when the port is in the Powered-off or Not Configured states.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants