USBCONFIG(8)
π NAME π
okay bestie, this whole page is about usbconfig(8) β the System Manager's Manual girlie for configuring the USB subsystem. literally her whole job is "configure the USB subsystem" β¨
β¨ SYNOPSIS β¨
usbconfig [-l] [-v] [-a addr] [-i interface_index] [-u unit] [cmds ...]
usbconfig -d [[/dev/]ugen]unit.addr [-l] [-v] [-i interface_index]
[cmds ...]
π DESCRIPTION π
The usbconfig utility is used to configure and dump information about the USB subsystem. she's giving main character energy for USB nerds, no cap π
π the options, bestie
The options are as follows:
-a addrβ limit the device range to the given USB device index. Should only be used in conjunction with theunitargument, fr fr.-d [[/dev/]ugen]unit.addrβ limit the device range to USB devices connected to the given unit and address. The unit and address coordinates may be prefixed by the lowercased wordugen, or the full path name/dev/ugen.-hβ show help and available commands. helpful icon behavior π«Ά-i interface_indexβ specify interface index as indicated by the command description. If this argument is not specified a value of zero will be used for the interface index.-l dump_device_descβ show numeral only key=value output as one long line.-u unitβ limit the device range to USB devices connected to the given USBUS unit.-vβ activate thedump_device_desc,dump_curr_config_desc, andshow_ifdrvcommands (βverbose modeβ).
π«Ά the commands you can use
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 thebNumConfigurationsindump_device_descoutput. The special value of255unconfigures 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. β οΈ so yeah,255is the dramatic unconfigure option, bestie.set_alt alt_indexβ choose the alternate interface for the selected interface and USB device. Alternative settings for the current configuration are available as thebAlternateSettingindump_curr_config_descoutput. Usually there is no need to adjust this setting. This command uses the-i interface_indexoption.set_template templateβ set the global USB device side template. Seeusb_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. Seeusb_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.dump_statsβ display USB transfer statistics.show_ifdrvβ display the list of interface drivers (such asukbd(4)oru3g(4)) currently attached to the device.detach_kernel_driverβ detach kernel driver for the selected interface and USB device. This command uses the-i interface_indexoption.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 ifusbconfigis called without specifying a command.do_request bmReqTyp bReq wVal wIdx wLen data...β perform a synchronous control request on the specified device. Seelibusb20_dev_request_sync(3)for more information.
π EXAMPLES π
List all connected USB devices and their attached interface drivers:
usbconfig show_ifdrv
Dump device and configuration descriptors for device on USB bus 1 at address 2:
usbconfig -d ugen1.2 dump_all_desc
Dump HID descriptor for device on USB bus 1 at address 2:
usbconfig -d ugen1.2 do_request 0x81 0x06 0x2200 0 0x100
Power off the device on USB bus 1 at address 2:
usbconfig -d ugen1.2 power_off
π₯ SEE ALSO π₯
usb(4), usb_quirk(4), usb_template(4)
mwah π this little manual moment is Debian-flavored, dated February 12, 2025, and it's living under USBCONFIG(8) β slay, bye bestie π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2008-2019 Hans Petter Selasky. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms