SerialPort returns incorrect port names for virtual COM ports.
In my case it reports "COM5i" instead of "COM5" for Siemens MC35i terminal
Hyperterminal shows "COM5". SerialPort.Open() doesn't work with these names
- Incorrect port name error.
Who knows how to get the correct names ?

Re: SerialPort.GetPortNames() returns incorrect port names? by Dick

Dick
Tue Jul 04 14:13:50 CDT 2006

Hi,

GetPortNames returns the names that the device driver provides. If you want
to filter that by some rules, you will have to do so yourself.
HyperTerminal uses TAPI (different methods than are used by
System.IO.Ports), so the results may not be exactly the same.

So, why do you care? The name returned by GetPortNames may be used to open
that port, right?

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.



Re: SerialPort.GetPortNames() returns incorrect port names? by Vile

Vile
Wed Jul 05 01:58:01 CDT 2006

Hi,

"Dick Grier" wrote:

> So, why do you care? The name returned by GetPortNames may be used to open
> that port, right?

Unfortunately, no. This name causes System.IO.IOException with text "The
port 'COM5i' does not exist.".
Of course I can add filtering and fix broken COM port names, but probably
there are any better solutions?

Best regards

Re: SerialPort.GetPortNames() returns incorrect port names? by Dick

Dick
Wed Jul 05 10:05:18 CDT 2006

Hi,

>>
Of course I can add filtering and fix broken COM port names, but probably
there are any better solutions?
<<

No, I'm fairly sure there is not. This is the first time that I've heard of
this issue. I have dozens of different devices (many that use virtual
serial ports), and none of these display this problem -- so it isn't common.

The best thing to do would be to contact your manufacturer and to inquire
about it there. You also can post it as an issue on
http://msdn.microsoft.com/vstudio/support/default.aspx.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.



Re: SerialPort.GetPortNames() returns incorrect port names? by Vile

Vile
Wed Jul 05 10:51:02 CDT 2006

Hi,

"Dick Grier" wrote:
> No, I'm fairly sure there is not. This is the first time that I've heard of
> this issue. I have dozens of different devices (many that use virtual
> serial ports), and none of these display this problem -- so it isn't common.

Yes, I already discovered that. I found just one more incident, but with
bluetooth device. Without any answer, unfortunately.

>
> The best thing to do would be to contact your manufacturer and to inquire
> about it there. You also can post it as an issue on
> http://msdn.microsoft.com/vstudio/support/default.aspx.
Yes. I'm currently trying to get response from Siemens.
Already posted. :)

Thanks a lot. :)