Z
Z.K.
I was writing a program to display data from a serial device that I need
to interact with and go into a backdoor menu in order to verify certain
information. It works fine until I go into the menu and then instead of
returning the string sysconfig> as hyperterminal does, it returns some
strange characters such as [?7H[24H. Anyone have any ideas as to what
is happening. I think it might need terminal emulation, but I am not
certain and if it does I do not know how to implement terminal emulation.
Z.K.
This is a section of the code I use.
char inchar;
// in DataReceived event handler
while (stpSerialPort.BytesToRead != 0)
{
inchar = (char)stpSerialPort.ReadByte();
strReturnString += inchar;
if (inchar == '\r')
{
lbxDeviceMessage.BeginInvoke(new
UpdateListBoxStringsHandler(UpdateListBoxStrings),
new object[] { strReturnString });
CheckCertificate2(); //just some if statements to decide what
//strings to send to the device.
strReturnString = "";
}
inchar = ' ';
}
to interact with and go into a backdoor menu in order to verify certain
information. It works fine until I go into the menu and then instead of
returning the string sysconfig> as hyperterminal does, it returns some
strange characters such as [?7H[24H. Anyone have any ideas as to what
is happening. I think it might need terminal emulation, but I am not
certain and if it does I do not know how to implement terminal emulation.
Z.K.
This is a section of the code I use.
char inchar;
// in DataReceived event handler
while (stpSerialPort.BytesToRead != 0)
{
inchar = (char)stpSerialPort.ReadByte();
strReturnString += inchar;
if (inchar == '\r')
{
lbxDeviceMessage.BeginInvoke(new
UpdateListBoxStringsHandler(UpdateListBoxStrings),
new object[] { strReturnString });
CheckCertificate2(); //just some if statements to decide what
//strings to send to the device.
strReturnString = "";
}
inchar = ' ';
}