locked
SerialPort component .NET doesn't work with Win9x? RRS feed

  • Question

  • Hi All!

    I have a program which connects to my microprocessor device via COM-port (Visual Studio 2005, C#, Standard SerialPort component). It works fine on WinXP SP2, Pocket PC 2003 but it doesn't work with WinMe and Win98SE.

    I open the port, then write smth using SerialPort.Write function. It works fine. To receive answer from my device i use DataReceived event. On WinXP and PocketPC2003 this event fires, but on Win9x not.

    In fact i cant see any byte in receive buffer, although i'm sure that my device sends correct answers (i've tested it with oscillograph)...

    Any suggestions?

    Tuesday, March 13, 2007 6:35 AM

Answers

  • I've found the solution: It turned out that SerialPort.RtsEnable property doesn't work properly on Win9x systems :( If you set this property to false before opening the port, it remains at true state anyway. The workaround is to set this property to false after the port opening.

    Hope it'll save some time to anybody else

    Wednesday, March 14, 2007 4:25 PM

All replies

  • Moving thread to the correct forum.
    Tuesday, March 13, 2007 4:24 PM
  • Its me again.

    I've rewrote my program to avoid of use any serialport events, threads etc. I just send some data to the device and wait for the reply with help of Timer.Tick events.

    I'm sure that my device sends reply bytes, but i can see no data at SerialPort' receive buffer (BytesToRead property always 0). Whereas this program works properly on WinXP SP2.

    Does .NET 2.0 serialport class work with Win9x?

    Please help me... Otherwise my boss will force me to write this on VB 6.0!!!

    Wednesday, March 14, 2007 9:22 AM
  • I've found the solution: It turned out that SerialPort.RtsEnable property doesn't work properly on Win9x systems :( If you set this property to false before opening the port, it remains at true state anyway. The workaround is to set this property to false after the port opening.

    Hope it'll save some time to anybody else

    Wednesday, March 14, 2007 4:25 PM