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

Error: "System cannot find the file specified." opening port when port number is high ex: "COM15" #47

Open
Edgar242 opened this issue Jun 6, 2019 · 10 comments

Comments

@Edgar242
Copy link

Edgar242 commented Jun 6, 2019

I have windows 10 and when I try to open serial port "COM15" I got:
"System cannot find the file specified."

the issue is solved if I manually changed it to another closer port to COM1 for example: "COM2"

@Edgar242
Copy link
Author

Problem is solved here:

goburrow/serial#13

@alikxus
Copy link

alikxus commented Nov 15, 2019

Hello, Problem is not solved. I use com10 and i recieved - COM10 - The system cannot find the file specified. I need your help

@Edgar242
Copy link
Author

Edgar242 commented Nov 15, 2019

Hello, Problem is not solved. I use com10 and i recieved - COM10 - The system cannot find the file specified. I need your help

Check this pull request, it has the changes needed
goburrow/serial#13

@alikxus
Copy link

alikxus commented Nov 18, 2019

Hello, Problem is not solved. I use com10 and i recieved - COM10 - The system cannot find the file specified. I need your help

Check this pull request, it has the changes needed
goburrow/serial#13

Do I understand correctly? i need use this string, for example:
handler := modbus.NewRTUClientHandler("\\.\com10")

@Edgar242
Copy link
Author

Edgar242 commented Nov 18, 2019

Hello, Problem is not solved. I use com10 and i recieved - COM10 - The system cannot find the file specified. I need your help

Check this pull request, it has the changes needed
goburrow/serial#13

Do I understand correctly? i need use this string, for example:
handler := modbus.NewRTUClientHandler("\.\com10")

Yes, I think name must be in uppercase: "\\.\COM10"
Can you try please?

@alikxus
Copy link

alikxus commented Nov 19, 2019

thank you, editor deleted first 2 back slaches
image
this way work for me.
and it work without uppercas

@Edgar242
Copy link
Author

thank you, editor deleted first 2 back slaches
image
this way work for me.
and it work without uppercas

Great, nice to know!

@Tamilselvan-sakthivel
Copy link

Tamilselvan-sakthivel commented Oct 25, 2023

i am using windows 7, if i use the above mentioned method i am getting same error.

CreateFile("\\.\COM2", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING,0, NULL);

can anyone help me on this ?

@Edgar242
Copy link
Author

Edgar242 commented Oct 25, 2023

CreateFile("\.\COM2", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING,0, NULL);

You should do it on this way:
CreateFile("\\\\.\\COM2", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING,0, NULL);

@Tamilselvan-sakthivel
Copy link

tried that too, but still same

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

3 participants