-
-
Notifications
You must be signed in to change notification settings - Fork 725
String Descriptor fails to write iManufacturer and iProduct #274
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
Comments
I fixed the problem; It seems like in USBCore.cpp, the setup.wlength struct element was not representing the real length of the Product Name and Manufacturing Name descriptor strings. Using sizeof() instead of the struct elements solved the problem.
I will fork the core and make a pull request |
Pull request is here: |
The 2nd parameter of |
I accidentally wrote "was the problem", i mean't, "fixed the problem" :-) The original code uses setup.wlength instead of 2*sizeof("string"), which is incorrect as setup.wlength doesn't always have the right number. |
The |
It appears that iManufacturer and iProduct are not filled in for HID descriptor requests. This seems odd, as bool USBDeviceClass::sendStringDescriptor(const uint8_t *string, uint8_t maxlen){} seems to have the strings "Arduino LLC" and "Arduino Zero" passed to it successfully.
Connection Information:
Device current bus speed: FullSpeed
Device supports USB 1.1 specification
Device supports USB 2.0 specification
Device address: 0x0011
Current configuration value: 0x00
Number of open pipes: 0
Device Descriptor:
0x12 bLength
0x01 bDescriptorType
0x0200 bcdUSB
0xEF bDeviceClass (Miscellaneous device)
0x02 bDeviceSubClass
0x01 bDeviceProtocol
0x40 bMaxPacketSize0 (64 bytes)
0x1532 idVendor
0x0B00 idProduct
0x0100 bcdDevice
0x01 iManufacturer ""
0x02 iProduct ""
But what's especially strange is the PluggableUSB shortname is successfully set using the same function.
The text was updated successfully, but these errors were encountered: