none
How to send an "USB Control Request" to an USB-Hub? RRS feed

  • Question

  • I'm trying to make the linux tool UHubCtl (https://github.com/mvp/uhubctl) working in windows. This tool "simply" sends an USB Control Request to an USB-Hub in order to switch off certain ports. The linux port is running well. 

    Compiling the windows port with libusb (http://libusb.info) was also not a big deal. But libusb is referencing on winusb.sys. And winusb has basically no access to an USBHub since this is not an installed driver for usbhub class. 

    So I'm not able to send the USB Control request via libusb. Does anybody know how to overcome the problem? Is there any other windows approach available to send directly an USB request command to an USB-Hub (not device!)? 

    Thx for you answers in advance,

    Oli2302

      

    • Edited by oli2302 Saturday, July 4, 2015 8:34 AM
    Saturday, July 4, 2015 8:26 AM

Answers

  • There is no set interface. With extensive testing the USB team found per port power management to be very unreliable and stopped turning on the feature

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, July 5, 2015 6:34 AM

All replies

  • Thx. 

    I already started working in this direction one week ago. But when I understand the IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES correctly I'm only able to read properties.

    I need need something that allows me to set properties like the following with the libusb and control request:

    #define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)
    #define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
    #define USB_PORT_FEAT_POWER        0x08
    #define USB_REQ_CLEAR_FEATURE      0x01
    
      uh = usb_open (hubs[hub].dev);
      usb_control_msg (uh, USB_RT_PORT, USB_REQ_CLEAR_FEATURE, USB_PORT_FEAT_POWER, index, NULL, 0, CTRL_TIMEOUT) < 0);
    				   

    How can I do this with the IOCTL_GET_USB...-stuff?

    As mentioned reading the  hub capabilities with IOCTL_GET.... is already working. 

    Thx in advance

    Olili


    • Edited by oli2302 Saturday, July 4, 2015 3:21 PM
    Saturday, July 4, 2015 3:13 PM
  • There is no set interface. With extensive testing the USB team found per port power management to be very unreliable and stopped turning on the feature

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, July 5, 2015 6:34 AM
  • Did you ever get this working?  I'm trying to do the same thing.

    Doug

    Friday, July 22, 2016 9:46 PM
  • the answer hasn't changed

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Saturday, July 23, 2016 3:19 AM