Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: subsys: usb: webusb: Fix Win10 detection #59758

Merged

Conversation

maxd-nordic
Copy link
Contributor

This patch refactors the usage of MS OS 2.0 descriptors in the WebUSB sample. The function subset header was removed since it is not allowed for non-composite devices.
Also, a new random GUID was added for automatic driver installation.

samples/subsys/usb/webusb/src/msosv2_defs.h Outdated Show resolved Hide resolved
samples/subsys/usb/webusb/src/msosv2_defs.h Outdated Show resolved Hide resolved
samples/subsys/usb/webusb/src/msosv2_defs.h Outdated Show resolved Hide resolved
.wLength = sizeof(struct ms_os_20_guids_property_desc),
.wDescriptorType = MS_OS_20_FEATURE_REG_PROPERTY,
.wPropertyDataType = MS_OS_20_PROPERTY_DATA_REG_MULTI_SZ,
.wPropertyNameLength = 42,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish zephyr had sizeof_field() macro like Linux kernel does.

tmon-nordic
tmon-nordic previously approved these changes Jul 4, 2023
Copy link
Contributor

@tmon-nordic tmon-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed to work on nrf52840dk_nrf52840. Windows 10 automatically installed WinUSB driver and Zadig shows device as WCID compatible.

samples/subsys/usb/webusb/src/main.c Show resolved Hide resolved
samples/subsys/usb/webusb/src/main.c Outdated Show resolved Hide resolved
include/zephyr/usb/msos_desc.h Show resolved Hide resolved
include/zephyr/usb/msos_desc.h Show resolved Hide resolved
include/zephyr/usb/msos_desc.h Outdated Show resolved Hide resolved
include/zephyr/usb/msos_desc.h Outdated Show resolved Hide resolved
samples/subsys/usb/webusb/src/main.c Show resolved Hide resolved
samples/subsys/usb/webusb/src/main.c Outdated Show resolved Hide resolved
This patch refactors the usage of MS OS 2.0 descriptors in the
WebUSB sample. The function subset header was removed since it
is not allowed for non-composite devices.
Also, a new random GUID was added for automatic driver installation.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
@carlescufi carlescufi merged commit 860515a into zephyrproject-rtos:main Jul 10, 2023
17 checks passed
@maxd-nordic maxd-nordic deleted the webusb-win10-detection branch July 10, 2023 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants