Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

SerialPort.GetPortNames() returns incorrect port names?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vile - 04 Jul 2006 17:28 GMT
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 ?
Dick Grier - 04 Jul 2006 20:13 GMT
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

Signature

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.

Vile - 05 Jul 2006 07:58 GMT
Hi,

> 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
Dick Grier - 05 Jul 2006 16:05 GMT
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

Signature

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.

Vile - 05 Jul 2006 16:51 GMT
Hi,

> 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. :)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.