Tech Support > Microsoft Windows > Development Resources > Initiate serial port problem.
Initiate serial port problem.
Posted by Freddan on October 14th, 2003


Hi,

I'm trying to initiate the serial port against a weight system.
When sending data to the seriel port the data can't be seen
on the serial line (listening with an port analyzer).
The communication dosen't work.

If I disable the RX line (hardware disable) at the initial phase
and, when the port has started, switching on the RX line, the
communication work.

What I'm I doing wrong?

I'm running Windows 2000, programming win32 c/c++ using
standard file (com) accessing routines.

The serial settings are following : 2400, 7, E, DTR/DSR.

The SetCommState DCB structure values changed are:
dcb.fOutxDsrFlow = true;
dcb.fDtrControl = DTR_CONTROL_HANDSHAKE;

Thanks in advance.

Greetings Fredrik.


Posted by Scott McPhillips [MVP] on October 14th, 2003


Freddan wrote:

If there is incoming data on the port while Windows is booting it might
think the port is connected to a mouse. In this case CreateFile would
fail when you try to open the port. Search MSDN for NOSERIALMICE for
discussions of this problem.

--
Scott McPhillips [VC++ MVP]


Posted by Freddan on October 14th, 2003



Thanks.

I added the NoSerialMice within the boot.ini file.

Also checked the ClearCommState and found that the BREAK-condition was
set, used ClearBreakState and now it works...

Thanks for all help.

Greeting Fredrik.




Similar Posts