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

[Windows] Serial number support for composite USB devices #414

Conversation

ryan-summers
Copy link
Contributor

This pull request fixes #283 by adding in a device traversal up the USB device tree if a serial number is not detected at the original device node.

This allows composite USB devices to report correct serial numbers on windows.

@@ -21,6 +21,7 @@
from ctypes.wintypes import ULONG
from ctypes.wintypes import HKEY
from ctypes.wintypes import BYTE
import winerror
Copy link
Member

Choose a reason for hiding this comment

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

does not seem to be in the standard library

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out - you were correct. This was a module provided by pywin32 that I (incorrectly) thought was part of the standard library on windows. I removed the dependency and added the error as a file-level constant similar to other windows errors handled here.

@ryan-summers
Copy link
Contributor Author

@zsquareplusc Is there anything else you would like to see with this PR?

@hmaarrfk
Copy link

Thanks for working on this. I think we just hit this issue. I'll be versionning this code and testing it next week. Excited to see this pulled in!

@zsquareplusc zsquareplusc merged commit 47e4a11 into pyserial:master Aug 13, 2019
@zsquareplusc
Copy link
Member

Thank you

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.

[windows] Serial Number Issues
3 participants