tail head cat sleep
QR code linking to this page

Manual Pages  — USBCONFIG

NAME

usbconfig – configure the USB subsystem

CONTENTS

SYNOPSIS


usbconfig [-u unit] [-a addr] [cmds...]
usbconfig [-d [ugen]<unit>.<addr>] [cmds...]

DESCRIPTION

The usbconfig utility is used to configure and dump information about the USB subsystem.

The options are as follows:
-u unit
  Limit device range to USB devices connected to the given USBUS unit.
-a addr
  Limit device range to the given USB device index. Should only be used in conjunction with the unit argument.
-d [ugen]<unit>.<addr>
  Limit device range to USB devices connected to the given unit and address. The unit and address coordinates may be prefixed by the lowercased word "ugen".
-h
  Show help and available commands.

The following commands may be used with usbconfig:
set_config cfg_index
  Choose the configuration for the USB device. Valid values range from zero to the number reported as the bNumConfigurations in dump_device_desc output. The special value of 255 unconfigures the device, detaching the interface drivers and reducing the power consumption to minimum, but without going into power saving mode or detaching from the bus. In some cases, it prevents the device from charging.
set_alt alt_index
  Choose the alternate interface for the USB device. Alternative settings for the current configuration are available as the bAlternateSetting in dump_curr_config_desc output. Usually there is no need to adjust this setting.
set_template template
  Set the global USB device side template. See usb_template(4) for more information.
get_template
  Get the current USB device side template.
add_dev_quirk_vplh vid pid lo_rev hi_rev quirk_name
  Add a quirk by specifying the Vendor ID, Product ID, low and high revision numbers, and the quirk name. See usb_quirk(4) for more information.
remove_dev_quirk_vplh vid pid lo_rev hi_rev quirk_name
  Remove a quirk.
add_quirk quirk_name
  Add quirk for the currently selected USB device.
remove_quirk quirk_name
  Remove a quirk for the currently selected USB device.
dump_all_desc
  Display the device and configuration descriptors.
dump_quirk_names
  Display the list of supported quirk names.
dump_device_quirks
  Display the list of current device quirks.
dump_device_desc
  Display the device descriptor.
dump_curr_config_desc
  Display current configuration descriptor.
dump_all_config_desc
  Display all the configuration descriptors.
dump_string index
  Display string descriptor at selected index.
dump_info
  Display summary information about the device.
show_ifdrv
  Display the list of interface drivers (such as ukbd(4) or u3g(4)) currently attached to the device.
suspend
  Force the device to suspend.
resume
  Force the device to resume.
power_off
  Turn the device off.
power_save
  Turn the automatic suspend and resume on. This is the default for USB hubs.
power_on
  Turn the device on and disable automatic suspend and resume. This is the default for non-hub devices.
reset Reset the device. This forces the USB stack to reenumerate the bus.
list List all available USB devices. This is the default if usbconfig is called without specifying a command.
do_request bmReqTyp bReq wVal wIdx wLen data...
  Perform a synchronous control request on the specified device. See libusb20_dev_request_sync(3) for more information.

EXAMPLES

Show information about the device on USB bus 1 at address 2:

    usbconfig -d ugen1.2 dump_info

Dump HID descriptor for device on USB bus 1 at address 2:

    usbconfig -d ugen1.2 do_request 0x81 0x06 0x2200 0 0x100

Dump string descriptor at index Z for device on USB bus 1 at address 2:

    usbconfig -d ugen1.2 dump_string Z

Dump current configuration descriptor for device on USB bus 1 at address 2:

    usbconfig -d ugen1.2 dump_curr_config_desc

Dump device descriptor for device on USB bus 1 at address 2:

    usbconfig -d ugen1.2 dump_device_desc

Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on:

    usbconfig -d ugen1.2 suspend

    usbconfig -d ugen1.2 resume

    usbconfig -d ugen1.2 power_off

    usbconfig -d ugen1.2 power_save

    usbconfig -d ugen1.2 power_on

SEE ALSO

usb(4), usb_quirk(4), usb_template(4)

USBCONFIG (8) December 30, 2017

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.