Search code examples
c#.net-micro-framework

How should I go about monitoring the I/O of a serial port if I have a device which takes in two serial ports?


I have a NetMF application, which uses two serial ports which communicate with one another. How should I 'debug' this as to see exactly what is being sent to and from both serial ports at the same time?

one the 'com1' side:

 static SerialPort comPort;
comPort = new SerialPort("COM1",9600,Parity.None, 8, StopBits.One);
comPort.ReadTimeout = 1000; comPort.WriteTimeout = 1000;
comPort.Open();//Opens comPort Successfully

but I am sending data in hex, but the bytesToRead and bytesToWrite are always 0?


Solution

  • Use a service like portmon or serial sniffer - these will access the serial port and 'listen' to them.