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

Invalid serial number in PortInfos (windows) #2726

Open
romainmnr opened this issue Nov 3, 2023 · 2 comments
Open

Invalid serial number in PortInfos (windows) #2726

romainmnr opened this issue Nov 3, 2023 · 2 comments

Comments

@romainmnr
Copy link

SerialPort Version

=10.5.x

Node Version

18.x.x

Electron Version

No response

Platform

Microsoft Windows NT 10.0.19045.0 x64

Architecture

x64

Hardware or chipset of serialport

No response

What steps will reproduce the bug?

Listing devices from Serialport.list() on windows.

What happens?

Since [email protected] the return serial number in the port infos is no longer correct.

Result of SerialPort.list()
pnpId: USB\\VID_6244&PID_0622&MI_00\\6&FED21C1&0&0000
serialNumber: 6&FED21C1&0&0000 // wrong SN

What should have happened?

Expected result of SerialPort.list()

pnpId: USB\\VID_6244&PID_0622&MI_00\\6&FED21C1&0&0000
serialNumber: 000002003006

Additional information

Issur not detected on macOs

@romainmnr
Copy link
Author

I've also noticed that windows created a new folder in the registry with &MI_00 at the end.

screenshot-windows-registry

@drostea
Copy link

drostea commented Jan 15, 2024

I can confirm that starting with v10.5.0 the Serial Numbers on Windows are not reported correctly.
I also have a device with multiple CDCs that opens up multiple Serial Ports.

Instead of the correct Serial Number the last part of the pnpId is used.

What is also broken in v10.4.0 is that if I connect two USB devices with the same reported Serial Number, Windows replaces it with a fake one. I did not found a way to query the registry / wmi for the correct serial number in this case. Might just be a Windows issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants