Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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 converter or similar?

Update 2017: Portmon was a reasonably useful suggestion in 2008, but has never been updated to work with 64-bit versions of Windows, so don't bother trying it now on a modern machine.

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

You mention you are running on Windows XP and .NET 2.0, .NET may well be your problem since there are bugs affecting serial ports in most versions of .NET. The minimum version that I'd recommend for using serial ports is .NET 3.5 SP1.

See also: http://blog.zachsaw.com/2010/07/net-serialport-woes.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top