Scan for USB devices

Synopsis

  usbscan <setting>

Examples

Scan for all USB devices

  #!ipxe
  :scan usbscan addr || goto scan_done
    echo Found USB device ${addr:hex}
    goto scan
  :scan_done

Description

Scan the USB bus, starting from the USB bus:dev address in the specified setting, and store the USB bus:dev address of the next device in the specified setting. If the specified setting is empty, then the scan will start from the first USB device.

If no further USB devices exist, the command will fail silently with an error status.

Command status

Success A USB device was found, and the bus:dev address was stored in the setting
Failure No further USB devices were found

See also

Build options

This command is available only when the build option USB_CMD is enabled.

Notes

You can use the USB bus:dev address to extract information from USB descriptors. For example, to list the vendor and device IDs of all USB devices:

  #!ipxe
  :scan usbscan addr || goto scan_done
    echo ${addr:hex}: ${usb/${addr}.0.2}:${usb/${addr}.2.2}
    goto scan
  :scan_done
cmd/usbscan.txt ยท Last modified: 2024/10/17 13:30 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.