Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows/.NET way to monitor/debug the serial port?

Tags:

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

like image 614
pearcewg Avatar asked Dec 02 '08 20:12

pearcewg


2 Answers

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.

like image 80
Jon B Avatar answered Sep 30 '22 16:09

Jon B


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.

like image 41
Will Dean Avatar answered Sep 30 '22 15:09

Will Dean