Skip to content

Add support for absolute paths #259

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Neme
Copy link

@Neme Neme commented Apr 17, 2025

On Windows, attempting to open a serial port using a Device Interface Path instead of a traditional COMx port name results in a failure.

For instance: trying to open \\?\USB#VID_0483&PID_5740#158133603236#{86e0d1e0-8089-11d0-9ce4-08003e301f73} will fail.

Fixes: #258

@sirhcel
Copy link
Contributor

sirhcel commented Apr 17, 2025

Thank you for spotting this issue and opening a PR @Neme! It looks good and giving it a spin with a SiLabs CP2102N and transmit.rs works like a treat:

> cargo run --example transmit "\\?\USB#VID_10C4&PID_EA60#YOUR_SERIAL_NUMBER_HERE#{A2A39220-39F4-4b88-AECB-3D86A35DC748}" 115200

I'm using the interface GUID from Windows USB Device Path here.

@Neme
Copy link
Author

Neme commented Apr 25, 2025

@sirhcel I noticed that the x86_64-pc-windows-gnu / build job failed. Do you think this is related to my changes, or could it be a CI/environment issue?

@sirhcel
Copy link
Contributor

sirhcel commented Apr 28, 2025

I assume the failed CI build for x86_64-pc-windows-gnu being completely unrelated to your change (as it does in this build for #260 as well). Do you have an idea of what's going on there? I tried to reproduce this issue locally but did not succeed yet.

@surban
Copy link

surban commented May 13, 2025

Might be a 32-bit DLL in PATH before 64-bit DLL of Mingw.

@sirhcel
Copy link
Contributor

sirhcel commented May 21, 2025

Let's ignore the CI issue for now and integrate this change. I can't add a changelog to your branch @Neme (presumably because it is in the repo of an organization an not an individual). Could you please cherry-pick the changelog sirhcel@627f684?

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: Unable to Open COM Port via USB Device Path
3 participants