G
Guest
I am using C# 2005 and System.IO.Ports.
private void SendData()
{
SerialPort m_Com;
m_Com = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.Two);
m_Com.NewLine = "\r";
m_Com.Open();
m_Com.WriteLine("VER");
m_Com.ReadLine();
}
The problem I have now is that the ReadLine just hang there forever. The
string sent back to the serial port starts with a non-readable character with
ASCII value 10. There's something (a property of SerialPort) that I need to
set so the ReadLine can read the entire ASCII table, but I don't know what
the property is. Please help.
Thanks.
private void SendData()
{
SerialPort m_Com;
m_Com = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.Two);
m_Com.NewLine = "\r";
m_Com.Open();
m_Com.WriteLine("VER");
m_Com.ReadLine();
}
The problem I have now is that the ReadLine just hang there forever. The
string sent back to the serial port starts with a non-readable character with
ASCII value 10. There's something (a property of SerialPort) that I need to
set so the ReadLine can read the entire ASCII table, but I don't know what
the property is. Please help.
Thanks.