Hi all,

here's some mail Mike McCormack sent me, along with my answers.

On Tue, May 09, 2000 at 11:46:53PM +1000, Mike McCormack wrote:
> 
> Hello Andreas,
> 
> i had a look into serial port support in wine about a half year ago...
> you are right, it is a bit of a mess! i was trying to support the
> Nikon Coolpix 600... it worked eventually, but not too well.
Wow !
Obviously you got further than me...
My changes should have made it work, but they didn't ;-\

> These are the conclusions that i came to:
> 
> 1) The hardest things to support are Asynchronous I/O to serial ports,
> timeouts and use of WaitCommEvent. 
> 
> To support WaitCommEvent you need to improve the linux serial port
> driver, so that you can wait on almost any event that the serial port
> can detect using the Linux "select" call. Ofcourse it needs to remain
> compatible with the current serial port driver!
Ouch !
One would have thought that Linux is a techie OS, so it ought to have
*damn* good serial support ??

> To support Asynchronous I/O and timeouts you need to change the
> ReadFile and WriteFile calls to timeout when reading and writing to
> COMM ports (which are dealt with in the same way as files). This is a
> sensitive area of WINE... any extra code has potential to slow down
> everything.
Sure.
That's what I did initially.
And of course you have to be VERY careful about overhead here.

> 2) the 16 bit comm api should be rewritten to use the 32bit comm api
> only. The current 16bit api is a bit of a fudge. It uses
Aha.
Well, I once thought of that.
Something missing here ??

> 3) the wine server needs to be extended to have serial ports as
> objects that can be openned and closed like files. OpenFile should
> detect whether a serial port is being opened and make space for extra
> information associated with the serial port (COMMSTATE struct and
> COMMTIMEOUTS), so that the serial port state is consistent across all
> wine processes.
That's EXACTLY what I thought about it :)

> Last time i tried, ReadFile and WriteFile could read and write bytes
> to the serial port, but that's the least of you're worries... 
Yes, I saw that.
That ability really isn't too helpful here.

> Wish good luck with your efforts :-)
> 
> Mike
Thanks !

> ps. you may resend this email to wine-devel if you wish... i'm not
> subscribed...
Did it !

Andreas Mohr

Reply via email to