views:

48

answers:

1

Hi, i am using c# and Serialport and com0com(virtual serial ports) My problem is that my c# application can't recive data from hyperterminal,the event DataRecived is not fired and if i call manualy the readExisting i get nothing To test this problem you can create a basic c# app like this one that has same problem http://balau82.wordpress.com/2009/04/18/simplest-serial-port-terminal-in-csharp/ , if you run 2 instances of this app all is ok, but if you run one instance andne hyperterminal the data is send from C# to hiperterminal but not from hyperterm back.

+1  A: 

It's rather too simple, guaranteed to not work. You'll need to set the communication properties on the SerialPort to match them with HyperTerminal. Baudrate, DataBits, Parity and StopBits at least. And HyperTerminal won't send anything if it doesn't detect the device on-line. You have to set the RtsEnable and DtrEnable properties to true.

Hans Passant
Thx settings this properties p.RtsEnable = true; p.DtrEnable = true; fixed this problem,now i can continue my program
simion314