I have a device which when a certain application is on send data to that application. I need to take a sniff that data and retrieve certain information which is not being shown. The device is custom and for one reason or another has no data sheets. So have to sniff the communication and reconstruct the commands being sent from the application to this device. So I would like to accomplish this in C# or C++. Right now I have tried every sniffing software and yes they sniff it but I want to be able to this live and retrieve the data and present it live.
Thank you
The easiest way to do this is to put your software in between the device and the other software. Then, pass-through all of the data, capturing out whatever you need.
To do this, you would need to utilize serial port loopback software. There is a lot of it out there. See http://www.virtual-serial-port.com/virtual-serial-port-kit.html. I personally have used a product from GPSGate, but I believe there are free loopback drivers available.
A more complicated (but more passive!) method is to monitor IOCTLs. I can't direct you how to do this, as I do not know, but it is something to look into. The software at http://www.serial-port-monitor.com/ uses this method.