usbconfig.8 (d69b9cc26d1c24a4cbc37478a571b1f531aa7bcc) usbconfig.8 (5eafaf9e68894cda4e8dca5f363be0b4f15b5cd6)
1.\" $FreeBSD$
2.\"
3.\" Copyright (c) 2008-2019 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-2019 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 December 21, 2021
26.Dd January 29, 2022
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 Fl i Ar interface_index
37.Op Fl v
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 Fl i Ar interface_index
37.Op Fl v
38.Op cmds...
38.Op Ar cmds ...
39.Nm
39.Nm
40.Fl d Ar [[/dev/]ugen]<unit>.<addr>
40.Fl d
41.Sm off
42.Oo Oo Cm /dev/ Oc Cm ugen Oc Ar unit Cm \&. Ar addr
43.Sm on
41.Op Fl i Ar interface_index
42.Op Fl v
44.Op Fl i Ar interface_index
45.Op Fl v
43.Op cmds...
46.Op Ar cmds ...
44.Sh DESCRIPTION
45The
46.Nm
47utility is used to configure and dump information about the USB subsystem.
48.Pp
49The options are as follows:
47.Sh DESCRIPTION
48The
49.Nm
50utility is used to configure and dump information about the USB subsystem.
51.Pp
52The options are as follows:
50.Bl -tag -width " "
53.Bl -tag -width "-u unit"
51.It Fl u Ar unit
52Limit device range to USB devices connected to the given USBUS unit.
53.It Fl a Ar addr
54Limit device range to the given USB device index.
55Should only be used in conjunction with the unit argument.
54.It Fl u Ar unit
55Limit device range to USB devices connected to the given USBUS unit.
56.It Fl a Ar addr
57Limit device range to the given USB device index.
58Should only be used in conjunction with the unit argument.
56.It Fl d Ar [[/dev/]ugen]<unit>.<addr>
59.It Xo
60.Fl d
61.Sm off
62.Oo Oo Cm /dev/ Oc Cm ugen Oc Ar unit Cm \&. Ar addr
63.Sm on
64.Xc
57Limit device range to USB devices connected to the given unit and address.
65Limit device range to USB devices connected to the given unit and address.
58The unit and address coordinates may be prefixed by the lowercased word "ugen",
66The unit and address coordinates may be prefixed by the lowercased word
67.Cm ugen ,
59or the full path name
68or the full path name
60.Pa /dev/ugen .
69.Cm /dev/ugen .
61.It Fl h
62Show help and available commands.
63.It Fl i Ar interface_index
64Specify interface index as indicated by the command description.
70.It Fl h
71Show help and available commands.
72.It Fl i Ar interface_index
73Specify interface index as indicated by the command description.
65If this argument is not specified a value of zero will be used for the interface index.
74If this argument is not specified
75a value of zero will be used for the interface index.
66.It Fl v
76.It Fl v
67Shortcut to activate the
77Activate the
68.Cm dump_device_desc ,
69.Cm dump_curr_config_desc ,
70and
71.Cm show_ifdrv
72commands
73.Pq Dq verbose mode .
74.El
75.Pp

--- 98 unchanged lines hidden (view full) ---

174.El
175.Sh EXAMPLES
176List all connected USB devices and their attached interface drivers:
177.Pp
178.Dl usbconfig show_ifdrv
179.Pp
180Dump device and configuration descriptors for device on USB bus 1 at address 2:
181.Pp
78.Cm dump_device_desc ,
79.Cm dump_curr_config_desc ,
80and
81.Cm show_ifdrv
82commands
83.Pq Dq verbose mode .
84.El
85.Pp

--- 98 unchanged lines hidden (view full) ---

184.El
185.Sh EXAMPLES
186List all connected USB devices and their attached interface drivers:
187.Pp
188.Dl usbconfig show_ifdrv
189.Pp
190Dump device and configuration descriptors for device on USB bus 1 at address 2:
191.Pp
182.Dl usbconfig ugen1.2 dump_all_desc
192.Dl usbconfig -d ugen1.2 dump_all_desc
183.Pp
184Dump HID descriptor for device on USB bus 1 at address 2:
185.Pp
193.Pp
194Dump HID descriptor for device on USB bus 1 at address 2:
195.Pp
186.Dl usbconfig ugen1.2 do_request 0x81 0x06 0x2200 0 0x100
196.Dl usbconfig -d ugen1.2 do_request 0x81 0x06 0x2200 0 0x100
187.Pp
188Power off the device on USB bus 1 at address 2:
189.Pp
197.Pp
198Power off the device on USB bus 1 at address 2:
199.Pp
190.Dl usbconfig ugen1.2 power_off
200.Dl usbconfig -d ugen1.2 power_off
191.Sh SEE ALSO
192.Xr usb 4 ,
193.Xr usb_quirk 4 ,
194.Xr usb_template 4
201.Sh SEE ALSO
202.Xr usb 4 ,
203.Xr usb_quirk 4 ,
204.Xr usb_template 4