xref: /freebsd/usr.sbin/usbconfig/usbconfig.8 (revision 38f0b757fd84d17d0fc24739a7cda160c4516d81)
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.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
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
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
35.Op Fl a Ar addr
36.Op cmds...
37.Nm
38.Op Fl d Ar [ugen]<unit>.<addr>
39.Op cmds...
40.Sh DESCRIPTION
41The
42.Nm
43utility is used to configure and dump information about the USB subsystem.
44.Pp
45The options are as follows:
46.Bl -tag -width "        "
47.It Fl u Ar unit
48Limit device range to USB devices connected to the given USBUS unit.
49.It Fl a Ar addr
50Limit device range to the given USB device index.
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,
60.Nm
61prints a list of all available USB devices.
62.Sh EXAMPLES
63Show information about the device on USB bus 1 at address 2:
64.Pp
65.Dl usbconfig -u 1 -a 2 dump_info
66.Pp
67Dump HID descriptor for device on USB bus 1 at address 2:
68.Pp
69.Dl usbconfig -u 1 -a 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
73.Dl usbconfig -u 1 -a 2 dump_string Z
74.Pp
75Dump current configuration descriptor for device on USB bus 1 at address 2:
76.Pp
77.Dl usbconfig -u 1 -a 2 dump_curr_config_desc
78.Pp
79Dump device descriptor for device on USB bus 1 at address 2:
80.Pp
81.Dl usbconfig -u 1 -a 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
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
90.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 ,
100.Xr usb_quirk 4
101