Closed stefan-sherwood closed 1 year ago
(Meant to include this in original report)
The device shows as two devices (2/2 and 1/3).
$ lsusb
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The other device also says it supports per-port power switching.
$ lsusb -v -D /dev/bus/usb/001/003
Device: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 2 TT per port
bMaxPacketSize0 64
idVendor 0x0bda Realtek Semiconductor Corp.
idProduct 0x5411 RTS5411 Hub
bcdDevice 1.01
iManufacturer 1 Generic
iProduct 2 USB2.1 Hub
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 1 Single TT
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
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 2 TT per port
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 5
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.0000
Port 2: 0000.0000
Port 3: 0000.0000
Port 4: 0000.0000
Port 5: 0000.0000
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x002a
bNumDeviceCaps 3
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x0000f41e
BESL Link Power Management (LPM) Supported
BESL value 1024 us
Deep BESL value 61440 us
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 1023 micro seconds
Container ID Device Capability:
bLength 20
bDescriptorType 16
bDevCapabilityType 4
bReserved 0
ContainerID {20b9cde5-7039-e011-a935-0002a5d5c51b}
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered
Make sure you have uhubctl version 2.4.0 or later. Any previous version will not work correctly on RPi4. Check version with"
uhubctl -v
Also note that permissions don't really matter if you use sudo
Closing for inactivity. @stefan-sherwood, please reopen if uhubctl version 2.4.0 or later doesn't work with Raspberry Pi 4B.
I updated and compiled to the latest version of uhubctl.
$ sudo ./uhubctl -v
2.5.0-12-g4c235868
The behavior hasn't changed: lsusb
reports per-port power switching, uhubctl
reports that it's not supported, identical messages to previous report.
I can't reopen this report since I'm not the one who closed it.
Your external USB3 hub 2-1
is connected to RPi4B USB3 onboard hub 2
,
and its USB2 counterpart is 1-1.1
, connected to RPi4B USB2 onboard hub 1-1
.
Your hub shows as this on USB3:
[0bda:0411 Generic USB3.2 Hub, USB 3.20, 4 ports, ppps]
and as that on USB2:
[0bda:5411 Generic USB2.1 Hub, USB 2.10, 5 ports, ppps]
Notice port count does not match: 4 ports on USB3 vs 5 ports on USB2.
This discrepancy confuses uhubctl USB duality matching, and causes error message you have observed.
There are few solutions to this:
-e
switch to bypass duality matching:
uhubctl -e -l 2-1 -a off
uhubctl -e -l 1-1.1 -a off
-e
switch, I don't think it will work.I guess I'm back to the drawing board searching for a modern high speed USB hub that supports per-port power switching.
Thanks for your help.
For RPi4B I highly recommend getting UUGear Mega4 - it was specifically designed to work with RPi4 and to support uhubctl
by design. It supports stacking too, all within RPi4 physical contstraints. And it is not that expensive.
Might I suggest you investigate the UUGear Mega4 product - they have worked with this project to ensure it works on their produce - as you can see by visiting #316 .
Disclosure: I and @mvp both received a free sample of this unit! :innocent:
Blimey, a sim-post for the same thing!
I am using a 4-port USB 3.2 Gen1 hub made by SmartQ Inc. plugged into a USB 3 port on a Raspberry Pi 4B running Raspberry Pi OS 11 (bullseye). I have enabled permissions by copying https://github.com/mvp/uhubctl/blob/master/udev/rules.d/52-usb.rules unmodified into
/etc/udev/rules.d/52-usb.rules
and rebooting.lsusb reports it supports per-port power switching:
The device is listed as hub 2-1:
Yet when I try to turn the ports off I get this error:
Am I missing something?