General serial communications issues

James Courtier-Dutton James at superbug.demon.co.uk
Mon May 31 12:54:24 CDT 2004


Eric Pouech wrote:
> James Courtier-Dutton a écrit :
> 
>> I attach two logs taken with the command: -
>>  WINEDEBUG=+comm wine ttermpro.exe
> 
> WINEDEBUG="+comm,+file,+ntdll" would be more helpful. TIA.
> 
> 
> 

In addition, ttermpro.exe is setting the following: -
   memset(&ctmo,0,sizeof(ctmo));
   ctmo.ReadIntervalTimeout = MAXDWORD;
   ctmo.WriteTotalTimeoutConstant = 500;
   SetCommTimeouts(cv->ComID,&ctmo);

Which according to 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/commtimeouts_str.asp

Means: -
ReadIntervalTimeout:
     Maximum time allowed to elapse between the arrival of two 
characters on the communications line, in milliseconds. During a 
ReadFile operation, the time period begins when the first character is 
received. If the interval between the arrival of any two characters 
exceeds this amount, the ReadFile operation is completed and any 
buffered data is returned. A value of zero indicates that interval 
time-outs are not used.

     A value of MAXDWORD, combined with zero values for both the 
ReadTotalTimeoutConstant and ReadTotalTimeoutMultiplier members, 
specifies that the read operation is to return immediately with the 
characters that have already been received, even if no characters have 
been received.


So, WINE should be "return immediately with the characters that have 
already been received, even if no characters have been received."

WINE is obviously not doing this.

Cheers
James



More information about the wine-devel mailing list