mvp / uhubctl Goto Github PK
View Code? Open in Web Editor NEWuhubctl - USB hub per-port power control
License: Other
uhubctl - USB hub per-port power control
License: Other
Can somebody please send high-res pics of both sides internals of Anker AK-A7518111 or UHR204 or Plugable USB2-HUB10S or any that has really working ppps?
That will be of much help.
Thank you a lot!
I’m trying to find a compatible USB hub that meets my needs. One, I’m trying to find something with more ports than the listed compatible devices, hoping for a minimum of 10 ports. Two, I’m looking for something that has a dedicated charging port with 2.1amps because I’m trying to power a raspberry pi using the USB hub.
I purchased this Anker hub:
https://www.amazon.com/gp/product/B00GSLMTQ8/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
uhubctl sees the hub and the ports, but I’m having no luck controlling power to individual ports.
root@raspberrypi:/usr/local/src/uhubctl# ./uhubctl -n 2109
Current status for hub 1-1.2.4.4.4, vendor 2109:2812, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0100 power
Current status for hub 1-1.2.4.4, vendor 2109:2812, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0507 highspeed power suspend enable connect
Current status for hub 1-1.2.4, vendor 2109:2812, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0507 highspeed power suspend enable connect
Current status for hub 1-1.2, vendor 2109:2812, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0507 highspeed power suspend enable connect
I can toggle the power and uhubctl shows the port as off but the device connected to the port continues to operate. My question is really how do I determine if a hub has the support I need to toggle power on individual ports and is there anything else I need to do to further test this hub to see if it will work? Or is it flat out not compatible? Is there something I can see from lsusb that will tell me if a hub is supported?
I also purchased one of your recommended hubs, the:
D-Link: DUB-H7
and this works just fine but I need more ports and something that can power the pi.
$ sudo ./uhubctl -a off -p 5 -r 5
Current status for hub 1-1, vendor 0424:9514, 5 ports
Port 5: 0103 power enable connect [0eef:0005 WaveShare WaveShare Touchscreen 2016-11-06]
Sent power off request
New status for hub 1-1, vendor 0424:9514, 5 ports
Port 5: 0000 off
But the power stays on. :/
Anyway, it was new to me that the RPi3 supports this functionality but I was curious to try.
Since libusb version 1.0.16 the libusb_get_port_path
function is deprecated. Instead libusb_get_port_numbers
should be used.
For more details see https://github.com/libusb/libusb/blob/v1.0.16/ChangeLog#L9
On MacOS Sierra 10.12.4 (16E195), uhubctl prints identical hub id 64-1
for 2 different hubs:
Current status for hub 64-1, vendor 05ac:1006, 3 ports
Port 1: 0100 power
Port 2: 0303 lowspeed power enable connect
Port 3: 0100 power
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 1: 0503 highspeed power enable connect
Port 2: 0303 lowspeed power enable connect
Port 3: 0103 power enable connect
Port 4: 0103 power enable connect
Port 5: 0503 highspeed power enable connect
Port 6: 0000 off
Port 7: 0107 power suspend enable connect
This must be an issue with libusb, need to investigate.
I've got AmazonBasics hub from the support list. Everything was perfect, but sometimes the uhubctl process hangs in D state and nothing can be done, even unplugging and plugging in again the hub does not help, the only help is the following procedure: unplug hub, reboot, plug hub (and it works for some time and hangs again). In the next week I'll replace my hub to old, but good 7-port D-Link and I'll let you know what is going on with other hub. I've got three devices connected to the hub, drawing ~30mA power each, the same problem occurs with and without external power. Same problem when compiling binary for i386 and amd64 (always amd64 kernel). My hardware and software info:
root@somehost:~# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 111
model name : AMD Sempron(tm) Processor 200U
stepping : 2
cpu MHz : 999.827
cache size : 256 KB
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow up rep_good nopl extd_apicid pni cx16 lahf_lm extapic cr8_legacy 3dnowprefetch vmmcall
bogomips : 1999.65
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps
root@somehost:~# cat /proc/meminfo
MemTotal: 894768 kB
MemFree: 338268 kB
(not important, cutted out)
root@somehost:~# lsusb
Bus 001 Device 022: ID xxxx:xxxx Some_device_connected_to_hub
Bus 001 Device 016: ID 2109:2811 (first and internally daisy chained smart hub)
Bus 001 Device 020: ID xxxx:xxxx Some_device_connected_to_hub
Bus 001 Device 021: ID xxxx:xxxx Some_device_connected_to_hub
Bus 001 Device 014: ID 2109:2811 (first and internally daisy chained smart hub)
Bus 001 Device 002: ID 0781:5572 SanDisk Corp. (pendrive with the OS)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@somehost:~# lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RS690 Host Bridge
00:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RS690 PCI to PCI Bridge (Internal gfx)
00:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RS690 PCI to PCI Bridge (PCI Express Port 2)
00:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RS690 PCI to PCI Bridge (PCI Express Port 3)
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB600 USB (OHCI0)
00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB600 USB (OHCI1)
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB600 USB (OHCI2)
00:13.3 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB600 USB (OHCI3)
00:13.4 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB600 USB (OHCI4)
00:13.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB600 USB Controller (EHCI)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 14)
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB600 IDE
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB600 PCI to LPC Bridge
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS690M [Radeon Xpress 1200/1250/1270]
08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)
root@somehost:~# uname -a
Linux somehost 3.2.0-4-amd64 #1 SMP Debian 3.2.78-1 x86_64 GNU/Linux
root@somehost:~# dpkg -l | grep libusb
ii libusb-1.0-0:amd64 2:1.0.21-1 amd64 userspace USB programming library
ii libusb-1.0-0:i386 2:1.0.21-1 i386 userspace USB programming library
ii libusb-1.0-0-dev:amd64 2:1.0.21-1 amd64 userspace USB programming library development files
ii libusb-1.0-0-dev:i386 2:1.0.21-1 i386 userspace USB programming library development files
ii libusb-1.0-doc 2:1.0.21-1 all documentation for userspace USB programming
(I'm using gcc6 for amd64 to compile, just tried with gcc-4.6:amd64, I'll tell you later about the results)
root@somehost:~# dpkg -l | grep gcc
ii gcc 4:6.3.0-4 amd64 GNU C compiler
ii gcc-4.6 4.6.3-14 amd64 GNU C compiler
ii gcc-4.6-base:amd64 4.6.3-14 amd64 GCC, the GNU Compiler Collection (base package)
ii gcc-6 6.3.0-18 amd64 GNU C compiler
ii gcc-6-base:amd64 6.3.0-18 amd64 GCC, the GNU Compiler Collection (base package)
ii gcc-6-base:i386 6.3.0-18 i386 GCC, the GNU Compiler Collection (base package)
ii gcc-6-multilib 6.3.0-18 amd64 GNU C compiler (multilib support)
ii gcc-multilib 4:6.3.0-4 amd64 GNU C compiler (multilib files)
ii lib32gcc-6-dev 6.3.0-18 amd64 GCC support library (32 bit development files)
ii lib32gcc1 1:6.3.0-18 amd64 GCC support library (32 bit Version)
ii libgcc-6-dev:amd64 6.3.0-18 amd64 GCC support library (development files)
ii libgcc1:amd64 1:6.3.0-18 amd64 GCC support library
ii libgcc1:i386 1:6.3.0-18 i386 GCC support library
ii libx32gcc-6-dev 6.3.0-18 amd64 GCC support library (x32 development files)
ii libx32gcc1 1:6.3.0-18 amd64 GCC support library (x32)
I'll post the gdb stacktrace later, this is on production environment and cannot make experiments now :(
There are many conflicting reports that AmazonBasics hubs work or don't work with uhubctl
(issues #17, #26, #50, #54, #57, #58).
It seems that it only works if hub is plugged to USB 2.0 upstream port, and doesn't when plugged to USB 3.0.
Apparently, AmazonBasics hubs are designed as composite USB device for their USB2 and USB3 subcomponents. uhubctl detects only USB2 hub with id 2109:2811, not USB3 hub with id 2109:2810.
This could be an issue with libusb device enumeration, as uhubctl is using standard libusb primitives to enumerate all devices.
Seems the software is buggy on my system.
Using the Amazon Basics 7 port hub on Debian Jesse 8.7 (3.16 kernel).
All commands are being run as root user
These commands work as expected:
./uhubctl
Current status for hub 3-1.5.3, vendor 2109:2811, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0303 lowspeed power enable connect [04ca:002f Lite-On Technology Corp. USB Multimedia Keyboard]
Current status for hub 3-1.5, vendor 2109:2811, 4 ports
Port 1: 0100 power
Port 2: 0103 power enable connect [0c2e:0aaf Honeywell Imaging & Mobility 1910i 17033B01A3]
Port 3: 0503 highspeed power enable connect [2109:2811 VIA Labs, Inc. USB2.0 Hub ]
Port 4: 0303 lowspeed power enable connect [046d:c00c Logitech USB Optical Mouse]./uhubctl -l 1-1.5.3 -p 3 -a 2
Current status for hub 1-1.5.3, vendor 2109:2811, 4 ports
Port 3: 0100 power
Sent power off request
New status for hub 1-1.5.3, vendor 2109:2811, 4 ports
Port 3: 0000 off
Sent power on request
New status for hub 1-1.5.3, vendor 2109:2811, 4 ports
Port 3: 0100 power
This command hangs:
./uhubctl -l 1-1.5 -p 4 -a 2
Current status for hub 1-1.5, vendor 2109:2811, 4 ports
Port 4: 0303 lowspeed power enable connect [046d:c00c Logitech USB Optical Mouse]
Sent power off request
New status for hub 1-1.5, vendor 2109:2811, 4 ports
The scary part is when it hangs I cannot kill it with CTRL+C or even with kill -9 PID
Any ideas would be much appreciated - thanks!
Hey there
Is there a limitation in Zero Pi's Support for what the bigger Pi's support?
Thanks a lot!
Alessandro
Hi,
I might have a new device you can add to the table:
lsusb output is: 0409:005a NEC Corp. HighSpeed Hub
I have an intransigent device attached to this hub, which refuses to reset without unplugging and plugging back in (I tried the USBDEVFS_RESET ioctl to no avail). When I cycle the power with uhubctl, the power LED remains on, however I see the expected messages in dmesg and the device does reset.
Here's the dmesg output after running sudo ./uhubctl -a off -l 2-3 -p 3
and then sudo ./uhubctl -a on -l 2-3 -p 3
[Apr 3 17:35] usb 2-3.3: USB disconnect, device number 29
[ +0.214874] usb 2-3.3: new high-speed USB device number 30 using xhci_hcd
[ +0.107419] usb 2-3.3: New USB device found, idVendor=1d27, idProduct=0600
[ +0.000004] usb 2-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0.000002] usb 2-3.3: Product: Structure Sensor
[ +0.000001] usb 2-3.3: Manufacturer: Occipital
[ +0.000002] usb 2-3.3: SerialNumber: 27267
Note that nothing happened when I issued the off
command -- the disconnect and reconnect both happened when I turned it back on
. Is this expected?
So, does this hub support power control? I'm not really sure, but at least uhubctl is going to solve my problem of resetting this particular device! :)
I would like to configure USB port power to allow Android device to be visible by ADB but not charging.
First of all - thanks a lot for uhubctl
. I think it's a remedy for hanging USB in tablets and smartphones I work with
I have 27" Apple Retina screen hooked up to a Macbook Air. I want to use it to selectively power cycle ASUS Android tablet and an iPhone which I've hooked up to the screen.
My understanding is that port 1 is special? Output:
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 1: 0100 power
Port 2: 0503 highspeed power enable connect
Port 3: 0503 highspeed power enable connect
Port 4: 0103 power enable connect
Port 5: 0503 highspeed power enable connect
Port 6: 0000 off
Port 7: 0103 power enable connect
It only reports power, but not anything else? My empirical experiments show it's a special thing toggling power for the whole bus. Just wanted to know if this is documented. Below I provide the USB bus topology. This screen has 7 logical USBs, but the back of the screen has 3 physical USB ports.
What I'm seeing: I can't power-cycle the power2...7
if Android phone/tablet is hooked up to it. Example:
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 1: 0100 power
Port 2: 0503 highspeed power enable connect <------- Android phone
Port 3: 0100 power
Port 4: 0103 power enable connect
Port 5: 0503 highspeed power enable connect
Port 6: 0100 power
Port 7: 0103 power enable connect
The output:
[11:41:30][wkoszek@wkoszek_mba:~/r/autotest/www]$ uhubctl -p 2 -a off
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 2: 0503 highspeed power enable connect
Sent power off request
New status for hub 64-1, vendor 05ac:9127, 7 ports
Port 2: 0000 off
[11:41:55][wkoszek@wkoszek_mba:~/r/autotest/www]$ uhubctl -p 2 -a on
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 2: 0000 off
Sent power on request
New status for hub 64-1, vendor 05ac:9127, 7 ports
Port 2: 0100 power
So looks like it's OK from the uhubctl
reporting point of view, but I don't see this power-cycle happening on a device. I'm looking at the battery status and "debugging" mode icon, since I'm developing on this phone. But when I do:
[11:43:50][wkoszek@wkoszek_mba:~/r/autotest/www]$ uhubctl -p 1 -a off
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 1: 0100 power
Sent power off request
New status for hub 64-1, vendor 05ac:9127, 7 ports
Port 1: 0000 off
[11:43:56][wkoszek@wkoszek_mba:~/r/autotest/www]$ uhubctl -p 1 -a on
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 1: 0000 off
Sent power on request
New status for hub 64-1, vendor 05ac:9127, 7 ports
Port 1: 0100 power
The power-cycle is reported by a device.
Now weird thing. I unplug everything and connect iPhone to port 3:
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0503 highspeed power enable connect <----------- iPhone.
Port 4: 0103 power enable connect
Port 5: 0503 highspeed power enable connect
Port 6: 0100 power
Port 7: 0103 power enable connect
When I do:
[11:47:20][wkoszek@wkoszek_mba:~/r/autotest/www]$ uhubctl -p 3 -a cycle
Current status for hub 64-1, vendor 05ac:9127, 7 ports
Port 3: 0503 highspeed power enable connect
Sent power off request
New status for hub 64-1, vendor 05ac:9127, 7 ports
Port 3: 0000 off
Sent power on request
New status for hub 64-1, vendor 05ac:9127, 7 ports
Port 3: 0100 power
it works fine. The reporting is OK, and the phone gets power cycled. Same when I replugged it in port 2.
I'm trying to understand if other people see the same issue or whether it's an expected behaviour.
USB:
USB 3.0 Bus:
Capacity: 2.02 GB (2,021,654,528 bytes)
Removable Media: Yes
BSD Name: disk2
Host Controller Driver: AppleUSBXHCIWPT
Partition Map Type: MBR (Master Boot Record)
PCI Device ID: 0x9cb1
PCI Revision ID: 0x0003
PCI Vendor ID: 0x8086
Volumes:
6509990502:
Capacity: 2.02 GB (2,021,538,304 bytes)
Available: 1.23 GB (1,227,030,528 bytes)
Writable: Yes
File System: MS-DOS FAT16
BSD Name: disk2s1
Mount Point: /Volumes/6509990502
Content: DOS_FAT_16
Card Reader:
Product ID: 0x8406
Vendor ID: 0x05ac (Apple Inc.)
Version: 8.20
Serial Number: 000000000820
Speed: Up to 5 Gb/sec
Manufacturer: Apple
Location ID: 0x14600000 / 23
Current Available (mA): 1800
Current Required (mA): 224
Extra Operating Current (mA): 0
Capacity: 2.02 GB (2,021,654,528 bytes)
Removable Media: Yes
Detachable Drive: Yes
BSD Name: disk2
Built-In: Yes
Partition Map Type: MBR (Master Boot Record)
Volumes:
6509990502:
Capacity: 2.02 GB (2,021,538,304 bytes)
Available: 1.23 GB (1,227,030,528 bytes)
Writable: Yes
File System: MS-DOS FAT16
BSD Name: disk2s1
Mount Point: /Volumes/6509990502
Content: DOS_FAT_16
BRCM20702 Hub:
Product ID: 0x4500
Vendor ID: 0x0a5c (Broadcom Corp.)
Version: 1.00
Speed: Up to 12 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x14300000 / 2
Current Available (mA): 1000
Current Required (mA): 94
Extra Operating Current (mA): 0
Built-In: Yes
Bluetooth USB Host Controller:
Product ID: 0x828f
Vendor ID: 0x05ac (Apple Inc.)
Version: 1.18
Speed: Up to 12 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x14330000 / 5
Current Available (mA): 1000
Current Required (mA): 0
Extra Operating Current (mA): 0
Built-In: Yes
Hub:
Product ID: 0x1521
Vendor ID: 0x04cc (Philips Semiconductors)
Version: 2.00
Speed: Up to 480 Mb/sec
Location ID: 0x14200000 / 8
Current Available (mA): 1000
Current Required (mA): 0
Extra Operating Current (mA): 0
USB 2.0 Bus:
Host Controller Driver: AppleUSBEHCIPI7C9X440SL
PCI Device ID: 0x400f
PCI Revision ID: 0x0003
PCI Vendor ID: 0x12d8
Hub:
Product ID: 0x9127
Vendor ID: 0x05ac (Apple Inc.)
Version: 1.00
Speed: Up to 480 Mb/sec
Location ID: 0x40100000 / 6
Current Available (mA): 1000
Current Required (mA): 100
Extra Operating Current (mA): 0
Built-In: Yes
Nexus 7:
Product ID: 0x4ee2
Vendor ID: 0x18d1 (Google Inc.)
Version: 2.28
Serial Number: 0a83b2b0
Speed: Up to 480 Mb/sec
Manufacturer: asus
Location ID: 0x40130000 / 7
Current Available (mA): 1000
Current Required (mA): 500
Extra Operating Current (mA): 0
FaceTime HD Camera (Display):
Product ID: 0x1112
Vendor ID: 0x05ac (Apple Inc.)
Version: 71.60
Serial Number: CC2E9T04VPDJ9FLP
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x40150000 / 3
Current Available (mA): 1000
Current Required (mA): 500
Extra Operating Current (mA): 0
Built-In: Yes
Apple Thunderbolt Display:
Product ID: 0x9227
Vendor ID: 0x05ac (Apple Inc.)
Version: 1.39
Serial Number: 182A0933
Speed: Up to 12 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x40170000 / 2
Current Available (mA): 1000
Current Required (mA): 2
Extra Operating Current (mA): 0
Built-In: Yes
iPhone:
Product ID: 0x12a8
Vendor ID: 0x05ac (Apple Inc.)
Version: 6.01
Serial Number: ba8b31ea427d8730fa2412906d9df1f6e90a1d94
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x40120000 / 5
Current Available (mA): 1000
Current Required (mA): 500
Extra Operating Current (mA): 500
Sleep current (mA): 1000
Display Audio:
Product ID: 0x1107
Vendor ID: 0x05ac (Apple Inc.)
Version: 2.09
Serial Number: 182A0933
Speed: Up to 12 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x40140000 / 4
Current Available (mA): 1000
Current Required (mA): 2
Extra Operating Current (mA): 0
Built-In: Yes
Is it supprted http://plugable.com/products/usb3-hub7bc/ ?
The Plugable USB2-HUB-AG7 uses the same chipset as the Plugable USB2-HUB10S which is already listed as compatible. I don't have a HUB10S to test with, but I was able to make uhubctl
work properly (i.e. list ports and turn things on/off) with modifications shown here.
While this change works for me, it seems like it should break things for others, so I don't want to make a pull request of it yet... All I can tell for sure is that in uhubctl.c
on line 204, lpsm
is set to a value that does not reflect the capabilities of this particular hub.
Any thoughts?
Some devices on the hub have status "0100 power", but the one I'm power cycling has status "0503 highspeed power enable connect" before cycling, and uhubctl seems to only reset it to "0101 power connect". Usually it immediately returns to 0503, but sometimes it somehow drops off to 0100 instead (and then fails to talk to the computer). Should uhubctl be explicitly resetting the highspeed setting?
Running this on latest version Mac osX sierra. Tried it on a couple of different supported usb hubs. Most recently the Anker AK-A7518111. I have multiple ios and android devices connected to the usb hub. When I disable charging via "uhubctl -a off" i have to physically disconnect/reconnect a tethered device/usb connection to the hub for the it to stop charging. Data connectivity is terminated, but charging continues unless someone manually disconnects/reconnects the device.
Is this expected? Looking to use this as a cost effective solution to not continuously charge my tethered development devices.
I can turn on and off using the command line, but it does not disable the ports.
Could it be a new revision without the power transistors?
Jens
./uhubctl -a 0
Current status for hub 20-1, vendor 2109:2811, 4 ports
Port 1: 0000 off
Port 2: 0000 off
Port 3: 0000 off
Port 4: 0000 off
Sent power off request
New status for hub 20-1, vendor 2109:2811, 4 ports
Port 1: 0000 off
Port 2: 0000 off
Port 3: 0000 off
Port 4: 0000 off
sudo uhubctl
Current status for hub 1-1, vendor 0424:9514, 5 ports
Port 1: 0503 highspeed power enable connect [0424:ec00]
Port 2: 0100 power
Port 3: 0303 lowspeed power enable connect [045e:0083 Microsoft Basic Optical Mouse]
Port 4: 0303 lowspeed power enable connect [0603:0002 SINO WEALTH USB Composite Device]
Port 5: 0100 power
sudo uhubctl -a off -p 2
Current status for hub 1-1, vendor 0424:9514, 5 ports
Port 2: 0100 power
Sent power off request
New status for hub 1-1, vendor 0424:9514, 5 ports
Port 2: 0000 off
sudo uhubctl
Current status for hub 1-1, vendor 0424:9514, 5 ports
Port 1: 0503 highspeed power enable connect [0424:ec00]
Port 2: 0000 off
Port 3: 0100 power
Port 4: 0100 power
Port 5: 0100 power
sudo uhubctl
Current status for hub 1-1, vendor 0424:9514, 5 ports
Port 1: 0503 highspeed power enable connect [0424:ec00]
Port 2: 0000 off
Port 3: 0100 power
Port 4: 0100 power
Port 5: 0100 power
e.g. Mouse no longer works at this point.
I have a Thinkpad x230 with Ubuntu 16.04 and did this:
root@lenny:~/code/uhubctl:master ./uhubctl -a off -i
Warning: changing port state for multiple hubs at once.
Use -l to limit operation to one hub!
Current status for hub 2-1, vendor 8087:0024, 8 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0100 power
Port 5: 0100 power
Port 6: 0100 power
Port 7: 0100 power
Port 8: 0100 power
Sent power off request
New status for hub 2-1, vendor 8087:0024, 8 ports
Port 1: 0000 off
Port 2: 0000 off
Port 3: 0000 off
Port 4: 0000 off
Port 5: 0000 off
Port 6: 0000 off
Port 7: 0000 off
Port 8: 0000 off
Current status for hub 1-1, vendor 8087:0024, 6 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0103 power enable connect
Port 4: 0100 power
Port 5: 0100 power
Port 6: 0100 power
Sent power off request
New status for hub 1-1, vendor 8087:0024, 6 ports
Port 1: 0000 off
Port 2: 0000 off
Port 3: 0000 off
Port 4: 0000 off
Port 5: 0000 off
Port 6: 0000 off
and again which shows the first command powered them all off
root@lenny:~/code/uhubctl:master ./uhubctl -a off -i
Warning: changing port state for multiple hubs at once.
Use -l to limit operation to one hub!
Current status for hub 2-1, vendor 8087:0024, 8 ports
Port 1: 0000 off
Port 2: 0000 off
Port 3: 0000 off
Port 4: 0000 off
Port 5: 0000 off
Port 6: 0000 off
Port 7: 0000 off
Port 8: 0000 off
Sent power off request
New status for hub 2-1, vendor 8087:0024, 8 ports
Port 1: 0000 off
Port 2: 0000 off
Port 3: 0000 off
Port 4: 0000 off
Port 5: 0000 off
Port 6: 0000 off
Port 7: 0000 off
Port 8: 0000 off
Current status for hub 1-1, vendor 8087:0024, 6 ports
Port 1: 0000 off
Port 2: 0000 off
Port 3: 0000 off
Port 4: 0000 off
Port 5: 0000 off
Port 6: 0000 off
Sent power off request
New status for hub 1-1, vendor 8087:0024, 6 ports
Port 1: 0000 off
Port 2: 0000 off
Port 3: 0000 off
Port 4: 0000 off
Port 5: 0000 off
Port 6: 0000 off
Then I plugged in my phone on one of the usb ports and it is still charging - the port is still powered. But the laptop is not recognizing that it is plugged in (no nautilus window pops up).
Does it make any sense to also include USB hubs known not to work? (I realize that such a list might quickly become longer than the working list, but it could be helpful for people thinking of taking a risk for a hub that might work...)
Was just testing uhubctl on the hubs I do have and found this fairly decent USB 1.1/2.0 one I picked up at a car-boot sale (Vendor:Product = 0409:0059
) seems to work:
It has a green port status LED for each of the 7 ports (two on front and five + USB B input port on rear) it also has a dual colour "Power" LED which is green if it is run from the upstream and "orange (external power & upstream connected)/yellow (external power only)" and a 5V 3.5A centre positive 2.5mm barrel connection for external power.
From the display from lsusb -t
it does appear to be two four-port units with one cascaded from the fourth port of the other. This is a little confusing though! How do I specify that I would want to change the power setting for a single device plugged into the fourth port of the second hub (to which I've plugged in a USB Thumb drive for testing purposes:
$ sudo ./uhubctl
Current status for hub 2-4.4, vendor 0409:0059, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0503 highspeed power enable connect
Current status for hub 2-4, vendor 0409:0059, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0503 highspeed power enable connect
Turning the power off to a port does turn the appropriate Port LED off if there is a device connected (and the device becomes inaccessible) and turning the power back on reverses that - so it does seem to behave as I'd expect...! 😀
Sadly Maplin no longer seem to sell this unit, but you might find one on an second hand auction site or elsewhere...
PC Engines APU2 and APU3 boards have a USB controller with power management. APU1 has a different controller, without power management.
Bus 002 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.
APU2 has one such controller, connected to its J13 mini-PCIEe slot suitable for 3G/LTE modems.
APU3 has two such controllers, connected to J14 and J15 mini-PCIE slots (the board supports two 3G/LTE modems)
uhubctl is able to disconnect and connect the modem in those slots.
Hi,
I came across your project from your answer on http://unix.stackexchange.com/a/321945/86440. I noticed that the license situation is confusing: your README and source headers mention GPLv2, but your LICENSE file is 2-clause BSD. Which license did you intend to use?
Thanks,
Stephen
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
I don't know if the reference is stable on the long term
But I tested this on https://www.amazon.fr/dp/B00E4J7PTM/ Amazon Basics USB 3.0 7 ports hub, and power on/off works fine.
It appears as two Via Hub with IDs 2109:2811
The sample I have has been bought in April 2015, so a refresh of the information would be useful.
Please add to list of supported hubs
Could you please add a git tag for the current version & make a release?
I would want to package your program for a linux distribution which only accepts packages that have a version number. (Maybe 1.8.0 - You currently have a C define for that)
Thanks
I have this camera device that doesn't shut down correctly due to poor drivers, so I've added a step to my script that uses uhubctl to power cycle the device before trying to connect to it. It basically looks like this:
sudo uhubctl -a cycle -d 0.5 -l 2-3 -p 3
sleep 1
connect_to_camera
Today after running this several times in succession (trying to fix an unrelated bug...) I saw this in dmesg
and the camera disappeared from lsusb
:
[ 346.825953] usb 2-3.3: USB disconnect, device number 10
[ 347.039389] usb 2-3.3: new high-speed USB device number 11 using xhci_hcd
[ 347.146838] usb 2-3.3: New USB device found, idVendor=1d27, idProduct=0600 [ 347.146841] usb 2-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 347.146843] usb 2-3.3: Product: Structure Sensor
[ 347.146845] usb 2-3.3: Manufacturer: Occipital
[ 347.146846] usb 2-3.3: SerialNumber: 27267
[ 382.921304] usb 2-3.3: USB disconnect, device number 11
[ 383.139235] usb 2-3.3: new high-speed USB device number 12 using xhci_hcd
[ 383.246682] usb 2-3.3: New USB device found, idVendor=1d27, idProduct=0600
[ 383.246686] usb 2-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 383.246688] usb 2-3.3: Product: Structure Sensor
[ 383.246689] usb 2-3.3: Manufacturer: Occipital
[ 383.246691] usb 2-3.3: SerialNumber: 27267
[ 400.072990] usb 2-3.3: USB disconnect, device number 12
[ 400.287152] usb 2-3.3: new high-speed USB device number 13 using xhci_hcd
[ 400.394373] usb 2-3.3: New USB device found, idVendor=1d27, idProduct=0600
[ 400.394376] usb 2-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 400.394378] usb 2-3.3: Product: Structure Sensor
[ 400.394380] usb 2-3.3: Manufacturer: Occipital
[ 400.394381] usb 2-3.3: SerialNumber: 27267
[ 2059.986028] perf interrupt took too long (2520 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
[ 2149.033317] usb 2-3.3: USB disconnect, device number 13
[ 2161.583398] hub_port_connect: 63 callbacks suppressed
[ 2161.583402] usb 2-3-port3: connect-debounce failed
Have you seen this before? Could it be related to uhubctl?
Is there any specific reason behind incompatibility of D-Link: DUB-H7 new Black edition ?
I have a bunch of these Hubs which I intent to reset.
Would appreciate any pointers to make this work.
First, THANK YOU!!!!!!! This worked straight out of the box once I got it to link and compile.
Once I was able to get brew to install libusb without any errors, I had to add /usr/local/include to CC and /usr/local/lib to LD:
CPPFLAGS = -v -g -O0 -I /usr/local/include/
LDFLAGS = -lusb-1.0 -L/usr/local/lib
PROGRAM = uhubctl
cc
clean:
rm -rf
Please add column to table USB 2.0, 3.0, or 3.1. This is a major purchase decision so you may want to sort by it.
Reference Use Linux to control power outlet via USB
Reference USB Per Port Power Switching
It's not working in Arch Linux. I don't have any hubs yet but two motherboard hubs claim to have the feature so seems to me the permissions error shouldn't be shown.
$ sudo uhubctl
No compatible smart hubs detected!
Run with -h to get usage info.
There were permission problems while accessing USB.
To fix this, run this tool as root using 'sudo uhubctl',
or add one or more udev rules like below
to file '/etc/udev/rules.d/52-usb.rules':
SUBSYSTEM=="usb", ATTR{idVendor}=="2001", MODE="0666"
then run 'sudo udevadm trigger --attr-match=subsystem=usb'
$ sudo lsusb -v 2>/dev/null | grep -e '^Bus\|Per-port power switching' | grep -B1 'Per-port power switching'
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Per-port power switching
--
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Per-port power switching
$ pacman -Q libusb
libusb 1.0.21-2
Hi,
came here looking for a solution to this problem:
https://unix.stackexchange.com/questions/414746/reset-usb-port-how-to-obtain-same-effect-of-physical-disconnection-or-poweroff
running uhubctl without any argument i get: No compatible smart hubs detected!
Running lsusb I get: vendor and product 1d6b:0002 which is not very useful. Motherboard is Asus UN45. Any hints? Thank you
I have been successfully using uhubctl for PPPS with a custom PCB containing the Cypress CY7C65632 4 port USB-HS hub IC. This implementation is strapped for PPPS and does not use an external config ROM to set custom VID:PID or other parameters. I would expect that other members of the Cypress HX2VL family will work the same.
The device ID is 04b4:6570 which is the Cypress assigned default.
This Amazon branded 4 port USB 3.0 hub is working with uhubctl provided that it is connected to a USB 2.0 host. Defaults for cycle work for PPPS and all ports.
But on a USB 3.0 host, "-a off" seems to reset ports but not power cycle them. I have tried various values of "-r N" and "-w N" and resetting the hub, host port, and replugging the hub with no effect when on a USB 3.0 host.
The chipset is VL811+, the HS device is 2109:2811, the SS device is 2109:8110, and the factory firmware is 90.74. Upgrading firmware to 90.95 through Plugable's VL811+ updater (https://plugable.com/drivers/hubfirmware/) makes no difference in behavior.
Hi very nice software.
I purchased the Amazon basics 7 port hub as recommended and when I run ./uhubctl
as root the Amazon hub is displayed twice.
Current status for hub 3-1.5.3, vendor 2109:2811, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0100 power
Current status for hub 3-1.5, vendor 2109:2811, 4 ports
Port 1: 0103 power enable connect [0801:0013 Mag-Tek USB Insert Reader ?J??:?]
Port 2: 0100 power
Port 3: 0507 highspeed power suspend enable connect [2109:2811 VIA Labs, Inc. USB2.0 Hub ]
Port 4: 0100 power
If I try to control ports by turning them off, it works. However when I try to turn them back on or cycle the power, the software hangs after sending the power off command. I am suspecting the problem is the fact that the hub is being detected twice.
I am running Debian Jesse 8.7 (3.16 kernel)
Any ideas?
Thanks!
Have not tested, but website explicitly claims support for port power switching
Also not tested. Not clear it is controlled by or standard PPPS interface, or through separate management interface.
Model: CP-H420P
USB 2.0 4-Port Hub with Power Adapter
Current status for hub 20-1, vendor 0409:0059, 4 ports
Port 1: 0100 power
Port 2: 0100 power
Port 3: 0100 power
Port 4: 0100 power
As most USB devices are incompatible, maintaining a list of incompatible devices, and suggesting people to report them would also be useful. I could help with initializing it.
This would help people limit the number of devices to buy and test before finding one which works (something I am doing at the moment).
A --report
option dumping ids of all found hubs (smart and classic) could also be something useful to develop and ask people to add output to issues when reporting. I could also help with that.
Hello,
I've compiled in a Linux Mint 17, it generated binary and worked fine, but:
# make
cc -g -O0 -Wall -Wextra uhubctl.c -o uhubctl -Wl,-z,relro -lusb-1.0
uhubctl.c: In function ‘usb_find_hubs’:
uhubctl.c:345:17: warning: ‘libusb_get_port_path’ is deprecated (declared at /usr/include/libusb-1.0/libusb.h:1358): Use libusb_get_port_numbers instead [-Wdeprecated-declarations]
int pcount = libusb_get_port_path(NULL, dev, port_numbers, MAX_HUB_CHAIN);
I guess there are some switch or mosfet etc. How does it usially look on compatible pcbs?
uhubctl doesn't work on Debian 9.1:
root@asrock:/opt/build/uhubctl# ./uhubctl
No compatible smart hubs detected!
Run with -h to get usage info.
There were permission problems while accessing USB.
To fix this, run this tool as root using 'sudo uhubctl',
or add one or more udev rules like below
to file '/etc/udev/rules.d/52-usb.rules':
SUBSYSTEM=="usb", ATTR{idVendor}=="2001", MODE="0666"
then run 'sudo udevadm trigger --attr-match=subsystem=usb'
Anyone know if raspberry pi is supported? any version? 3? Figured since it has 4 ports it is almost like a usb hub?
I bought an AmazonBasics 7 Port USB 3.0 Hub a few weeks ago, as listed in top of the compatibility list, and it is not compatible.
It is listed as 2109:2811, as in the compatibility list (ASIN B00E4J7PTM).
It does say it can switch power per port but does not do it.
Hi
The back sticker of my hub says: DUB-H7. H/W Ver: A3.
I have an issue with silver edition of this hub. First of all, when I apply 5V power from an attached power supply, the hub seems to not work. When I plug the power off, devices are suddenly detected fine. (?) In other words, it seems like the hub is self-powered? Wondering if you use it the same way.
$ uhubctl
No compatible smart hubs detected!
Run with -h to get usage info.
The same also when I plug the D-link in.
USB hierarchy on my Mac:
USB:
USB 3.0 Bus:
Capacity: 2.02 GB (2,021,654,528 bytes)
Removable Media: Yes
BSD Name: disk2
Host Controller Driver: AppleUSBXHCIWPT
Partition Map Type: MBR (Master Boot Record)
PCI Device ID: 0x9cb1
PCI Revision ID: 0x0003
PCI Vendor ID: 0x8086
Volumes:
6509990502:
Capacity: 2.02 GB (2,021,538,304 bytes)
Available: 1.23 GB (1,227,030,528 bytes)
Writable: Yes
File System: MS-DOS FAT16
BSD Name: disk2s1
Mount Point: /Volumes/6509990502
Content: DOS_FAT_16
Card Reader:
Product ID: 0x8406
Vendor ID: 0x05ac (Apple Inc.)
Version: 8.20
Serial Number: 000000000820
Speed: Up to 5 Gb/sec
Manufacturer: Apple
Location ID: 0x14600000 / 23
Current Available (mA): 1800
Current Required (mA): 224
Extra Operating Current (mA): 0
Capacity: 2.02 GB (2,021,654,528 bytes)
Removable Media: Yes
Detachable Drive: Yes
BSD Name: disk2
Built-In: Yes
Partition Map Type: MBR (Master Boot Record)
Volumes:
6509990502:
Capacity: 2.02 GB (2,021,538,304 bytes)
Available: 1.23 GB (1,227,030,528 bytes)
Writable: Yes
File System: MS-DOS FAT16
BSD Name: disk2s1
Mount Point: /Volumes/6509990502
Content: DOS_FAT_16
BRCM20702 Hub:
Product ID: 0x4500
Vendor ID: 0x0a5c (Broadcom Corp.)
Version: 1.00
Speed: Up to 12 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x14300000 / 2
Current Available (mA): 1000
Current Required (mA): 94
Extra Operating Current (mA): 0
Built-In: Yes
Bluetooth USB Host Controller:
Product ID: 0x828f
Vendor ID: 0x05ac (Apple Inc.)
Version: 1.18
Speed: Up to 12 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x14330000 / 5
Current Available (mA): 1000
Current Required (mA): 0
Extra Operating Current (mA): 0
Built-In: Yes
Hub:
Product ID: 0x1521
Vendor ID: 0x04cc (Philips Semiconductors)
Version: 2.00
Speed: Up to 480 Mb/sec
Location ID: 0x14200000 / 26
Current Available (mA): 1000
Current Required (mA): 0
Extra Operating Current (mA): 0
Nexus 7:
Product ID: 0x4ee2
Vendor ID: 0x18d1 (Google Inc.)
Version: 2.28
Serial Number: 0a83b2b0
Speed: Up to 480 Mb/sec
Manufacturer: asus
Location ID: 0x14250000 / 28
Current Available (mA): 1000
Current Required (mA): 500
Extra Operating Current (mA): 0
iPhone:
Product ID: 0x12a8
Vendor ID: 0x05ac (Apple Inc.)
Version: 6.01
Serial Number: ba8b31ea427d8730fa2412906d9df1f6e90a1d94
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x14210000 / 27
Current Available (mA): 1000
Current Required (mA): 500
Extra Operating Current (mA): 0
Sleep current (mA): 500
USB 2.0 Bus:
Host Controller Driver: AppleUSBEHCIPI7C9X440SL
PCI Device ID: 0x400f
PCI Revision ID: 0x0003
PCI Vendor ID: 0x12d8
Hub:
Product ID: 0x9127
Vendor ID: 0x05ac (Apple Inc.)
Version: 1.00
Speed: Up to 480 Mb/sec
Location ID: 0x40100000 / 1
Current Available (mA): 1000
Current Required (mA): 100
Extra Operating Current (mA): 0
Built-In: Yes
FaceTime HD Camera (Display):
Product ID: 0x1112
Vendor ID: 0x05ac (Apple Inc.)
Version: 71.60
Serial Number: CC2E9T04VPDJ9FLP
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x40150000 / 7
Current Available (mA): 1000
Current Required (mA): 500
Extra Operating Current (mA): 0
Built-In: Yes
Apple Thunderbolt Display:
Product ID: 0x9227
Vendor ID: 0x05ac (Apple Inc.)
Version: 1.39
Serial Number: 182A0933
Speed: Up to 12 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x40170000 / 3
Current Available (mA): 1000
Current Required (mA): 2
Extra Operating Current (mA): 0
Built-In: Yes
Display Audio:
Product ID: 0x1107
Vendor ID: 0x05ac (Apple Inc.)
Version: 2.09
Serial Number: 182A0933
Speed: Up to 12 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x40140000 / 6
Current Available (mA): 1000
Current Required (mA): 2
Extra Operating Current (mA): 0
Built-In: Yes
An Inland brand (www.ipsgproducts.com) model UPH341 (Micro Center SKU 902064) supports per-port power switching. Inland is Micro Center's house brand.
This is a 4-port USB 3.0 bus-powered hub. It identifies as 2109:2813 VIA Labs, Inc. Some devices play nice and power off with a single command. Had a few that needed multiple repeats (3 with 200 ms waits).
This is a US $11 hub.
Hi team,
Really appreciate the effort that went into this. I previously tried the anker model without success and that has been removed. But today I tried both the Amazon Basic HU3770V1, 7 Port USB 3.0 Hub with 12V/3A Power Adapter item, and the Pluggable USB2-HUB10S. The Amazon Basic USB had the same issue as the anker. The pluggable usb hub gets a "No compatible smart hubs detected!" when running from a mac.
Can anyone recommend a confirmed working usb hub? Would really appreciate it as I don't want to have to keep buying and trying them all from the list.
I couldn't find your email address, so writing here.
This one works:
https://www.aliexpress.com/item/Universal-7-Port-USB-3-0-Hub-With-On-Off-Switch-EU-US-UK-AC-Power/32627558537.html
More details: https://plus.google.com/+StanislavSinyagin/posts/4fFRBVZppuQ
Hello,
I'm a newbie with uhubctl
but I've made some tests with this powered hub, which seems to support correctly per-port power switching. However, only hub-ctrl.c
recognizes it: using it I was able to turn on/off each port but no way to find it in uhubctl
. I was wondering where the problem is since uhubctl
was originally inspired by hub-ctrl.c
.
Moreover, I found that this hub behaves in a strange way: it does not turn off the power to his slave devices (speakers or USB chargers will continue working) but, instead, it makes them "sleep" (I can still find them in lsusb
, not in other applications). From the hub-ctrl.c
readme:
This only works on USB hubs that have the hardware necessary to allow software controlled power switching.
So, how is power switching carried out? Slave devices, the hub's hardware/software or operating system? Since power is never turned off, why not all the hubs support it (like my laptop's root hubs)? Or, maybe, due to my hub hardware incompatibility, hub-ctrl.c
is just disconnecting them from the operating system.
I verified this behaviour with several USB sticks, a camera and a phone and I made a map of all the ports, if it can help.
Kind regards,
SB.
Update: same behaviour with a Manhattan USB 2.04-port mini hub, model no. 160605
Checked working correctly (per port power switching).
Manufacturer is Sunix. Unfortunately it is a discontinued product, but still, the information may be relevant for some people.
Result of lsusb :
Bus 003 Device 021: ID 0409:0058 NEC Corp. HighSpeed Hub
Result of lsusb -v :
Bus 003 Device 021: ID 0409:0058 NEC Corp. HighSpeed Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x0409 NEC Corp.
idProduct 0x0058 HighSpeed Hub
bcdDevice 1.00
iManufacturer 1 NEC Corporation
iProduct 2 USB2.0 Hub Controller
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x00a9
Per-port power switching
Per-port overcurrent protection
TT think time 16 FS bits
Port indicators
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 100 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.