Solved

Check for actual COM port device connectivity

Posted on 2008-09-29
7
778 Views
Last Modified: 2013-12-26
Hi,

Does anyone know a way to test to see if a device is actually connected to a given COM port?
The following code will return OK, as the port is open, but I need to know if a device is actually plugged in, not just an open port.

Thanks.

    If MSComm1.PortOpen = True Then
        MSComm1.Output = "e"
    Else
        MsgBox "Com port is not open...", vbExclamation, "Error"
    End If
0
Comment
Question by:tvtech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 17

Expert Comment

by:CSecurity
ID: 22603319
Your device should have a functionality like Pinging, you need to send a Ping request and if you received answer it means device is connected, no other method is available. With MSCOMM you can only understand if port is open or not.

0
 

Author Comment

by:tvtech
ID: 22603448
CSecurity, thanks, but no, there won't be any pinging, as the serial device is a trigger from a camera. It is totally passive, unless the camera is connected, however, the serial port does see the trigger device when it's connected to the port.
0
 
LVL 17

Expert Comment

by:CSecurity
ID: 22603468
So when device connects, it sends some data to COM Port, you need to open and look for that data, if any data came through COM port, it means device is connected
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:tvtech
ID: 22603491
Sorry, this is a bit hard to explain  ... the device is totally passive, unless the camera is plugged into it and is triggered by a foot switch. As the people who setup the device will not actually be using the camera, there is no way to get them to confirm anything.

I need a way to auto-detect the actual existence of the device (With, or without the camera being plugged in) just by plugging it into the serial port.
0
 
LVL 17

Accepted Solution

by:
CSecurity earned 350 total points
ID: 22603503
It's not possible, look at here:
http://electronicdesign.com/Articles/Index.cfm?AD=1&ArticleID=6233

Your device should send signals to make you able detect it in PC
0
 

Author Comment

by:tvtech
ID: 22699786
Actually, yes it is possible. Thanks anyway.
0
 

Author Comment

by:tvtech
ID: 23765919
Moderator, please delete this question, as I found the answer elsewhere.

Thanks.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
passing parameter in sql procedure 9 68
How to measure sizes and angles in scanned images ? 3 88
TT Auto Dashboard 13 101
Added a column screws up code 5 69
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question