Keep serial port open in console app
Posted on 2013-12-17
I want to develop a C# console application that opens a serial port connection and listens on the port for any input. When input is received I want the application to send a response based on that input.
What I need to know is a way to keep the serial connection open within the console application? When I open the SerialPort object and attach a listener the console closes immediatly after this so the listener never has a chance to execute... Any ideas?
Also if anyone has any examples of the send/receive messages part of this problem they would be appreciated...