views:

561

answers:

3

I have an application which is .NET 2.0, running on Windows XP Professional. This app uses the Serial Port to communicate with some custom devices.

For some reason, a few of our custom built PCs have an issue with the Serial Port, where it will stop functioning after a few weeks of use. Other that auto-reboots, which won't work in my scenario, are there any utilities out there which can debug/diagnose the serial port? Is there any .NET library which can help with this (can I write my own utility to debug the port)?

Also, has anyone had any experience with the following library: Sax CommStudio

+2  A: 

I've used Sax CommStudio in the past, but now I just use System.IO.Ports.SerialPort.

By any chance are you using a USB serial port? I've had problems with those going BSOD and whatnot. If that's the case, you have a driver problem, not a software problem.

If you want to do some troubleshooting outside of your app, you might have a look at HHD's serial monitor. I think they have a free trial, but if you're doing any serious RS232 development it's really worth buying.

Jon B
Excellent answer, but we are using a normal serial port.
pearcewg
A: 

I've used the HDD Software Free Serial Port Monitor. It will log all the traffic and open/close on the serial port. That way you have a log of the data and the operation of the serial port.

Free Serial Port Monitor

Robert
+1  A: 

portmon - http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx

I'd say that's the closest to a 'standard' tool for monitoring serial ports on Windows. But heaven help you if you need to try and track down something after two weeks using this kind of tool...

I would suspect a driver problem - is it a 'proper' serial port with a conventional UART, or is it some kind of USB-Serial convertor or similar?

Will Dean
Agreed -- works pretty well for basic things but any large amount of data would probably be unmanageable.
Luke