HELP IN TURNING OFF ECHO IN SERIAL PORT

Sep 12, 2007 6 Replies

HELLO ALL



I am new in serial port programming. I am currently doing a program that communicates to DSP board through COM1 port. But I am using Microsoft Visual Studio 2005. The language that I am using is C#. I am using the built in class SerialPort provided by Microsoft. When I send some bytes to the output buffer they always appear somewhat later at the input buffer... This is really frustrating.I know how to turn off the local echo in the Hyperterminal, but there seems to be no method for doing this in Microsoft Visual Studio.



Please help me to resolve this problem



Thanks in advance Nasif



Does the target board echo the characters?

As far as I read about read about that board it does not echo

Have you looked with a scope though? Don't spend time chasing a software problem until you're sure the characters aren't physically present at the input.

Are you sure it is the serial?. If you are using a KeyPress event in a text box, to 'send' the serial data, this event, must be set as 'handled', or the default behaviour will be to type the character into the local text box, giving the same apparent behaviour as local serial echo. Just a thought.

Other thought. How are you sending the data to the DSP?. If you are using a RS485 link, rather than RS232, these normally receive all data 'on' the link, when it is sent. Hence the sending board, will see the transmitted data, as well as any returned data.

Best Wishes

Depending on the hardware sometimes if you dont set SerialPort.DtrEnable property to true it may echo, but this it rare and is always immediate. I have also heard stories that using WriteLine() with certain modem commands (not the commands that force the modem to echo) can cause an echo. Failing that I would be looking at the device you are communicating with.

Disconnect the device from your serial port and see if the echo is still there.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required