I have a sensor that uses RS232 over USB to receive commands from a PC and send data to the PC.
The sensor needs to be reset (using the DTR line) before a command can be sent to it.
I tried to use the built-in .net serial port, but it does not seem to drive the DTR line as expected. I am beginning to wonder if the DTREnable property actually drives the DTR pin, or if it only enables it during handshaking.
Other SerialPort implementations that I could find on the web also uses the Win32 API, but I find it very difficult to close the port with these implementations. If I step through code I can see it gets stuck on a WaitOne command.
Anyone know how to drive DTR with System.IO.Ports.SerialPort? Or know of a good component out there?