Solved

Watching Serial ports.

Posted on 2004-10-05
17
283 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

743 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

9 Experts available now in Live!

Get 1:1 Help Now