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

[Gen 3] Fixes USB descriptors #1736

Merged
merged 6 commits into from Apr 2, 2019

Conversation

@avtolstoy
Copy link
Member

commented Mar 27, 2019

Problem

  1. Particle CLI is unable to communicate with Gen 3 devices over USB Control Interface
  2. Windows complains about USB strings

Solution

  1. particle-iot/nrf5_sdk#7 along with d3212bf fix bDeviceClass, bDeviceSubClass and bDeviceProtocol in USB device descriptor
  2. Hardcoding 0x0409 (English (US)) as the USB LangID. I wasn't able to figure out why APP_USBD_LANG_ENGLISH and APP_USBD_SUBLANG_ENGLISH_US weren't producing the correct result. The resulting LangID was 0x0009.
  3. particle-iot/nrf5_sdk#8 fixes interface-specific vendor request handling

Steps to Test

  1. Verify that Particle CLI works (assuming no interfering drivers are installed)
  2. usbview.exe may be used to verify there are no complaints about the strings, see screenshot below

usbview

image

References


Changelog

  • [Gen 3] Fixes issues in USB and WCID descriptors preventing Control Interface from working correctly on Windows platforms #1736

@avtolstoy avtolstoy added this to the 1.1.0-rc.1 milestone Mar 27, 2019

@avtolstoy avtolstoy requested a review from sergeuz Mar 27, 2019

@avtolstoy avtolstoy removed the do not merge label Apr 1, 2019

@avtolstoy avtolstoy requested a review from sergeuz Apr 1, 2019

@sergeuz

This comment has been minimized.

Copy link
Member

commented Apr 1, 2019

I wasn't able to figure out why APP_USBD_LANG_ENGLISH and APP_USBD_SUBLANG_ENGLISH_US weren't producing the correct result

That's due to a copy-paste error in the Nordic SDK: https://github.com/particle-iot/nrf5_sdk/blob/master/components/libraries/usbd/app_usbd_langid.h#L200 (note that APP_USB_LANG_OFFSET is used instead of APP_USB_SUBLANG_OFFSET for sub-language IDs).

@sergeuz
sergeuz approved these changes Apr 1, 2019

@sergeuz sergeuz added ready to merge and removed needs review labels Apr 1, 2019

@avtolstoy avtolstoy merged commit ac95364 into develop Apr 2, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@avtolstoy avtolstoy deleted the fix/gen3-usb-descriptors branch Apr 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.