Solved

Watching Serial ports.

Posted on 2004-10-05
17
289 Views
Last Modified: 2010-04-17
A piece of equipment at my work connects to a computer through a serial port.  However the software that came with it does not control the equipment the way we want it to.  I was wondering if there was a way to watch that serial port and figure out what commands are sent to make the equipment do what.  This way I could write code to get the equipment to do what we need it to do.

125pts for now but if it turns out to be a difficult question I can up the points.
0
Comment
Question by:Seiera
  • 7
  • 6
  • 3
  • +1
17 Comments
 
LVL 2

Accepted Solution

by:
Dudge669 earned 125 total points
ID: 12230162
Get a serial null modem (basically just a cable that connects serial ports).  Plug one end of the cable into a pc running the original manufacturer supplied software and the other end of the cable into your pc.  There are lots of controls that let you read and send data over serial ports.  The MSComm control comes to mind which you can use in VB. Not sure what language you're going to be using but there's plenty of info out there on reading serial ports if you just google it.  Then just start up the manufacturer sotware and see what data it sends.

If it wants to verify successful responses from the device, you may have to go back and forth a few times.  If the software sends a signal and then waits for a response, you will have to see what the signal is and then send it to the device yourself and see how the device responds.
0
 
LVL 11

Expert Comment

by:griessh
ID: 12230216
There are a couple of monitor apps out there. A commercial one with a 15 days trial is available at http://www.aggsoft.com/serial-port-monitor/
A free one would be http://www.knightsoft.net/products/commsniffer.asp
0
 
LVL 1

Author Comment

by:Seiera
ID: 12230226
That sounds promising I am will check it out.
0
 
LVL 11

Expert Comment

by:griessh
ID: 12230340
Let me know if it doesn't do what you need, we might be able find other tools :-)
0
 
LVL 11

Expert Comment

by:griessh
ID: 12230379
Is there a way you can get their protocol? That would make life much easier.
0
 
LVL 1

Author Comment

by:Seiera
ID: 12230470
protocol??  How would I go about finding that?
0
 
LVL 11

Expert Comment

by:griessh
ID: 12230815
You have a device, you know the company who made it ... just give them a ring and ask if they publish the communication protocol. Sometimes you will find it already printed in their manual.
0
 
LVL 3

Expert Comment

by:jlsjls
ID: 12235742
In order to see what's happening on the serial port (all settings/read/writes) use the freeware utility portmon :
http://www.sysinternals.com/ntw2k/freeware/portmon.shtml

1. start portmon
2. select serial port to monitor
3. start software which uses the serial port.

You can see all low level commands to/from the port.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:Seiera
ID: 12238581
Okay I am trying to use this mscomm component but it doesn't seem to exist in my .Net framework.  Where is it and how do I access it?
0
 
LVL 11

Expert Comment

by:griessh
ID: 12238626
What are you trying to do?
0
 
LVL 2

Expert Comment

by:Dudge669
ID: 12238700
Ahhh you are using .Net  No, there is no component to control comm ports but you can get this sample demonstration...

http://www.microsoft.com/downloads/details.aspx?FamilyID=075318ca-e4f1-4846-912c-b4ed37a1578b&DisplayLang=en

Hope this helps!
0
 
LVL 1

Author Comment

by:Seiera
ID: 12241358
That isn't quite what I was looking for Dudge669, it doesn't reading data coming in from the port.  I have finally figured out how to use the mscomm component which looks like it can do what I want.  I am giving the points to Grieshh for setting me on the right track and leading me to the answer.
0
 
LVL 11

Expert Comment

by:griessh
ID: 12243985
Hmm, then I guess you missed my comment :-)

If you were serious about your closing you should ask Community Support to change this.

0
 
LVL 1

Author Comment

by:Seiera
ID: 12245275
Which comment did I miss?  It was mscomm that I needed and I just fiugred out how to add it to my project and it was you who advised on hooking two computers up to watch the serial ports
0
 
LVL 11

Expert Comment

by:griessh
ID: 12247565
>> I am giving the points to Grieshh for setting me on the right track

Either this statement is wrong or your accepted answer is wrong :-)
0
 
LVL 2

Expert Comment

by:Dudge669
ID: 12252436
griessh, Seiera just got the names wrong.  Everything is correct though.  I was the one who recommended hooking two PCs together and using mscomm.
0
 
LVL 1

Author Comment

by:Seiera
ID: 12253739
Yipes Dudge669, you are right.  I did accept the right answer I just used the wrong name.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now