powering off USB hubs / ports

Mike Tancsa mike at sentex.net
Sat May 18 02:13:28 UTC 2013


We used to use a DLINK hub at remote sites that we could do a
usbconfig -d 1.2 power_off;sleep 5;usbconfig -d 1.2 power_on

to power cycle the ports and reset a hung device (typically 3G sticks).
However, the manufacturer (DLINK) seems to have "improved" the old hub
to something totally physically different (same product skew).  Now,
power_off and power_on simply seems to disconnect the device from the
server, but does not actually drop power to the port and reset a hung
USB device.

Is there any way to find out if this new USB hub actually supports a
power off command via some other method ?  The old hub looks like

ugen1.2: <product 0x0024 vendor 0x8087> at usbus1, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=SAVE (0mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0009
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0001
  bMaxPacketSize0 = 0x0040
  idVendor = 0x8087
  idProduct = 0x0024
  bcdDevice = 0x0000
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0000  <no string>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

The new one shows up as 2 hub devices.
ugen1.3: <USB2.0 Hub vendor 0x05e3> at usbus1, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0009
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0002
  bMaxPacketSize0 = 0x0040
  idVendor = 0x05e3
  idProduct = 0x0610
  bcdDevice = 0x7732
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0001  <USB2.0 Hub>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

ugen1.4: <USB2.0 Hub vendor 0x05e3> at usbus1, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0009
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0002
  bMaxPacketSize0 = 0x0040
  idVendor = 0x05e3
  idProduct = 0x0610
  bcdDevice = 0x7732
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0001  <USB2.0 Hub>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001



ugen1.3: <USB2.0 Hub vendor 0x05e3> at usbus1, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (100mA)


 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x0029
    bNumInterfaces = 0x0001
    bConfigurationValue = 0x0001
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x00e0
    bMaxPower = 0x0032

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0009
      bInterfaceSubClass = 0x0000
      bInterfaceProtocol = 0x0001
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0001
        bInterval = 0x000c
        bRefresh = 0x0000
        bSynchAddress = 0x0000


    Interface 0 Alt 1
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0001
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0009
      bInterfaceSubClass = 0x0000
      bInterfaceProtocol = 0x0002
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0001
        bInterval = 0x000c
        bRefresh = 0x0000
        bSynchAddress = 0x0000



0(testboxmdt)# usbconfig -d 1.4 dump_all_config_desc
ugen1.4: <USB2.0 Hub vendor 0x05e3> at usbus1, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (100mA)


 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x0029
    bNumInterfaces = 0x0001
    bConfigurationValue = 0x0001
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x00e0
    bMaxPower = 0x0032

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0009
      bInterfaceSubClass = 0x0000
      bInterfaceProtocol = 0x0001
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0001
        bInterval = 0x000c
        bRefresh = 0x0000
        bSynchAddress = 0x0000


    Interface 0 Alt 1
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0001
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0009
      bInterfaceSubClass = 0x0000
      bInterfaceProtocol = 0x0002
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0001
        bInterval = 0x000c
        bRefresh = 0x0000
        bSynchAddress = 0x0000


	---Mike


-- 
-------------------
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, mike at sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/


More information about the freebsd-usb mailing list