usbconfig.8 (1170f3d12ebd03d02f8bb4f075319f461e38d7d9) | usbconfig.8 (2e07d451f9d7ad5ca59b60afd688a9c096d4c47e) |
---|---|
1.\" $FreeBSD$ 2.\" 3.\" Copyright (c) 2008-2010 Hans Petter Selasky. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" | 1.\" $FreeBSD$ 2.\" 3.\" Copyright (c) 2008-2010 Hans Petter Selasky. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" |
26.Dd January 6, 2010 | 26.Dd December 30, 2017 |
27.Dt USBCONFIG 8 28.Os 29.Sh NAME 30.Nm usbconfig 31.Nd configure the USB subsystem 32.Sh SYNOPSIS 33.Nm 34.Op Fl u Ar unit --- 16 unchanged lines hidden (view full) --- 51Should only be used in conjunction with the unit argument. 52.It Fl d Ar [ugen]<unit>.<addr> 53Limit device range to USB devices connected to the given unit and address. 54The unit and address coordinates may be prefixed by the lowercased word "ugen". 55.It Fl h 56Show help and available commands. 57.El 58.Pp | 27.Dt USBCONFIG 8 28.Os 29.Sh NAME 30.Nm usbconfig 31.Nd configure the USB subsystem 32.Sh SYNOPSIS 33.Nm 34.Op Fl u Ar unit --- 16 unchanged lines hidden (view full) --- 51Should only be used in conjunction with the unit argument. 52.It Fl d Ar [ugen]<unit>.<addr> 53Limit device range to USB devices connected to the given unit and address. 54The unit and address coordinates may be prefixed by the lowercased word "ugen". 55.It Fl h 56Show help and available commands. 57.El 58.Pp |
59When called without options, | 59The following commands may be used with 60.Nm : 61.Bl -tag -width indent 62.It Cm set_config Ar cfg_index 63Choose the configuration for the USB device. 64Valid values range from zero to the number reported as the 65.Ar bNumConfigurations 66in 67.Cm dump_device_desc 68output. 69The special value of 255 unconfigures the device, detaching 70the interface drivers and reducing the power consumption to minimum, 71but without going into power saving mode or detaching from the bus. 72In some cases, it prevents the device from charging. 73.It Cm set_alt Ar alt_index 74Choose the alternate interface for the USB device. 75Alternative settings for the current configuration are available as the 76.Ar bAlternateSetting 77in 78.Cm dump_curr_config_desc 79output. 80Usually there is no need to adjust this setting. 81.It Cm set_template Ar template 82Set the global USB device side template. 83See 84.Xr usb_template 4 85for more information. 86.It Cm get_template 87Get the current USB device side template. 88.It Cm add_dev_quirk_vplh Ar vid Ar pid Ar lo_rev Ar hi_rev Ar quirk_name 89Add a quirk by specifying the Vendor ID, Product ID, low and high 90revision numbers, and the quirk name. 91See 92.Xr usb_quirk 4 93for more information. 94.It Cm remove_dev_quirk_vplh Ar vid Ar pid Ar lo_rev Ar hi_rev Ar quirk_name 95Remove a quirk. 96.It Cm add_quirk Ar quirk_name 97Add quirk for the currently selected USB device. 98.It Cm remove_quirk Ar quirk_name 99Remove a quirk for the currently selected USB device. 100.It Cm dump_quirk_names 101Display the list of supported quirk names. 102.It Cm dump_device_quirks 103Display the list of current device quirks. 104.It Cm dump_device_desc 105Display the device descriptor. 106.It Cm dump_curr_config_desc 107Display current configuration descriptor. 108.It Cm dump_all_config_desc 109Display all the configuration descriptors. 110.It Cm dump_string Ar index 111Display string descriptor at selected index. 112.It Cm dump_info 113Display summary information about the device. 114.It Cm show_ifdrv 115Display the list of interface drivers (such as 116.Xr ukbd 4 117or 118.Xr u3g 4 ) 119currently attached to the device. 120.It Cm suspend 121Force the device to suspend. 122.It Cm resume 123Force the device to resume. 124.It Cm power_off 125Turn the device off. 126.It Cm power_save 127Turn the automatic suspend and resume on. 128This is the default for USB hubs. 129.It Cm power_on 130Turn the device on and disable automatic suspend and resume. 131This is the default for non-hub devices. 132.It Cm reset 133Reset the device. 134This forces the USB stack to reenumerate the bus. 135.It Cm list 136List all available USB devices. 137This is the default if |
60.Nm | 138.Nm |
61prints a list of all available USB devices. | 139is called without specifying a command. 140.It Cm do_request Ar bmReqTyp Ar bReq Ar wVal Ar wIdx Ar wLen Ar data... 141Perform a synchronous control request on the specified device. 142See 143.Xr libusb20_dev_request_sync 3 144for more information. 145.El |
62.Sh EXAMPLES | 146.Sh EXAMPLES |
147.Pp |
|
63Show information about the device on USB bus 1 at address 2: 64.Pp | 148Show information about the device on USB bus 1 at address 2: 149.Pp |
65.Dl usbconfig -u 1 -a 2 dump_info | 150.Dl usbconfig -d ugen1.2 dump_info |
66.Pp 67Dump HID descriptor for device on USB bus 1 at address 2: 68.Pp | 151.Pp 152Dump HID descriptor for device on USB bus 1 at address 2: 153.Pp |
69.Dl usbconfig -u 1 -a 2 do_request 0x81 0x06 0x2200 0 0x100 | 154.Dl usbconfig -d ugen1.2 do_request 0x81 0x06 0x2200 0 0x100 |
70.Pp 71Dump string descriptor at index Z for device on USB bus 1 at address 2: 72.Pp | 155.Pp 156Dump string descriptor at index Z for device on USB bus 1 at address 2: 157.Pp |
73.Dl usbconfig -u 1 -a 2 dump_string Z | 158.Dl usbconfig -d ugen1.2 dump_string Z |
74.Pp 75Dump current configuration descriptor for device on USB bus 1 at address 2: 76.Pp | 159.Pp 160Dump current configuration descriptor for device on USB bus 1 at address 2: 161.Pp |
77.Dl usbconfig -u 1 -a 2 dump_curr_config_desc | 162.Dl usbconfig -d ugen1.2 dump_curr_config_desc |
78.Pp 79Dump device descriptor for device on USB bus 1 at address 2: 80.Pp | 163.Pp 164Dump device descriptor for device on USB bus 1 at address 2: 165.Pp |
81.Dl usbconfig -u 1 -a 2 dump_device_desc | 166.Dl usbconfig -d ugen1.2 dump_device_desc |
82.Pp 83Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on: 84.Pp | 167.Pp 168Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on: 169.Pp |
85.Dl usbconfig -u 1 -a 2 suspend 86.Dl usbconfig -u 1 -a 2 resume 87.Dl usbconfig -u 1 -a 2 power_off 88.Dl usbconfig -u 1 -a 2 power_save 89.Dl usbconfig -u 1 -a 2 power_on | 170.Dl usbconfig -d ugen1.2 suspend 171.Dl usbconfig -d ugen1.2 resume 172.Dl usbconfig -d ugen1.2 power_off 173.Dl usbconfig -d ugen1.2 power_save 174.Dl usbconfig -d ugen1.2 power_on |
90.Pp | 175.Pp |
91Display a list of available quirk names: 92.Pp 93.Dl usbconfig dump_quirk_names 94.Pp 95See 96.Xr usb_quirk 4 97for more information on quirks. | |
98.Sh SEE ALSO 99.Xr usb 4 , | 176.Sh SEE ALSO 177.Xr usb 4 , |
100.Xr usb_quirk 4 | 178.Xr usb_quirk 4 , 179.Xr usb_template 4 |