• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

Watching Serial ports.

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
Seiera
Asked:
Seiera
  • 7
  • 6
  • 3
  • +1
1 Solution
 
Dudge669Commented:
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
 
griesshCommented:
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
 
SeieraAuthor Commented:
That sounds promising I am will check it out.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
griesshCommented:
Let me know if it doesn't do what you need, we might be able find other tools :-)
0
 
griesshCommented:
Is there a way you can get their protocol? That would make life much easier.
0
 
SeieraAuthor Commented:
protocol??  How would I go about finding that?
0
 
griesshCommented:
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
 
jlsjlsCommented:
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
 
SeieraAuthor Commented:
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
 
griesshCommented:
What are you trying to do?
0
 
Dudge669Commented:
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
 
SeieraAuthor Commented:
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
 
griesshCommented:
Hmm, then I guess you missed my comment :-)

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

0
 
SeieraAuthor Commented:
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
 
griesshCommented:
>> 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
 
Dudge669Commented:
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
 
SeieraAuthor Commented:
Yipes Dudge669, you are right.  I did accept the right answer I just used the wrong name.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 7
  • 6
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now