Power cycle Usb Ports

Introduce yourself to us and other members here, or share your own product reviews, suggestions, and tips and tricks of using QNAP products.
Post Reply
jchan
Getting the hang of things
Posts: 77
Joined: Fri Feb 19, 2010 1:58 am
Location: Stockholm, Sweden

Power cycle Usb Ports

Post by jchan » Sun Mar 26, 2017 3:12 pm

Hello,

I'm trying to find out if it's possible to power cycle an USB port of my QNAP 269L through terminal, QPKG or some kind of script?

Let me know!

User avatar
OneCD
Ask me anything
Posts: 7541
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Power cycle Usb Ports

Post by OneCD » Sun Mar 26, 2017 4:40 pm

I see you've asked about this before: viewtopic.php?f=73&t=127012&p=575051#p575051

Can you explain why your device needs to be power-cycled? Maybe there's another way to solve your problem. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

jchan
Getting the hang of things
Posts: 77
Joined: Fri Feb 19, 2010 1:58 am
Location: Stockholm, Sweden

Re: Power cycle Usb Ports

Post by jchan » Sun Mar 26, 2017 5:33 pm

I use an USB dongle iLok for Pro Tools with VirtualHere.

I work from home and sometimes in my studio and it's a pain when I forget the iLok, I can't believe I have to go back all the way home just to get it :)

VirtualHere works over IP but you have to unplug and replug it for use with another computer (sharing protection).

If this does not work I will just try to find a HomeKit enabled power switch or something to simulate a physical removal. If possible at all.

/J

User avatar
OneCD
Ask me anything
Posts: 7541
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Power cycle Usb Ports

Post by OneCD » Sun Mar 26, 2017 6:04 pm

This solution was posted by @ssokolow and is shown here: http://askubuntu.com/a/61165/124347

Works fine on my TS-569 Pro with QTS 4.2.4 #20170313. ;)

To fill in the blanks, here's what I did:

  1. Cleared dmesg log:

    Code: Select all

    dmesg -c > /dev/null

  2. Plugged in my USB thumb drive,

  3. Ran dmesg again to find my device's bus ID:

    Code: Select all

    dmesg | grep authorized

    ... which returned:

    Code: Select all

    [21595.957562] usb 2-1: authorized to connect

    So, my device USB bus ID is 2-1.

  4. Set that device as 'unauthorized':

    Code: Select all

    echo 0 > /sys/bus/usb/devices/2-1/authorized

  5. Then set it again as 'authorized':

    Code: Select all

    echo 1 > /sys/bus/usb/devices/2-1/authorized

This effectively disconnected then reconnected the device. But YMMV.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

jchan
Getting the hang of things
Posts: 77
Joined: Fri Feb 19, 2010 1:58 am
Location: Stockholm, Sweden

Re: Power cycle Usb Ports

Post by jchan » Sun Mar 26, 2017 7:22 pm

Thanks, though it doesn't seem to trick the iLok to have been disconnected. Only way would be if software can power off the specified port and then back on.

Is this possible..?

I'm thinking a powered usb-hub connected to a remotely controlled power outlet wouldn't work either as it gets power from the usb-port itself even if the hub can be powered down.

Hmmm.

Would have been great with a solution to this.

More suggestions?

Flotsch123
Know my way around
Posts: 136
Joined: Sun Mar 12, 2017 9:03 pm

Re: Power cycle Usb Ports

Post by Flotsch123 » Thu Apr 30, 2020 4:25 pm

hi,
i have to bring this topic up again as i am struggling with a similar scenario:
HBS Backup jobs on a few external 2,5 hdd`s, that are conencted to the NAs via active usb-c-hub. this usb-hub is plugged into an ip-plug-socket. my plan was:
- ip-plug-socket turns power on for the usb-hub.
- HBS backup job runs and unmounts external hdd`s after completed.
- ip-plug-socket tunrs power for usb-hub off.
- 1 week later, ip-plug-socket turns power for usb-hub on
- HBS backup job ....

Everything is working until "one week later", when usb-hub is pwered on again. The external hhd`s are not mounting, unless i physically plug them out and in again.
So i think that this solution here is what i need. But I dont understand @OneCD`s post really. I cannot see the connection of the link he posts and his actions with "authorized". isnt the command

Code: Select all

$ lsusb 
enough to find out?

executing this command on my nas, gives this:
[~] # lsusb
Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 1c04:0015 QNAP System Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
[~] #

My Nas has 5 usb ports. at one, there is the USV, at another there is a qnap-usp-ethernet-adapter, 2 are blank and at the last is the usb-hub. so i guess that "Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc." mus tbe the usb hub. Not?

So please, can @OneCD or someone else explain this again. I am no Linux pro but i hope to manage this.
And: as i have 5 hdd`s connected via the usb-hub and not jus t1 device, how does this impact on the code? I guess no, because it is just the usb por that counts, and it is regardless what is plugged in there (a single device or a hub with multiple devices).
my plan is to make a cronjob that executes a script that resets the specific usb port (where the hub is plugged in) after the hbs backup job is finished.

thanks for help.

User avatar
OneCD
Ask me anything
Posts: 7541
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Power cycle Usb Ports

Post by OneCD » Thu Apr 30, 2020 5:19 pm

Flotsch123 wrote:
Thu Apr 30, 2020 4:25 pm
So i think that this solution here is what i need. But I dont understand @OneCD`s post really. I cannot see the connection of the link he posts and his actions with "authorized".
It's in the first part of that post on AskUbuntu:
ssokolow wrote:

Code: Select all

sudo sh -c "echo 0 > /sys/bus/usb/devices/1-4.6/authorized"
sudo sh -c "echo 1 > /sys/bus/usb/devices/1-4.6/authorized"
Flotsch123 wrote:
Thu Apr 30, 2020 4:25 pm
isnt the command

Code: Select all

$ lsusb 
enough to find out?
Only if 'lsusb' is available in your QTS version, and you're able to clearly distinguish between each device in the list. If not, then checking the 'dmesg' output is one way to ensure you target the correct device.
Flotsch123 wrote:
Thu Apr 30, 2020 4:25 pm
So please, can @OneCD or someone else explain this again. I am no Linux pro but i hope to manage this.
I was virtually copy-pasting from AskUbuntu (with some slight expansion for clarity) and tested it on QTS as it was 3 years ago. But this isn't my method, and I'm unable to support it. :(

So, if you want to experiment with it: be my guest. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

Flotsch123
Know my way around
Posts: 136
Joined: Sun Mar 12, 2017 9:03 pm

Re: Power cycle Usb Ports

Post by Flotsch123 » Thu Apr 30, 2020 6:00 pm

Ok.
What i dont get:
In the ubuntu thread theee seem to be 2 different ways to sove the issue:
Answer 62 and answer 127. Please have a look.
What should i try? I am planning to script this with cronjob.

Flotsch123
Know my way around
Posts: 136
Joined: Sun Mar 12, 2017 9:03 pm

Re: Power cycle Usb Ports

Post by Flotsch123 » Fri May 01, 2020 6:20 pm

quick update:

Your advice is working, OneCD. the authorized-commands are working like a charm. i can mount a unmounted drive from the console. now i will try to put this in a script and make a entry to crontab.

update:
script is finished and i can run it vfrom shell fine. i added it to crontab and tomorrow i will see if everything is executed.

@OneCD
Thank you so much for your help and your post 3 years ago). That saved my a**!

Flotsch123
Know my way around
Posts: 136
Joined: Sun Mar 12, 2017 9:03 pm

Re: Power cycle Usb Ports

Post by Flotsch123 » Sat May 02, 2020 6:41 am

hi again!

unfortunatelly, i have a problem again.

my script is:

Code: Select all

#!/bin/sh

# Backup-Festplatten neu mounten

# mount filme1-b
echo 0 > /sys/bus/usb/devices/2-2.4.4.4/authorized
echo 1 > /sys/bus/usb/devices/2-2.4.4.4/authorized

# mount filme2-b 
echo 0 > /sys/bus/usb/devices/2-2.4.4.1/authorized
echo 1 > /sys/bus/usb/devices/2-2.4.4.1/authorized

# mount 3d-filme1-b
echo 0 > /sys/bus/usb/devices/2-2.4.4.2/authorized
echo 1 > /sys/bus/usb/devices/2-2.4.4.2/authorized

# mount serien1-b
echo 0 > /sys/bus/usb/devices/2-2.4.4.3/authorized
echo 1 > /sys/bus/usb/devices/2-2.4.4.3/authorized

# mount lena1-b
echo 0 > /sys/bus/usb/devices/2-2.4.1/authorized
echo 1 > /sys/bus/usb/devices/2-2.4.1/authorized
the script is working, as long as the active usb hub (where the external hdd`s are connected to) is not seperated from power.
So this is working:
- unmount external hdd`s manually via webgui or after HBS3 backup job finished and unmounts hdd`s.
- hdd`s still get power from active usb-hub
- run script
- external hdd`s are mounted again

This is NOT working:
- unmount external hdd`s manually via webgui or after HBS3 backup job finished and unmounts hdd`s.
- disconnect power from the active usb hub via ip-power-socket-device
- hdd`s are off
- reconnect power to the active usb-hub
- hdd`s get power again
- run script
- external hdd`s are NOT mounted again

The whole idea was that the external bachup-hdd`s are off between backup-jobs and i do not need to manually plug out and in again.

Maybe this helps to find a solution:
this is, what

Code: Select all

lsusb
shows with usb hub and external hhd`s attached:

Code: Select all

[~] # lsusb
Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc.
Bus 001 Device 010: ID 2109:2817
Bus 001 Device 009: ID 2109:2817
Bus 001 Device 008: ID 2109:2817
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 016: ID 152d:0539 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 002 Device 018: ID 0bc2:3322 Seagate RSS LLC
Bus 002 Device 013: ID 1058:25a2 Western Digital Technologies, Inc.
Bus 002 Device 015: ID 0bc2:231a Seagate RSS LLC
Bus 002 Device 002: ID 1c04:0015 QNAP System Inc.
Bus 002 Device 017: ID 1058:25a1 Western Digital Technologies, Inc.
Bus 002 Device 014: ID 2109:0817
Bus 002 Device 012: ID 2109:0817
Bus 002 Device 011: ID 2109:0817
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
my external hdd`s are:
Bus 002 Device 016: ID 152d:0539 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 002 Device 018: ID 0bc2:3322 Seagate RSS LLC
Bus 002 Device 013: ID 1058:25a2 Western Digital Technologies, Inc.
Bus 002 Device 015: ID 0bc2:231a Seagate RSS LLC
Bus 002 Device 017: ID 1058:25a1 Western Digital Technologies, Inc.

Without the usb hub (and hdd`s of course attached,

Code: Select all

lsusb
shows:

Code: Select all

Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 1c04:0015 QNAP System Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
usb-hub attached but no hdd`s attached to it:

Code: Select all

Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc.
Bus 001 Device 013: ID 2109:2817
Bus 001 Device 012: ID 2109:2817
Bus 001 Device 011: ID 2109:2817
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 021: ID 2109:0817
Bus 002 Device 020: ID 2109:0817
Bus 002 Device 019: ID 2109:0817
Bus 002 Device 002: ID 1c04:0015 QNAP System Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
my conclusion is, that
Bus 001 Device 010: ID 2109:2817
Bus 001 Device 009: ID 2109:2817
Bus 001 Device 008: ID 2109:2817
Bus 002 Device 014: ID 2109:0817
Bus 002 Device 012: ID 2109:0817
Bus 002 Device 011: ID 2109:0817
comes from the ecternal usb-hub itself. It is a 10port hub:
https://www.amazon.com/-/us/AmazonBasic ... 392&sr=8-9

I dont understand why a 10port hub gives 6 entries as shown above. It seems not be that simple as every line represents a port of the switch as it would be 10 entries if this was true.


here is the result of

Code: Select all

lsusb -v
with usb-hub and hdds attached:

Code: Select all

[~] # lsusb -v

Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x051d American Power Conversion
  idProduct          0x0002 Uninterruptible Power Supply
  bcdDevice            0.90
  iManufacturer           1 American Power Conversion
  iProduct                2 Back-UPS RS 900G FW:879.L4 .I USB FW:L4
  iSerial                 3 3B1718X05403
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength    1134
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval             100
Device Status:     0x0002
  (Bus Powered)
  Remote Wakeup Enabled

Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1005 Apacer Technology, Inc.
  idProduct          0xb155
  bcdDevice            1.00
  iManufacturer           1
  iProduct                2 USB DISK MODULE
  iSerial                 3 19009572DECC1F25
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              300mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 013: ID 2109:2817
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x2109
  idProduct          0x2817
  bcdDevice           90.23
  iManufacturer           1 VIA Labs, Inc.
  iProduct                2 USB2.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    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 Unused
      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 Unused
      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             4
  wHubCharacteristic 0x00e9
    Per-port power switching
    Per-port overcurrent protection
    TT think time 32 FS bits
    Port indicators
  bPwrOn2PwrGood      175 * 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.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 012: ID 2109:2817
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x2109
  idProduct          0x2817
  bcdDevice           90.23
  iManufacturer           1 VIA Labs, Inc.
  iProduct                2 USB2.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    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 Unused
      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 Unused
      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             4
  wHubCharacteristic 0x00e9
    Per-port power switching
    Per-port overcurrent protection
    TT think time 32 FS bits
    Port indicators
  bPwrOn2PwrGood      175 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x10
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0507 highspeed power suspend enable connect
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 011: ID 2109:2817
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x2109
  idProduct          0x2817
  bcdDevice            3.64
  iManufacturer           1 VIA Labs, Inc.
  iProduct                2 USB2.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    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 Unused
      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 Unused
      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             4
  wHubCharacteristic 0x00e9
    Per-port power switching
    Per-port overcurrent protection
    TT think time 32 FS bits
    Port indicators
  bPwrOn2PwrGood      175 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x10
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0507 highspeed power suspend enable connect
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            4.14
  iManufacturer           3 Linux 4.14.24-qnap xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:00:14.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    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 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     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength              13
  bDescriptorType      41
  nNbrPorts            16
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00 0x00 0x00
  PortPwrCtrlMask    0xff 0xff 0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0100 power
   Port 5: 0000.0507 highspeed power suspend enable connect
   Port 6: 0000.0103 power enable connect
   Port 7: 0000.0100 power
   Port 8: 0000.0100 power
   Port 9: 0000.0100 power
   Port 10: 0000.0100 power
   Port 11: 0000.0100 power
   Port 12: 0000.0100 power
   Port 13: 0000.0100 power
   Port 14: 0000.0100 power
   Port 15: 0000.0100 power
   Port 16: 0000.0100 power
Device Status:     0x0001
  Self Powered

Bus 002 Device 025: ID 152d:0539 JMicron Technology Corp. / JMicron USA Technology Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
  idProduct          0x0539
  bcdDevice            2.02
  iManufacturer          10 Intenso
  iProduct               11 External USB 3.0
  iSerial                 3 201106080531B
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           44
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
Device Status:     0x0001
  Self Powered

Bus 002 Device 023: ID 0bc2:3322 Seagate RSS LLC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x0bc2 Seagate RSS LLC
  idProduct          0x3322
  bcdDevice            1.00
  iManufacturer           2 Seagate
  iProduct                3 Expansion Desk
  iSerial                 1 NA8FEQW4
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          121
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 05 00 00
        INTERFACE CLASS:  04 24 03 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 05 00 00
        INTERFACE CLASS:  04 24 04 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 05 00 00
        INTERFACE CLASS:  04 24 02 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 00 00 00 00
        INTERFACE CLASS:  04 24 01 00
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0009
  Self Powered

Bus 002 Device 027: ID 1058:25a2 Western Digital Technologies, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x1058 Western Digital Technologies, Inc.
  idProduct          0x25a2
  bcdDevice           10.19
  iManufacturer           1 Western Digital
  iProduct                2 Elements 25A2
  iSerial                 3 575838314136373536433146
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           44
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              224mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
Device Status:     0x0008
  (Bus Powered)

Bus 002 Device 024: ID 0bc2:231a Seagate RSS LLC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x0bc2 Seagate RSS LLC
  idProduct          0x231a
  bcdDevice            7.08
  iManufacturer           1 Seagate
  iProduct                2 Expansion
  iSerial                 3 NA8JT74K
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          121
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              224mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 00 00 00 00
        INTERFACE CLASS:  04 24 01 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 00 05 00 00
        INTERFACE CLASS:  04 24 02 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 05 00 00
        INTERFACE CLASS:  04 24 03 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 07 05 00 00
        INTERFACE CLASS:  04 24 04 00
Device Status:     0x0008
  (Bus Powered)

Bus 002 Device 002: ID 1c04:0015 QNAP System Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.20
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x1c04 QNAP System Inc.
  idProduct          0x0015
  bcdDevice            1.01
  iManufacturer           1 QNAP
  iProduct                2 QNAP QNA-UC5G1T USB to 5GbE Adapter
  iSerial                 3 99I03077
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           57
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 LAN
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              224mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol      0
      iInterface              5 ethernet
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval              11
        UNRECOGNIZED:  06 30 00 00 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 03 00 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 03 00 00 00
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           98
    bNumInterfaces          2
    bConfigurationValue     2
    iConfiguration          8 CDC LAN
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              224mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0
      iInterface              9 CDC Ctrl
      CDC Header:
        bcdCDC               1.10
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC Ethernet:
        iMacAddress                     12 245EBE429580
        bmEthernetStatistics    0x00000000
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0000
        bNumberPowerFilters              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval              11
        UNRECOGNIZED:  06 30 00 00 08 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface             10 CDC Data 0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface             11 CDC Data 1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 03 00 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 03 00 00 00
Device Status:     0x001d
  Self Powered
  Test Mode

Bus 002 Device 026: ID 1058:25a1 Western Digital Technologies, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x1058 Western Digital Technologies, Inc.
  idProduct          0x25a1
  bcdDevice           10.12
  iManufacturer           2 Western Digital
  iProduct                3 Elements 25A1
  iSerial                 1 575831314438354450414839
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           44
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              224mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 0 bytes
        bInterval               0
        UNRECOGNIZED:  06 30 0f 00 00 00
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0008
  (Bus Powered)

Bus 002 Device 022: ID 2109:0817
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         3
  bMaxPacketSize0         9
  idVendor           0x2109
  idProduct          0x0817
  bcdDevice           90.23
  iManufacturer           1 VIA Labs, Inc.
  iProduct                2 USB3.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           31
    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 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           19
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval               8
        UNRECOGNIZED:  06 30 00 00 02 00
can't get hub descriptor: Broken pipe
Device Status:     0x0009
  Self Powered

Bus 002 Device 020: ID 2109:0817
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         3
  bMaxPacketSize0         9
  idVendor           0x2109
  idProduct          0x0817
  bcdDevice           90.23
  iManufacturer           1 VIA Labs, Inc.
  iProduct                2 USB3.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           31
    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 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           19
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval               8
        UNRECOGNIZED:  06 30 00 00 02 00
can't get hub descriptor: Broken pipe
Device Status:     0x000d
  Self Powered
  Test Mode

Bus 002 Device 019: ID 2109:0817
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         3
  bMaxPacketSize0         9
  idVendor           0x2109
  idProduct          0x0817
  bcdDevice            3.64
  iManufacturer           1 VIA Labs, Inc.
  iProduct                2 USB3.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           31
    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 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           19
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval               8
        UNRECOGNIZED:  06 30 00 00 02 00
can't get hub descriptor: Broken pipe
Device Status:     0x000d
  Self Powered
  Test Mode

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         3
  bMaxPacketSize0         9
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0003 3.0 root hub
  bcdDevice            4.14
  iManufacturer           3 Linux 4.14.24-qnap xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:00:14.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           31
    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 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     0x0004  1x 4 bytes
        bInterval              12
        UNRECOGNIZED:  06 30 00 00 02 00
can't get hub descriptor: Broken pipe
Device Status:     0x0001
  Self Powered
[~] #


My idea is that i can somehow not only reset the external hhd`s as i already do in my script, but add to my script in the beginning code to reset the usb hub itself. Because, when i unplug the usb connection between nas and usb hub, and reconnect, the hdds are mounting again. So need a solution that has the same outcome like disconnecting and reconencting the usb-hub itself. maybe a reset of the hdd´s is not needed anymore then.


A pic, what is physically connected to the NAS (TVS-872N):
rear-view.jpg
there is nothing connected to the front usb.

Hope, OneCD or some other expert can help.

update:
a totally different approach came to my mind.
Instead of "authorize" command, i could mount the external hdds with mountpoint in /share/external (this would work because i can see the device with lsusb, but it is not mounted automatically). but in this case i must delete the director created for mounting afterwards. When the system automatically mounts a external defice, the directory created is DEV... in /share7external and it dissapears when the hdd is unmounted. is it possible to copy this process in a script?
You do not have the required permissions to view the files attached to this post.

Flotsch123
Know my way around
Posts: 136
Joined: Sun Mar 12, 2017 9:03 pm

Re: Power cycle Usb Ports

Post by Flotsch123 » Sun May 03, 2020 2:55 am

I tried a new approach: unbinding and binding the specific usb port the testing-hhd is attached to. In my opinion (maybe I am wrong) this is as i would unplug and plug the device physically.

port is 2-2.4.4.1

i run from ssh the commands:

Code: Select all

echo '2-2.4.4.1' > /sys/bus/usb/drivers/usb/unbind
echo '2-2.4.4.1' > /sys/bus/usb/drivers/usb/bind
the commands are executed but nothing happens. Aso dmesg shows nothing happening.
What is wrong with that? make sit a differnce that th eport is on a external usb-hub? dont think so.

Post Reply

Return to “Users' Corner”