Hello!
A few weeks ago, I had implemented a usb serial module into my program and
it worked ok (able to receive and transmit and talk to a terminal program running
on a pc).
Today, I notice that it can receive ok from the terminal program, however, when I transmit
back to the terminal program, I am not getting anything.
I notice that when I transmit from the pc terminal to the usb serial module, as soon as
my function is called to receive data (catching the event Serial.LineReceivedEventHandler),
I see the TX led on the usb serial module flash red.
What does this led mean?
ie - Does that mean I received data (normal) or does it mean there is an error?
As mentioned, I do receive the data ok, but when I transmit a reply back, I get nothing on
the terminal and also I don’t see any led’s on the serial module flash. The function to write executes w/o any exceptions, and as I mentioned before, this code worked a few weeks ago so I suspect my usb-serial module has a problem. I am re-ordering one so I can verify that, but just posting in case someone has some other idea.
also, I changed cables but same result. Here is the code:
void initSerialInterface()
{
usbSerial.Configure(115200,
GT.Interfaces.Serial.SerialParity.None,
GT.Interfaces.Serial.SerialStopBits.One,
8);
GT.Interfaces.Serial.DataReceivedEventHandler(SerialLine_DataReceived);
usbSerial.SerialLine.Open();
usbSerial.SerialLine.LineReceivedEventDelimiter = "\r";
usbSerial.SerialLine.LineReceived += new GT.Interfaces.Serial.LineReceivedEventHandler(SerialLine_DataReceived);
}
void SerialLine_DataReceived(GT.Interfaces.Serial sender, string data)
{
// this is my breakpt and I see the tx led flash red when it stops here
//then I step over this next line but receive nothing, but it used to work ok…
usbSerial.SerialLine.WriteLine(data);
}