Skip to content

Add WCID support for DFU Runtime interface#140

Open
legonigel wants to merge 1 commit into
skuep:masterfrom
legonigel:winusb
Open

Add WCID support for DFU Runtime interface#140
legonigel wants to merge 1 commit into
skuep:masterfrom
legonigel:winusb

Conversation

@legonigel

Copy link
Copy Markdown
Collaborator

This adds Microsoft OS 1.0 Descriptors (WCID) to the DFU Runtime interface (interface 6) to allow Windows hosts to automatically bind the WinUSB driver.

  • Defines Microsoft OS String Descriptor (index 0xEE) with the "MSFT100" signature and vendor code 0x20.
  • Implements Microsoft Compatible ID Feature Descriptor returning "WINUSB" for the DFU Runtime interface (ITF_NUM_DFU_RT).
  • Adds the STR_IDX_MS_OS_STRING (0xEE) case to tud_descriptor_string_cb to return the MS OS string descriptor.
  • Implements tud_vendor_control_xfer_cb to handle the vendor control request for Compatible ID feature descriptors.

This removes the need for new Windows users to manually bind the WinUSB driver using tools like Zadig for dfu-util to communicate with the DFU Runtime. Unfortunately, this doesn't help people that have already plugged in an AIOC, since windows "helpfully remembers" this in the registry and appears to not check it twice.

For more details see https://github.com/pbatard/libwdi/wiki/WCID-Devices

This adds Microsoft OS 1.0 Descriptors (WCID) to the DFU Runtime interface
(interface skuep#6) to allow Windows hosts to automatically bind the WinUSB
driver.

- Defines Microsoft OS String Descriptor (index 0xEE) with the "MSFT100"
  signature and vendor code 0x20.
- Implements Microsoft Compatible ID Feature Descriptor returning "WINUSB"
  for the DFU Runtime interface (ITF_NUM_DFU_RT).
- Adds the STR_IDX_MS_OS_STRING (0xEE) case to tud_descriptor_string_cb
  to return the MS OS string descriptor.
- Implements tud_vendor_control_xfer_cb to handle the vendor control
  request for Compatible ID feature descriptors.

This removes the need for Windows users to manually bind the WinUSB driver
using tools like Zadig for dfu-util to communicate with the DFU Runtime.
@legonigel

Copy link
Copy Markdown
Collaborator Author

On some further testing, I'm not 100% sure this works correctly yet. Let me try a bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant