-
Notifications
You must be signed in to change notification settings - Fork 128
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
Wrong serial number and missing interface number for FTDI multi-port device on Windows #203
Comments
Repeating the above test with interface number information enabled, gives no interface number for the FTDI composite device while this info is present for another composite device COM13:
|
I have some ideas for possibly improving the situation w.r.t. getting device information but won't be able to work on it for a bit. The idea is basically seeing if the HID API can be used instead. |
Thank you for chiming in @RossSmyth! No hurry. I finally found some time to look further into it and it looks to me that there is still room for improving FTDI device enumeration on Windows just by a more educated look at the device identification string and the whole parent stack. Instrumenting this for
Which leads me to the following things to think about:
|
I'm trying to see if there's a more structured way of retrieving the info we would like rather than parsing the string that in the win32 docs say specifically not to parse. Here's just a dump of things I have found so far: I tried this, but the example
WMI is a large API that lets you query Windows things like a database. The incantation needed is: Get-WmiObject -Query "SELECT * FROM Win32_PnPEntity WHERE ClassGuid=`"{4d36e978-e325-11ce-bfc1-08002be10318}`"" Which can be translated to Rust. But it does not have the fields seperated.
This struct has the fields One issue is that the serial number field is a nebulous index that I'm not sure where it indexes.
This you can just view with RegEdit. The path is This has the same issue of WMI in that the VID & other fields are not seperated out from the HWID. A C++ file that shows 10 different ways to get a list of serial ports. Not specific to my goal, but could have inspiration for what to look at. |
While looking into #201, I found a wrong serial number '5' reported for a FTDI 2232D which does not have a serial number (due to not having an external EEPROM fitted):
The same serial number is also reported by pySerial:
Listing the ports on macOS gives the espected result of no serial number at all:
The text was updated successfully, but these errors were encountered: