Solved

Watching Serial ports.

Posted on 2004-10-05
17
299 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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
 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 105
Export Table to CSV - Access to CSV - using python 18 166
Image decoding from Camera 3 96
Change the background and font colors in Notepad++ 5 110
A short article about a problem I had getting the GPS LocationListener working.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

840 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