RFC: Re: Problem with COM (fwd)

lawson_whitney at juno.com lawson_whitney at juno.com
Mon Feb 11 21:05:06 CST 2002


---------- Forwarded message ----------
Date: Sun, 10 Feb 2002 21:32:31 +0100
From: "[iso-8859-2] Du¹ko Rusmir" <drusmir at gmx.ch>
Reply-To: wine-users at winehq.com
To: wine-users at winehq.com
Subject: Re: Problem with COM

Dana nedelja 10. februar 2002. 04:11 napisali ste:
> On Sun, 10 Feb 2002, [iso-8859-2] Du¹ko Rusmir wrote:

I must use 5726, 5760 and 9600. My app need this to work. On 4800
and 9600 I got error.

With other app I can use 38400, 57600 and 115200 wery well.

I thing the handling of COM Port on these BaudRate is't good.

Thanks

--
trace:comm:BuildCommDCBAndTimeoutsA (COM1: baud=5760 parity=N data=8 stop=2,0x405608ac,(nil))
trace:comm:SetCommState handle 64, ptr 0x405608ac
trace:comm:SetCommState bytesize 8 baudrate 5760 fParity 0 Parity 0 stopbits 2
trace:comm:SetCommState ~IXON ~IXOFF
err:comm:SetCommState baudrate 5760

Now nobody is going to convince me there is any software that will make
a normal 16550a run at 5726, but with effort I managed to explain the
linux setserial spd_cust kluge, and at last report the app was working:

/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
	Baud_base: 115200, close_delay: 50, divisor: 20
	closing_wait: 3000
	Flags: spd_cust skip_test

trace:comm:BuildCommDCBAndTimeoutsA (COM1: baud=38400 parity=N data=8 stop=1,0x405608ac,(nil))
trace:comm:SetCommState handle 76, ptr 0x405608ac
trace:comm:SetCommState bytesize 8 baudrate 38400 fParity 0 Parity 0 stopbits 0
trace:comm:SetCommState ~IXON ~IXOFF
trace:file:ReadFile 76 0x405607d0 255 0x405607c4 (nil)
trace:file:ReadFile 76 0x405607d0 255 0x405607c4 (nil)
trace:comm:EscapeCommFunction handle 76, function=3
trace:comm:EscapeCommFunction SETRTS
trace:comm:EscapeCommFunction handle 76, function=4
trace:comm:EscapeCommFunction CLRRTS

Now I am not particularly fussed that Wine should be exactly as Windows,
and I am willing to try to explain (again) the spd_cust kluge in Wine
doco, if I don't have to use sgml, but I wonder if it wouldn't be better
in the long run to figure out what Windows does with off-brand speeds
like this (little help?  I don't have any Windows.) and cobble up a
TIOCMGSERIAL/TIOCMSSERIAL to handle them, at least for Linux.
Anybody know how to do a ./configure test for an ioctl?  Oh.. looks like
we already have some.  I guess I can figure it out.

5760 is easy, I believe that is just a divisor of 20, but 5726?  Does it
round up to the next possible speed?  Round down?  Count the feet and
divide by 4?

Lawson





More information about the wine-devel mailing list