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 / April 2007

Tip: Looking for answers? Try searching our database.

Find COM device connected

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SP - 03 Apr 2007 13:03 GMT
Hi,
I would like to make a win service that test all the com ports and
find the deviced connected.
Some device have some commands that return data.
How can I make this test?
Dick Grier - 03 Apr 2007 18:00 GMT
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.


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.