siranen
siranen

Reputation: 374

Looking for COM Port Sniffer to my Application

I am looking for something to test my app. The app is a weight logger, built in .net 3.5 - it is connected by rs232 to an electronic weight, but the problem is that I don't have it at home.

I wanted to emulate the traffic and data with my app, but I have a problem: I can't get 2 apps on 1 port.

Please help.

Upvotes: 2

Views: 2515

Answers (1)

Oliver
Oliver

Reputation: 45101

These are the tools you need:

  • com0com: Creates two virtual COM Ports which are connected to each other
    • Just connect your receiver application with the first one and your mock weight application with the second one.
  • Serial Port Monitor: If you need to sniff into some serial port connection to find out how another application communicates with some serial device.

Update

The storing and filtering is just to specific to your concrete project, so that you wouldn't find anything "out of the box". But you have two possibilities to store the data.

  1. Within your application implement some kind of wrapper class for your serial port. Every read and write access to the serial connection goes through this class. Then this class sees everything and can dump the whole traffic into a file or somewhere else. Additionally you could also implement some kind of filter mechanism.
  2. Instead of putting the dump and filter logic into your program, write it as an application. This application connects to two COM ports. The first is the real serial port. The other is a virtual from the com0com driver. Your application that normally communicates with your serial device will now be connected to the second com0com driver. So you're able to dump and filter anything that flows through your serial port.

Upvotes: 2

Related Questions