SerialPort

G

Guest

Hi Everyone,

How can I set the serial port Timeout to Off using C# (please see the
following)? Thanks.

Baud: 9600
Parity: None
Data Bits: 8
Stop Bits: 2
Timeout: ON //I want this to be Off
XON/XOFF: OFF
CTS handshaking: OFF
DSR handshaking: OFF
DSR sensitivity: OFF
DTR circuit: OFF
RTS circuit: OFF
 
M

Michael Rubinstein

John,
..NET SerialPort default timeout for both Read() and Write() is
InfiniteTimeout. All you have to do is to initialize the port and then open
it.

SerialPort port = new SerialPort("COM1",9600,Parity.None,8,StopBits.Two);
port.Open();

Look up help for SerialPort.ReadTimeout and SerialPort.WriteTimeout
properties.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top