usbscan <setting>
#!ipxe :scan usbscan addr || goto scan_done echo Found USB device ${addr:hex} goto scan :scan_done
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.
Success | A USB device was found, and the bus:dev address was stored in the setting |
---|---|
Failure | No further USB devices were found |
This command is available only when the build option USB_CMD
is enabled.
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