Hi,
You would have to know what commands to send, and what responses to look
for. There is nothing standard about this, so there cannot be any "one"
answer. For example, if you wanted to detect if a modem is connected, you
could send the string:
"ATE1V1Q0" & vbCr 'VB .NET
Then wait for the modem (or similar device) to respond with a reply that
includes, but may not be limited to:
"OK" & vbCrLf
Other types of serial devices will work quite differently, so one cannot
generally say what commands and responses will work.
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.
SP - 04 Apr 2007 12:22 GMT
> Hi,
>
[quoted text clipped - 23 lines]
> 2006.
> Seewww.hardandsoftware.netfor details and contact information.
Yes but how to enumerate all COM device connected?
Dick Grier - 04 Apr 2007 17:45 GMT
Hi,
Use the PortNames method. I have an example on my website, though it only
uses PortNames to fill a listbox for selection. Open each port in the array
of names returned, and test them "one-at-a-time."
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.