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

Way to retrieve the standard descriptor strings: Manufacturer, Product, Serial number #37

Open
KurtE opened this issue Nov 2, 2023 · 1 comment

Comments

@KurtE
Copy link
Contributor

KurtE commented Nov 2, 2023

There are times, when a sketch may want to be have access to the information about what device is actually connected to their board. For example, suppose your sketch is setup to maybe handle two USBSerial objects, and both are connected. You may wish to query the Serial number to know which one is which....

For what is worth the USBHostGiga library appears to at least read them in and log them... Not sure yet if they are easily available to the user object...

But I believe with this library, the code does not even look at the indexes contained within the device descriptor. So it might be a little more problematic.

Might experiment with sketch code to see if I can ask to read the device descriptor again, and parse it myself, and then make a version of the Query Descriptor code that reads in strings.

@KurtE
Copy link
Contributor Author

KurtE commented Nov 3, 2023

I added the code to my github project for maybe some USBHost classes, in this case for USB To Serial Adapters.
https://github.com/KurtE/GIGA_USBHostMBed5_devices/blob/main/src/USBHostSerialDevice.cpp#L415-L509

You might want to consider adding similar to stuff to this library.

Also wish that maybe there was some base class, that most of your devices are derived from, that maybe have some basic standard methods, like to get these three strings, the product id, vendor id, etc...

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

No branches or pull requests

1 participant