Debug/Reverse Engineer Serial Port & VB Program?

Posted by: hybrid8

Debug/Reverse Engineer Serial Port & VB Program? - 19/02/2005 14:05

This definitely belongs in this forum because it's not empeg related, but would someone with Mod access be kind enough to add linking messages to the Programming and Technical forums? It looks like there are quite a number of people that don't pop into OffTopic who i think may have a suggestion or two.

Anyway, I have a small serial port IR receiver and a VB program (Windows XP - came with the serial hardware) that listens to it and displays some info about what it reads from the HW. I would like to snoop all the signals on that COM port while the software is working in hopes of finding out exactly how to initialize the hardware and what it spits back when functioning.

Basically the software is limited in what it presents in its UI and I'd like to do something on my own - it'll also be the first steps in making this thing work on the Mac (which will further require a USB/serial adapter).

I've seen a lot of serial port projects being talked about here over the years and I know plenty of people have quite a bit of experience with this sort of thing. I have a full installation of Visual Studio .NET at work if any of the included tools will be relevant. Other than that I'll simply have to get whatever other tools are recommended.

Thanks.
Bruno
Posted by: tfabris

Re: Debug/Reverse Engineer Serial Port & VB Program? - 19/02/2005 14:16

Quote:
I would like to snoop all the signals on that COM port while the software is working in hopes of finding out exactly how to initialize the hardware and what it spits back when functioning.

This is precisely what I did to fix most of the port initialization bugs in the win32 version of UPLOAD.EXE for my logo editor. The serial port snooper program I used for that is now one of my "must have" utilities.

The utility you want is portmon.

Ah, good old sysinternals.
Posted by: sn00p

Re: Debug/Reverse Engineer Serial Port & VB Program? - 19/02/2005 14:54

Quote:
Quote:
I would like to snoop all the signals on that COM port while the software is working in hopes of finding out exactly how to initialize the hardware and what it spits back when functioning.

This is precisely what I did to fix most of the port initialization bugs in the win32 version of UPLOAD.EXE for my logo editor. The serial port snooper program I used for that is now one of my "must have" utilities.

The utility you want is portmon.

Ah, good old sysinternals.


Yeah, portmon is the beast! Used it to figure out the protocol that our autoloading cd duplicator uses at work....

There was no way that I was going to sit there and rip all my cd's to mp3 by hand, so I figured I may as well get some (unintended) use from the cd duplicator! Worked a treat.
Posted by: hybrid8

Re: Debug/Reverse Engineer Serial Port & VB Program? - 19/02/2005 15:12

Looks like just the program. I suppose with all the serial details it won't evenbe worth taking apart or otherwise debugging the (VB) program that came with the hardware. Likely better off just writing something completely from scratch in C which will serve the purpose of doing what the original program is lacking, plus what it already does, but a lot faster/smoother and without the occassional crash.

Then I'll email the vendor and let them know about the software - and that they can get stuffed if they think I'll share it with them. They have yet to reply to any emails and that ticks me off.

Bruno
Posted by: andym

Re: Debug/Reverse Engineer Serial Port & VB Program? - 19/02/2005 15:50

Another vote for PortMon, it rocks. We've gotten out of signing NDAs because of it.
Posted by: n6mod

Re: Debug/Reverse Engineer Serial Port & VB Program? - 20/02/2005 21:10

Any suggestions for a "dual port" version of PortMon that could monitor traffic between two serial devices? LIke, say, a head unit and a tuner box?

You'd need to connect the TD line from each device to an RD line on a serial port, but that's doable.

I guess I could write something that "shorted" the serial ports together, and then just run PortMon on one of them. That probably wouldn't introduce enough delay to matter.

-Z

PS: Linux solutions would work, too.
Posted by: n6mod

Re: Debug/Reverse Engineer Serial Port & VB Program? - 21/02/2005 05:12

Quote:
PS: Linux solutions would work, too.


Found one, I'll give it a shot soon.

Linux Serial Sniffer